blob: 405ea21ad34635835c530f9675f4462cfabdfa2c [file] [log] [blame]
Brad Bishop40a360c2016-05-28 18:41:04 -04001GDBUS_APPS = bmcctl \
Brad Bishop40a360c2016-05-28 18:41:04 -04002 flashbios \
Adriana Kobylak066d56f2016-06-16 09:23:24 -05003 hostcheckstop \
Brad Bishop40a360c2016-05-28 18:41:04 -04004 hostwatchdog \
Brad Bishop40a360c2016-05-28 18:41:04 -04005 op-flasher \
6 op-hostctl \
7 op-pwrctl \
8 pciedetect \
9 pwrbutton \
10 rstbutton
Norman Jamese2765102015-08-19 22:00:55 -050011
Yi Li2f3213f2016-08-03 11:09:55 +080012SUBDIRS = fanctl \
Brad Bishop40a360c2016-05-28 18:41:04 -040013 ledctl \
14 libopenbmc_intf \
15 pychassisctl \
16 pydownloadmgr \
Brad Bishop40a360c2016-05-28 18:41:04 -040017 pyflashbmc \
18 pyhwmon \
19 pyinventorymgr \
20 pyipmitest \
21 pysensormgr \
22 pystatemgr \
23 pysystemmgr \
24 pytools
Norman Jamese2765102015-08-19 22:00:55 -050025
Brad Bishop6f4ba052016-06-27 13:45:18 -040026REVERSE_SUBDIRS = $(shell echo $(SUBDIRS) $(GDBUS_APPS) | tr ' ' '\n' | tac |tr '\n' ' ')
Norman Jamesddb97382015-08-27 21:31:31 -050027
Brad Bishop6f4ba052016-06-27 13:45:18 -040028.PHONY: subdirs $(SUBDIRS) $(GDBUS_APPS)
Norman Jamese2765102015-08-19 22:00:55 -050029
Brad Bishop6f4ba052016-06-27 13:45:18 -040030subdirs: $(SUBDIRS) $(GDBUS_APPS)
Norman Jamese2765102015-08-19 22:00:55 -050031
Brad Bishop40a360c2016-05-28 18:41:04 -040032$(SUBDIRS):
33 $(MAKE) -C $@
Norman James1e25d1d2015-09-15 08:20:56 -050034
Brad Bishop40a360c2016-05-28 18:41:04 -040035$(GDBUS_APPS): libopenbmc_intf
Brad Bishop6f4ba052016-06-27 13:45:18 -040036 $(MAKE) -C $@ CFLAGS="-I ../$^" LDFLAGS="-L ../$^"
Adriana Kobylak597d49e2015-10-29 08:33:03 -050037
Brad Bishop40a360c2016-05-28 18:41:04 -040038install: subdirs
Brad Bishop6f4ba052016-06-27 13:45:18 -040039 @for d in $(SUBDIRS) $(GDBUS_APPS); do \
Brad Bishop40a360c2016-05-28 18:41:04 -040040 $(MAKE) -C $$d $@ DESTDIR=$(DESTDIR) PREFIX=$(PREFIX) || exit 1; \
41 done
42clean:
43 @for d in $(REVERSE_SUBDIRS); do \
44 $(MAKE) -C $$d $@ || exit 1; \
45 done