blob: 4eeadacafccd4b1dfbadf3f5a6f5de588b1ffdec [file] [log] [blame]
Brad Bishop40a360c2016-05-28 18:41:04 -04001GDBUS_APPS = bmcctl \
Brad Bishop40a360c2016-05-28 18:41:04 -04002 flashbios \
Brad Bishop40a360c2016-05-28 18:41:04 -04003 op-flasher \
4 op-hostctl \
5 op-pwrctl \
6 pciedetect \
7 pwrbutton \
8 rstbutton
Norman Jamese2765102015-08-19 22:00:55 -05009
Yi Li2f3213f2016-08-03 11:09:55 +080010SUBDIRS = fanctl \
Brad Bishop40a360c2016-05-28 18:41:04 -040011 ledctl \
12 libopenbmc_intf \
13 pychassisctl \
14 pydownloadmgr \
Brad Bishop40a360c2016-05-28 18:41:04 -040015 pyflashbmc \
16 pyhwmon \
17 pyinventorymgr \
18 pyipmitest \
19 pysensormgr \
20 pystatemgr \
21 pysystemmgr \
22 pytools
Norman Jamese2765102015-08-19 22:00:55 -050023
Brad Bishop6f4ba052016-06-27 13:45:18 -040024REVERSE_SUBDIRS = $(shell echo $(SUBDIRS) $(GDBUS_APPS) | tr ' ' '\n' | tac |tr '\n' ' ')
Norman Jamesddb97382015-08-27 21:31:31 -050025
Brad Bishop6f4ba052016-06-27 13:45:18 -040026.PHONY: subdirs $(SUBDIRS) $(GDBUS_APPS)
Norman Jamese2765102015-08-19 22:00:55 -050027
Brad Bishop6f4ba052016-06-27 13:45:18 -040028subdirs: $(SUBDIRS) $(GDBUS_APPS)
Norman Jamese2765102015-08-19 22:00:55 -050029
Brad Bishop40a360c2016-05-28 18:41:04 -040030$(SUBDIRS):
31 $(MAKE) -C $@
Norman James1e25d1d2015-09-15 08:20:56 -050032
Brad Bishop40a360c2016-05-28 18:41:04 -040033$(GDBUS_APPS): libopenbmc_intf
Brad Bishop6f4ba052016-06-27 13:45:18 -040034 $(MAKE) -C $@ CFLAGS="-I ../$^" LDFLAGS="-L ../$^"
Adriana Kobylak597d49e2015-10-29 08:33:03 -050035
Brad Bishop40a360c2016-05-28 18:41:04 -040036install: subdirs
Brad Bishop6f4ba052016-06-27 13:45:18 -040037 @for d in $(SUBDIRS) $(GDBUS_APPS); do \
Brad Bishop40a360c2016-05-28 18:41:04 -040038 $(MAKE) -C $$d $@ DESTDIR=$(DESTDIR) PREFIX=$(PREFIX) || exit 1; \
39 done
40clean:
41 @for d in $(REVERSE_SUBDIRS); do \
42 $(MAKE) -C $$d $@ || exit 1; \
43 done