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 pyhwmon \ 17 pyinventorymgr \ 18 pyipmitest \ 19 pysensormgr \ 20 pystatemgr \ 21 pysystemmgr \ 22 pytools 23 24REVERSE_SUBDIRS = $(shell echo $(SUBDIRS) $(GDBUS_APPS) | tr ' ' '\n' | tac |tr '\n' ' ') 25 26.PHONY: subdirs $(SUBDIRS) $(GDBUS_APPS) 27 28subdirs: $(SUBDIRS) $(GDBUS_APPS) 29 30$(SUBDIRS): 31 $(MAKE) -C $@ 32 33$(GDBUS_APPS): libopenbmc_intf 34 $(MAKE) -C $@ CFLAGS="-I ../$^" LDFLAGS="-L ../$^" 35 36install: subdirs 37 @for d in $(SUBDIRS) $(GDBUS_APPS); do \ 38 $(MAKE) -C $$d $@ DESTDIR=$(DESTDIR) PREFIX=$(PREFIX) || exit 1; \ 39 done 40clean: 41 @for d in $(REVERSE_SUBDIRS); do \ 42 $(MAKE) -C $$d $@ || exit 1; \ 43 done 44