diff options
Diffstat (limited to 'drivers/mt5931/drv_wlan')
-rwxr-xr-x | drivers/mt5931/drv_wlan/GNUmakefile | 64 | ||||
-rwxr-xr-x | drivers/mt5931/drv_wlan/GNUmakefile.inc | 53 | ||||
-rwxr-xr-x | drivers/mt5931/drv_wlan/Makefile | 151 | ||||
-rwxr-xr-x | drivers/mt5931/drv_wlan/common/makefile | 8 | ||||
-rwxr-xr-x | drivers/mt5931/drv_wlan/common/sources.ce | 11 | ||||
-rwxr-xr-x | drivers/mt5931/drv_wlan/common/sources.ddk | 11 | ||||
-rwxr-xr-x | drivers/mt5931/drv_wlan/dirs | 6 | ||||
-rwxr-xr-x | drivers/mt5931/drv_wlan/mgmt/makefile | 8 | ||||
-rwxr-xr-x | drivers/mt5931/drv_wlan/mgmt/sources.ce | 11 | ||||
-rwxr-xr-x | drivers/mt5931/drv_wlan/mgmt/sources.ddk | 11 | ||||
-rwxr-xr-x | drivers/mt5931/drv_wlan/nic/makefile | 8 | ||||
-rwxr-xr-x | drivers/mt5931/drv_wlan/nic/sources.ce | 11 | ||||
-rwxr-xr-x | drivers/mt5931/drv_wlan/nic/sources.ddk | 11 | ||||
-rwxr-xr-x | drivers/mt5931/drv_wlan/os/dirs | 3 | ||||
-rwxr-xr-x | drivers/mt5931/drv_wlan/rules.make | 104 |
15 files changed, 471 insertions, 0 deletions
diff --git a/drivers/mt5931/drv_wlan/GNUmakefile b/drivers/mt5931/drv_wlan/GNUmakefile new file mode 100755 index 00000000..cdf60c99 --- /dev/null +++ b/drivers/mt5931/drv_wlan/GNUmakefile @@ -0,0 +1,64 @@ +# -------------------------------------------------------------------- +# Copyright (c) 2010 MediaTek Inc. +# +# All rights reserved. Copying, compilation, modification, distribution +# or any other use whatsoever of this material is strictly prohibited +# except in accordance with a Software License Agreement with +# MediaTek Inc. +# -------------------------------------------------------------------- + +# -------------------------------------------------------------------- +# This Makefile is major entrance for compiling driver module for +# Linux Kernel 2.6 +# -------------------------------------------------------------------- + +DRV_SRC_DIR := $(shell pwd) +export DRV_SRC_DIR + +include $(DRV_SRC_DIR)/config.mk +include $(DRV_SRC_DIR)/GNUmakefile.inc + +# Objects List for Linux 2.6 +COMMON_OBJS := $(patsubst %.o,$(COMMON_DIR)%.o,$(strip $(COMMON_OBJS))) +NIC_OBJS := $(patsubst %.o,$(NIC_DIR)%.o,$(strip $(NIC_OBJS))) +OS_OBJS := $(patsubst %.o,$(OS_DIR)%.o,$(strip $(OS_OBJS))) +HIF_OBJS := $(patsubst %.o,$(HIF_DIR)%.o,$(strip $(HIF_OBJS))) +MGMT_OBJS := $(patsubst %.o,$(MGMT_DIR)%.o,$(strip $(MGMT_OBJS))) + + +.PHONY: all clean install info build +all: build install + +build: info + @$(MAKE) -C $(LINUX_SRC) M=$(DRV_SRC_DIR) modules + @echo + @$(SIZE) -d $(patsubst %.o,%.ko,$(MTK_WLAN_MODULE)) + @echo + + +clean: + @$(MAKE) -C $(LINUX_SRC) M=$(DRV_SRC_DIR) clean + + +install: +ifneq ($(INSTALL_PATH),) + @echo Install $(patsubst %.o,%.ko,$(MTK_WLAN_MODULE)) to $(INSTALL_PATH)/$(INSTALL_MODULE_NAME) + @cp $(patsubst %.o,%.ko,$(MTK_WLAN_MODULE)) $(INSTALL_PATH)/$(INSTALL_MODULE_NAME) +else + @echo Warning INSTALL_PATH must be defined for 'make install' - check config.mk ! +endif + @echo + + +info: + @echo "" + @echo "The following settings will be used for compilation:" + @echo "----------------------------------------------------" + @echo "PLATFORM : $(ARCH)" + @echo "COMPILE : $(LINUX26_CC)" + @echo "KERNEL PATH : $(LINUX_SRC)" + @echo "KERNEL VERSION : $(KERNEL_RELEASE)" + @echo "INSTALL PATH : $(INSTALL_PATH)" + @echo "INSTALL MODULE NAME : $(INSTALL_MODULE_NAME)" + @echo "----------------------------------------------------" + @echo "" diff --git a/drivers/mt5931/drv_wlan/GNUmakefile.inc b/drivers/mt5931/drv_wlan/GNUmakefile.inc new file mode 100755 index 00000000..caa2f1af --- /dev/null +++ b/drivers/mt5931/drv_wlan/GNUmakefile.inc @@ -0,0 +1,53 @@ +# -------------------------------------------------------------------- +# Copyright (c) 2007 MediaTek Inc. +# +# All rights reserved. Copying, compilation, modification, distribution +# or any other use whatsoever of this material is strictly prohibited +# except in accordance with a Software License Agreement with +# MediaTek Inc. +# -------------------------------------------------------------------- + +# -------------------------------------------------------------------- +# This file is used for identifying version of Linux Kernel +# -------------------------------------------------------------------- + +KCHECK_DIR := $(DRV_SRC_DIR)/os/linux/.kcheck + +ifndef LINUX_SRC +$(error LINUX_SRC must be defined - check config.mk !) +endif + +FULL_PATH_CC := $(shell which $(CC) 2> /dev/null) +ifeq ($(FULL_PATH_CC), ) +$(error $(CC) is missing - check config.mk !) +endif + +ifeq ($(shell cd $(LINUX_SRC) 2> /dev/null && pwd), ) +$(error $(LINUX_SRC) is missing - check config.mk !) +endif + +ifndef KERNEL_RELEASE +KERNEL_RELEASE := $(shell $(CC) -E -I $(LINUX_SRC)/include $(KCHECK_DIR)/.kversion.c | grep uts_release | cut -f2 -d'"') +endif + +ifeq ($(filter-out 2.4%, $(KERNEL_RELEASE)), ) +LINUX24 = yes +endif + +ifndef LINUX24 +LINUX26_CC := $(shell $(MAKE) -n -C $(LINUX_SRC) M=$(KCHECK_DIR) 2> /dev/null | grep cc) +LINUX26_CC := $(filter-out -% '% "%,$(LINUX26_CC)) +LINUX26_CC := $(sort $(filter %cc,$(LINUX26_CC))) +FULL_PATH_LINUX26_CC := $(shell which $(LINUX26_CC) 2> /dev/null) +ifeq ($(FULL_PATH_LINUX26_CC), ) +LINUX26_CC := "\"$(LINUX26_CC)\" not found, check $(LINUX_SRC)/Makefile or \$$PATH in current SHELL !" +else +LINUX26_CC := $(FULL_PATH_LINUX26_CC) +endif +endif + +ifneq ($(INSTALL_PATH), ) +ifeq ($(shell cd $(INSTALL_PATH) 2> /dev/null && pwd), ) +INSTALL_PATH := +endif +endif diff --git a/drivers/mt5931/drv_wlan/Makefile b/drivers/mt5931/drv_wlan/Makefile new file mode 100755 index 00000000..c63e17a5 --- /dev/null +++ b/drivers/mt5931/drv_wlan/Makefile @@ -0,0 +1,151 @@ +# ---------------------------------------------------
+# Compile Options
+# ---------------------------------------------------
+
+#include $(MTK_PATH_BUILD)/Makefile
+ccflags-y += -DLINUX -DMT5931
+
+ifeq ($(CONFIG_MTK_MT5931_WAPI_SUPPORT), y)
+ ccflags-y += -DCFG_SUPPORT_WAPI=1
+else
+ ccflags-y += -DCFG_SUPPORT_WAPI=0
+endif
+
+ifeq ($(CONFIG_MTK_MT5931_SUPPORT_XLOG), y)
+ ccflags-y += -DCFG_SUPPORT_XLOG=1
+else
+ ccflags-y += -DCFG_SUPPORT_XLOG=0
+endif
+
+ifeq ($(CONFIG_MTK_MT5931_SUPPORT_AEE), y)
+ ccflags-y += -DCFG_SUPPORT_AEE=1
+else
+ ccflags-y += -DCFG_SUPPORT_AEE=0
+endif
+
+ifeq ($(CONFIG_MTK_MT5931_WLAN_PROC), y)
+ ccflags-y += -DWLAN_INCLUDE_PROC
+endif
+
+#ifeq ($(CONFIG_MTK_MT5931_WIFI_HIF_SDIO1), y)
+# ccflags-y += -D_HIF_SDIO=1
+#endif
+
+ccflags-y += -D_HIF_SDIO=1
+
+MODULE_NAME := wlan_mt5931
+
+ifeq ($(CONFIG_MTK_MT5931_DEBUG), yes)
+ ccflags-y += -DDBG=1
+else
+ ccflags-y += -DDBG=0
+endif
+
+ccflags-y += -I$(src)/os -I$(src)/os/linux/include -I$(src)/os/linux/hif/sdio/include
+ccflags-y += -I$(src)/include -I$(src)/include/nic -I$(src)/include/mgmt
+
+obj-$(CONFIG_MTK_MT5931_WIFI) += $(MODULE_NAME).o
+#obj-m += $(MODULE_NAME).o
+
+# ---------------------------------------------------
+# Directory List
+# ---------------------------------------------------
+COMMON_DIR := common/
+OS_DIR := os/linux/
+HIF_DIR := os/linux/hif/sdio/
+NIC_DIR := nic/
+MGMT_DIR := mgmt/
+
+
+# ---------------------------------------------------
+# Objects List
+# ---------------------------------------------------
+
+COMMON_OBJS := $(COMMON_DIR)dump.o \
+ $(COMMON_DIR)wlan_lib.o \
+ $(COMMON_DIR)wlan_oid.o \
+ $(COMMON_DIR)wlan_bow.o
+
+NIC_OBJS := $(NIC_DIR)nic.o \
+ $(NIC_DIR)nic_tx.o \
+ $(NIC_DIR)nic_rx.o \
+ $(NIC_DIR)nic_pwr_mgt.o \
+ $(NIC_DIR)cmd_buf.o \
+ $(NIC_DIR)que_mgt.o \
+ $(NIC_DIR)nic_cmd_event.o
+
+OS_OBJS := $(OS_DIR)gl_init.o \
+ $(OS_DIR)gl_kal.o \
+ $(OS_DIR)gl_bow.o \
+ $(OS_DIR)gl_wext.o \
+ $(OS_DIR)gl_wext_priv.o \
+ $(OS_DIR)gl_rst.o \
+ $(OS_DIR)gl_cfg80211.o \
+ $(OS_DIR)platform.o
+
+MGMT_OBJS := $(MGMT_DIR)ais_fsm.o \
+ $(MGMT_DIR)aaa_fsm.o \
+ $(MGMT_DIR)assoc.o \
+ $(MGMT_DIR)auth.o \
+ $(MGMT_DIR)bss.o \
+ $(MGMT_DIR)cnm.o \
+ $(MGMT_DIR)cnm_timer.o \
+ $(MGMT_DIR)cnm_mem.o \
+ $(MGMT_DIR)hem_mbox.o \
+ $(MGMT_DIR)mib.o \
+ $(MGMT_DIR)privacy.o \
+ $(MGMT_DIR)rate.o \
+ $(MGMT_DIR)rlm.o \
+ $(MGMT_DIR)rlm_domain.o \
+ $(MGMT_DIR)rlm_obss.o \
+ $(MGMT_DIR)rlm_protection.o \
+ $(MGMT_DIR)rsn.o \
+ $(MGMT_DIR)saa_fsm.o \
+ $(MGMT_DIR)scan.o \
+ $(MGMT_DIR)scan_fsm.o \
+ $(MGMT_DIR)sec_fsm.o \
+ $(MGMT_DIR)swcr.o \
+ $(MGMT_DIR)roaming_fsm.o
+
+# ---------------------------------------------------
+# P2P Objects List
+# ---------------------------------------------------
+
+COMMON_OBJS += $(COMMON_DIR)wlan_p2p.o
+
+NIC_OBJS += $(NIC_DIR)p2p_nic.o
+
+OS_OBJS += $(OS_DIR)gl_p2p.o \
+ $(OS_DIR)gl_p2p_cfg80211.o \
+ $(OS_DIR)gl_p2p_init.o \
+ $(OS_DIR)gl_p2p_kal.o
+
+MGMT_OBJS += $(MGMT_DIR)p2p_assoc.o \
+ $(MGMT_DIR)p2p_bss.o \
+ $(MGMT_DIR)p2p_fsm.o \
+ $(MGMT_DIR)p2p_func.o \
+ $(MGMT_DIR)p2p_rlm.o \
+ $(MGMT_DIR)p2p_rlm_obss.o \
+ $(MGMT_DIR)p2p_scan.o \
+ $(MGMT_DIR)p2p_ie.o \
+ $(MGMT_DIR)p2p_state.o
+
+
+ifeq ($(CONFIG_MTK_WAPI_SUPPORT), yes)
+MGMT_OBJS += $(MGMT_DIR)wapi.o
+endif
+
+ifeq ($(CONFIG_MTK_MT5931_WLAN_PROC), y)
+OS_OBJS += gl_proc.o
+endif
+
+HIF_OBJS := $(HIF_DIR)arm.o \
+ $(HIF_DIR)sdio.o
+
+$(MODULE_NAME)-objs += $(COMMON_OBJS)
+$(MODULE_NAME)-objs += $(NIC_OBJS)
+$(MODULE_NAME)-objs += $(OS_OBJS)
+$(MODULE_NAME)-objs += $(HIF_OBJS)
+$(MODULE_NAME)-objs += $(MGMT_OBJS)
+
+
diff --git a/drivers/mt5931/drv_wlan/common/makefile b/drivers/mt5931/drv_wlan/common/makefile new file mode 100755 index 00000000..89b63909 --- /dev/null +++ b/drivers/mt5931/drv_wlan/common/makefile @@ -0,0 +1,8 @@ +# +# DO NOT EDIT THIS FILE!!! Edit .\sources. if you want to add a new source +# file to this component. This file merely indirects to the real make file +# that is shared by all the driver components of the Windows NT DDK +#!INCLUDE $(NTMAKEENV)\makefile.def + +#!INCLUDE $(_MAKEENVROOT)\makefile.def +!INCLUDE $(_WINDOW_MAKE_ROOT)\makefile.def diff --git a/drivers/mt5931/drv_wlan/common/sources.ce b/drivers/mt5931/drv_wlan/common/sources.ce new file mode 100755 index 00000000..59b0b291 --- /dev/null +++ b/drivers/mt5931/drv_wlan/common/sources.ce @@ -0,0 +1,11 @@ +TARGETNAME=$(DRIVER_NAME)_cmn_$(WINCEDEBUG)_51 +TARGETTYPE=LIBRARY + +INCLUDES=$(_INCLUDES_DIRS) + +C_DEFINES=$(C_DEFINES) -DNDIS_MINIPORT_DRIVER + +C_DEFINES=$(C_DEFINES) -DNDIS51_MINIPORT=1 -D_WIN2K_COMPAT_SLIST_USAGE=1 +CDEFINES=$(CDEFINES) -D$(DEVICE_ID) -DNDIS51_MINIPORT=1 $(_BUILD_MODULE_DEF) + +SOURCES= $(_COMMON_FILES) diff --git a/drivers/mt5931/drv_wlan/common/sources.ddk b/drivers/mt5931/drv_wlan/common/sources.ddk new file mode 100755 index 00000000..d20e1b94 --- /dev/null +++ b/drivers/mt5931/drv_wlan/common/sources.ddk @@ -0,0 +1,11 @@ +TARGETPATH=$(_LIB_PATH) +TARGETNAME=$(DRIVER_NAME)_cmn_51 +TARGETTYPE=DRIVER_LIBRARY + +INCLUDES=$(_INCLUDES_DIRS) + +C_DEFINES=$(C_DEFINES) -DNDIS_MINIPORT_DRIVER -DNDIS51_MINIPORT=1 +C_DEFINES=$(C_DEFINES) -D_WIN2K_COMPAT_SLIST_USAGE=1 +C_DEFINES=$(C_DEFINES) -DNDIS_WDM=1 $(_BUILD_MODULE_DEF) + +SOURCES= $(_COMMON_FILES) diff --git a/drivers/mt5931/drv_wlan/dirs b/drivers/mt5931/drv_wlan/dirs new file mode 100755 index 00000000..b023688b --- /dev/null +++ b/drivers/mt5931/drv_wlan/dirs @@ -0,0 +1,6 @@ +OPTIONAL_DIRS= \ + common \ + os \ + nic \ + mgmt + diff --git a/drivers/mt5931/drv_wlan/mgmt/makefile b/drivers/mt5931/drv_wlan/mgmt/makefile new file mode 100755 index 00000000..89b63909 --- /dev/null +++ b/drivers/mt5931/drv_wlan/mgmt/makefile @@ -0,0 +1,8 @@ +# +# DO NOT EDIT THIS FILE!!! Edit .\sources. if you want to add a new source +# file to this component. This file merely indirects to the real make file +# that is shared by all the driver components of the Windows NT DDK +#!INCLUDE $(NTMAKEENV)\makefile.def + +#!INCLUDE $(_MAKEENVROOT)\makefile.def +!INCLUDE $(_WINDOW_MAKE_ROOT)\makefile.def diff --git a/drivers/mt5931/drv_wlan/mgmt/sources.ce b/drivers/mt5931/drv_wlan/mgmt/sources.ce new file mode 100755 index 00000000..132fd5bd --- /dev/null +++ b/drivers/mt5931/drv_wlan/mgmt/sources.ce @@ -0,0 +1,11 @@ +TARGETNAME=$(DRIVER_NAME)_mgmt_$(WINCEDEBUG)_51 +TARGETTYPE=LIBRARY + +INCLUDES=$(_INCLUDES_DIRS) + +C_DEFINES=$(C_DEFINES) -DNDIS_MINIPORT_DRIVER + +C_DEFINES=$(C_DEFINES) -DNDIS51_MINIPORT=1 -D_WIN2K_COMPAT_SLIST_USAGE=1 +CDEFINES=$(CDEFINES) -D$(DEVICE_ID) -DNDIS51_MINIPORT=1 $(_BUILD_MODULE_DEF) + +SOURCES= $(_MGMT_FILES) diff --git a/drivers/mt5931/drv_wlan/mgmt/sources.ddk b/drivers/mt5931/drv_wlan/mgmt/sources.ddk new file mode 100755 index 00000000..2548266f --- /dev/null +++ b/drivers/mt5931/drv_wlan/mgmt/sources.ddk @@ -0,0 +1,11 @@ +TARGETPATH=$(_LIB_PATH) +TARGETNAME=$(DRIVER_NAME)_mgmt_51 +TARGETTYPE=DRIVER_LIBRARY + +INCLUDES=$(_INCLUDES_DIRS) + +C_DEFINES=$(C_DEFINES) -DNDIS_MINIPORT_DRIVER -DNDIS51_MINIPORT=1 +C_DEFINES=$(C_DEFINES) -D_WIN2K_COMPAT_SLIST_USAGE=1 +C_DEFINES=$(C_DEFINES) -DNDIS_WDM=1 $(_BUILD_MODULE_DEF) + +SOURCES= $(_MGMT_FILES) diff --git a/drivers/mt5931/drv_wlan/nic/makefile b/drivers/mt5931/drv_wlan/nic/makefile new file mode 100755 index 00000000..89b63909 --- /dev/null +++ b/drivers/mt5931/drv_wlan/nic/makefile @@ -0,0 +1,8 @@ +# +# DO NOT EDIT THIS FILE!!! Edit .\sources. if you want to add a new source +# file to this component. This file merely indirects to the real make file +# that is shared by all the driver components of the Windows NT DDK +#!INCLUDE $(NTMAKEENV)\makefile.def + +#!INCLUDE $(_MAKEENVROOT)\makefile.def +!INCLUDE $(_WINDOW_MAKE_ROOT)\makefile.def diff --git a/drivers/mt5931/drv_wlan/nic/sources.ce b/drivers/mt5931/drv_wlan/nic/sources.ce new file mode 100755 index 00000000..4627c521 --- /dev/null +++ b/drivers/mt5931/drv_wlan/nic/sources.ce @@ -0,0 +1,11 @@ +TARGETNAME=$(DRIVER_NAME)_nic_$(WINCEDEBUG)_51 +TARGETTYPE=LIBRARY + +INCLUDES=$(_INCLUDES_DIRS) + +C_DEFINES=$(C_DEFINES) -DNDIS_MINIPORT_DRIVER + +C_DEFINES=$(C_DEFINES) -DNDIS51_MINIPORT=1 -D_WIN2K_COMPAT_SLIST_USAGE=1 +CDEFINES=$(CDEFINES) -D$(DEVICE_ID) -DNDIS51_MINIPORT=1 $(_BUILD_MODULE_DEF) + +SOURCES= $(_NIC_FILES) diff --git a/drivers/mt5931/drv_wlan/nic/sources.ddk b/drivers/mt5931/drv_wlan/nic/sources.ddk new file mode 100755 index 00000000..a233fee2 --- /dev/null +++ b/drivers/mt5931/drv_wlan/nic/sources.ddk @@ -0,0 +1,11 @@ +TARGETPATH=$(_LIB_PATH) +TARGETNAME=$(DRIVER_NAME)_nic_51 +TARGETTYPE=DRIVER_LIBRARY + +INCLUDES=$(_INCLUDES_DIRS) + +C_DEFINES=$(C_DEFINES) -DNDIS_MINIPORT_DRIVER -DNDIS51_MINIPORT=1 +C_DEFINES=$(C_DEFINES) -D_WIN2K_COMPAT_SLIST_USAGE=1 +C_DEFINES=$(C_DEFINES) -DNDIS_WDM=1 $(_BUILD_MODULE_DEF) + +SOURCES= $(_NIC_FILES) diff --git a/drivers/mt5931/drv_wlan/os/dirs b/drivers/mt5931/drv_wlan/os/dirs new file mode 100755 index 00000000..3dc42d39 --- /dev/null +++ b/drivers/mt5931/drv_wlan/os/dirs @@ -0,0 +1,3 @@ +DIRS= \ + windows + diff --git a/drivers/mt5931/drv_wlan/rules.make b/drivers/mt5931/drv_wlan/rules.make new file mode 100755 index 00000000..44b98711 --- /dev/null +++ b/drivers/mt5931/drv_wlan/rules.make @@ -0,0 +1,104 @@ +# -------------------------------------------------------------------- +# Copyright (c) 2007 MediaTek Inc. +# +# All rights reserved. Copying, compilation, modification, distribution +# or any other use whatsoever of this material is strictly prohibited +# except in accordance with a Software License Agreement with +# MediaTek Inc. +# -------------------------------------------------------------------- + +# -------------------------------------------------------------------- +# This file contains rules which are shared between multiple Makefiles. +# -------------------------------------------------------------------- + +# +# False targets. +# +.PHONY: dummy + +# +# Special variables which should not be exported +# +unexport O_TARGET +unexport obj-y +unexport subdir-y + +comma := , + + +# +# Get things started. +# +first_rule: sub_dirs + @$(MAKE) all_targets + +SUB_DIRS := $(subdir-y) + +# +# Common rules +# +%.o: %.c + @echo " [CC] $@" + @$(CC) $(CFLAGS) $(CPPFLAGS) -c -o $@ $< + +all_targets: $(O_TARGET) + +# +# Rule to compile a set of .o files into one .o file +# +ifdef O_TARGET +$(O_TARGET): $(obj-y) + @rm -f $@ + ifneq "$(strip $(obj-y))" "" + @$(LD) $(EXTRA_LDFLAGS) -r -o $@ $(filter $(obj-y), $^) + else + @$(AR) rcs $@ + endif + @ ( \ + echo 'ifeq ($(strip $(subst $(comma),:,$(EXTRA_LDFLAGS) $(obj-y))),$$(strip $$(subst $$(comma),:,$$(EXTRA_LDFLAGS) $$(obj-y))))' ; \ + echo 'FILES_FLAGS_UP_TO_DATE += $@' ; \ + echo 'endif' \ + ) > $(dir $@)/.$(notdir $@).flags +endif # O_TARGET + +# +# A rule to make subdirectories +# +subdir-list = $(sort $(patsubst %,_subdir_%,$(SUB_DIRS))) +sub_dirs: dummy $(subdir-list) + +ifdef SUB_DIRS +$(subdir-list) : dummy + @$(MAKE) -C $(patsubst _subdir_%,%,$@) +endif + + +# +# A rule to do nothing +# +dummy: + +# +# Find files whose flags have changed and force recompilation. +# For safety, this works in the converse direction: +# every file is forced, except those whose flags are positively up-to-date. +# +FILES_FLAGS_UP_TO_DATE := + +# For use in expunging commas from flags, which mung our checking. +comma = , + +FILES_FLAGS_EXIST := $(wildcard .*.flags) +ifneq ($(FILES_FLAGS_EXIST),) +include $(FILES_FLAGS_EXIST) +endif + +FILES_FLAGS_CHANGED := $(strip \ + $(filter-out $(FILES_FLAGS_UP_TO_DATE), \ + $(O_TARGET) \ + )) + +ifneq ($(FILES_FLAGS_CHANGED),) +$(FILES_FLAGS_CHANGED): dummy +endif + |