diff options
author | Srikant Patnaik | 2015-01-11 12:28:04 +0530 |
---|---|---|
committer | Srikant Patnaik | 2015-01-11 12:28:04 +0530 |
commit | 871480933a1c28f8a9fed4c4d34d06c439a7a422 (patch) | |
tree | 8718f573808810c2a1e8cb8fb6ac469093ca2784 /drivers/net/wireless/mt5931/drv_wlan/rules.make | |
parent | 9d40ac5867b9aefe0722bc1f110b965ff294d30d (diff) | |
download | FOSSEE-netbook-kernel-source-871480933a1c28f8a9fed4c4d34d06c439a7a422.tar.gz FOSSEE-netbook-kernel-source-871480933a1c28f8a9fed4c4d34d06c439a7a422.tar.bz2 FOSSEE-netbook-kernel-source-871480933a1c28f8a9fed4c4d34d06c439a7a422.zip |
Moved, renamed, and deleted files
The original directory structure was scattered and unorganized.
Changes are basically to make it look like kernel structure.
Diffstat (limited to 'drivers/net/wireless/mt5931/drv_wlan/rules.make')
-rwxr-xr-x | drivers/net/wireless/mt5931/drv_wlan/rules.make | 104 |
1 files changed, 104 insertions, 0 deletions
diff --git a/drivers/net/wireless/mt5931/drv_wlan/rules.make b/drivers/net/wireless/mt5931/drv_wlan/rules.make new file mode 100755 index 00000000..44b98711 --- /dev/null +++ b/drivers/net/wireless/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 + |