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