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