blob: b823ededa8f391df694e72ac60aae08df2981026 [file] [log] [blame]
Brad Bishop40a360c2016-05-28 18:41:04 -04001GDBUS_APPS = bmcctl \
Brad Bishop40a360c2016-05-28 18:41:04 -04002 flashbios \
3 hostwatchdog \
Brad Bishop40a360c2016-05-28 18:41:04 -04004 op-flasher \
5 op-hostctl \
6 op-pwrctl \
7 pciedetect \
8 pwrbutton \
9 rstbutton
Norman Jamese2765102015-08-19 22:00:55 -050010
Yi Li2f3213f2016-08-03 11:09:55 +080011SUBDIRS = fanctl \
Brad Bishop40a360c2016-05-28 18:41:04 -040012 ledctl \
13 libopenbmc_intf \
14 pychassisctl \
15 pydownloadmgr \
Brad Bishop40a360c2016-05-28 18:41:04 -040016 pyflashbmc \
17 pyhwmon \
18 pyinventorymgr \
19 pyipmitest \
20 pysensormgr \
21 pystatemgr \
22 pysystemmgr \
23 pytools
Norman Jamese2765102015-08-19 22:00:55 -050024
Brad Bishop6f4ba052016-06-27 13:45:18 -040025REVERSE_SUBDIRS = $(shell echo $(SUBDIRS) $(GDBUS_APPS) | tr ' ' '\n' | tac |tr '\n' ' ')
Norman Jamesddb97382015-08-27 21:31:31 -050026
Brad Bishop6f4ba052016-06-27 13:45:18 -040027.PHONY: subdirs $(SUBDIRS) $(GDBUS_APPS)
Norman Jamese2765102015-08-19 22:00:55 -050028
Brad Bishop6f4ba052016-06-27 13:45:18 -040029subdirs: $(SUBDIRS) $(GDBUS_APPS)
Norman Jamese2765102015-08-19 22:00:55 -050030
Brad Bishop40a360c2016-05-28 18:41:04 -040031$(SUBDIRS):
32 $(MAKE) -C $@
Norman James1e25d1d2015-09-15 08:20:56 -050033
Brad Bishop40a360c2016-05-28 18:41:04 -040034$(GDBUS_APPS): libopenbmc_intf
Brad Bishop6f4ba052016-06-27 13:45:18 -040035 $(MAKE) -C $@ CFLAGS="-I ../$^" LDFLAGS="-L ../$^"
Adriana Kobylak597d49e2015-10-29 08:33:03 -050036
Brad Bishop40a360c2016-05-28 18:41:04 -040037install: subdirs
Brad Bishop6f4ba052016-06-27 13:45:18 -040038 @for d in $(SUBDIRS) $(GDBUS_APPS); do \
Brad Bishop40a360c2016-05-28 18:41:04 -040039 $(MAKE) -C $$d $@ DESTDIR=$(DESTDIR) PREFIX=$(PREFIX) || exit 1; \
40 done
41clean:
42 @for d in $(REVERSE_SUBDIRS); do \
43 $(MAKE) -C $$d $@ || exit 1; \
44 done