1GDBUS_APPS = bmcctl \ 2 flashbios \ 3 op-flasher \ 4 op-hostctl \ 5 op-pwrctl \ 6 pciedetect \ 7 pwrbutton \ 8 rstbutton 9 10SUBDIRS = fanctl \ 11 ledctl \ 12 libopenbmc_intf \ 13 pychassisctl \ 14 pydownloadmgr \ 15 pyflashbmc \ 16 pyinventorymgr \ 17 pyipmitest \ 18 pystatemgr \ 19 pysystemmgr \ 20 pytools 21 22REVERSE_SUBDIRS = $(shell echo $(SUBDIRS) $(GDBUS_APPS) | tr ' ' '\n' | tac |tr '\n' ' ') 23 24.PHONY: subdirs $(SUBDIRS) $(GDBUS_APPS) 25 26subdirs: $(SUBDIRS) $(GDBUS_APPS) 27 28$(SUBDIRS): 29 $(MAKE) -C $@ 30 31$(GDBUS_APPS): libopenbmc_intf 32 $(MAKE) -C $@ CFLAGS="-I ../$^" LDFLAGS="-L ../$^" 33 34install: subdirs 35 @for d in $(SUBDIRS) $(GDBUS_APPS); do \ 36 $(MAKE) -C $$d $@ DESTDIR=$(DESTDIR) PREFIX=$(PREFIX) || exit 1; \ 37 done 38clean: 39 @for d in $(REVERSE_SUBDIRS); do \ 40 $(MAKE) -C $$d $@ || exit 1; \ 41 done 42