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