-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
31 lines (19 loc) · 822 Bytes
/
Makefile
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
# Makefile for raspberry
include rules.mak
SUBDIR_MAKEFLAGS = $(if $(V), , --no-print-directory)
TARGET_DIRS = libbcm2835 lib libevent librf24 inv_mpu catnet client raspd test
.PHONY: all clean distclean
SUBDIR_RULES = $(patsubst %, subdir-%, $(TARGET_DIRS))
subdir-%:
$(call quiet-command, $(MAKE) $(SUBDIR_MAKEFLAGS) -C $* V="$(V)" TARGET_DIR="$*/" all, )
all: $(SUBDIR_RULES)
# clean
CLEAN_SUBDIRS = $(patsubst %, clean_subdir-%, $(TARGET_DIRS))
clean_subdir-%:
$(call quiet-command, $(MAKE) $(SUBDIR_MAKEFLAGS) -C $* V="$(V)" clean, )
clean: $(CLEAN_SUBDIRS)
# distclean
# FIXME equal clean
DC_SUBDIRS = $(patsubst %, dc_subdir-%, $(TARGET_DIRS))
$(foreach D, $(TARGET_DIRS), $(eval dc_subdir-$(D): ; $(call quiet-command, $(MAKE) $(SUBDIR_MAKEFLAGS) -C $(D) V="$(V)" clean, )))
distclean: $(DC_SUBDIRS)