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