File: Rules.make1

package info (click to toggle)
alsa-driver 1.0.13-5etch1
  • links: PTS
  • area: main
  • in suites: etch
  • size: 20,108 kB
  • ctags: 50,477
  • sloc: ansic: 319,881; sh: 32,930; makefile: 2,015; python: 1,527; perl: 1,316; xml: 896; awk: 66
file content (79 lines) | stat: -rw-r--r-- 1,603 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
#
# Shared rules
#

#
# Parse directories
#

__subdir-y      := $(patsubst %/,%,$(filter %/, $(obj-y)))
subdir-y        += $(__subdir-y)
__subdir-m      := $(patsubst %/,%,$(filter %/, $(obj-m)))
subdir-m        += $(__subdir-m) $(__subdir-y)
__subdir-n      := $(patsubst %/,%,$(filter %/, $(obj-n)))
subdir-n        += $(__subdir-n)
__subdir-       := $(patsubst %/,%,$(filter %/, $(obj-)))
subdir-         += $(__subdir-)
obj-y           := $(patsubst %/, %/built-in.o, $(obj-y))
obj-m           := $(filter-out %/, $(obj-m))

#
# ALSA hacks for extra code
#

subdir-y	+= $(extra-subdir-y)
subdir-m	+= $(extra-subdir-m)
subdir-n	+= $(extra-subdir-n)

obj-y		+= $(extra-obj-y)
obj-m		+= $(extra-obj-m)
obj-n		+= $(extra-obj-n)

#
#
#

both-m          := $(filter $(mod-subdirs), $(subdir-y))
SUB_DIRS	:= $(subdir-y)
MOD_SUB_DIRS	:= $(sort $(subdir-m) $(both-m))
ALL_SUB_DIRS	:= $(sort $(subdir-y) $(subdir-m) $(subdir-n) $(subdir-))

#
#
#

#
# A rule to do nothing
#
dummy:

#
# This is useful for testing
#
script:
	$(SCRIPT)

#
#
#

.PHONY: clean1
clean1:
	rm -f .depend *.[oas] *.ko .*.cmd .*.tmp *.mod.c *.isapnp $(clean-files)

.PHONY: clean
clean: $(patsubst %,_sfclean_%,$(ALL_SUB_DIRS)) clean1

.PHONY: mrproper
mrproper: $(patsubst %,_sfmrproper_%,$(ALL_SUB_DIRS)) clean1
	rm -f *~ out.txt *.orig *.rej .#* .gdb_history

ifneq "$(strip $(ALL_SUB_DIRS))" ""
$(patsubst %,_sfclean_%,$(ALL_SUB_DIRS)):
	$(MAKE) -C $(patsubst _sfclean_%,%,$@) clean
endif

ifneq "$(strip $(ALL_SUB_DIRS))" ""
$(patsubst %,_sfmrproper_%,$(ALL_SUB_DIRS)):
	$(MAKE) -C $(patsubst _sfmrproper_%,%,$@) mrproper
endif