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