blob: 3938ddc1af3205df87ea6dcabad54b98438c60ba [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 \
Brad Bishop40a360c2016-05-28 18:41:04 -040016 pyinventorymgr \
17 pyipmitest \
18 pysensormgr \
19 pystatemgr \
20 pysystemmgr \
21 pytools
Norman Jamese2765102015-08-19 22:00:55 -050022
Brad Bishop6f4ba052016-06-27 13:45:18 -040023REVERSE_SUBDIRS = $(shell echo $(SUBDIRS) $(GDBUS_APPS) | tr ' ' '\n' | tac |tr '\n' ' ')
Norman Jamesddb97382015-08-27 21:31:31 -050024
Brad Bishop6f4ba052016-06-27 13:45:18 -040025.PHONY: subdirs $(SUBDIRS) $(GDBUS_APPS)
Norman Jamese2765102015-08-19 22:00:55 -050026
Brad Bishop6f4ba052016-06-27 13:45:18 -040027subdirs: $(SUBDIRS) $(GDBUS_APPS)
Norman Jamese2765102015-08-19 22:00:55 -050028
Brad Bishop40a360c2016-05-28 18:41:04 -040029$(SUBDIRS):
30 $(MAKE) -C $@
Norman James1e25d1d2015-09-15 08:20:56 -050031
Brad Bishop40a360c2016-05-28 18:41:04 -040032$(GDBUS_APPS): libopenbmc_intf
Brad Bishop6f4ba052016-06-27 13:45:18 -040033 $(MAKE) -C $@ CFLAGS="-I ../$^" LDFLAGS="-L ../$^"
Adriana Kobylak597d49e2015-10-29 08:33:03 -050034
Brad Bishop40a360c2016-05-28 18:41:04 -040035install: subdirs
Brad Bishop6f4ba052016-06-27 13:45:18 -040036 @for d in $(SUBDIRS) $(GDBUS_APPS); do \
Brad Bishop40a360c2016-05-28 18:41:04 -040037 $(MAKE) -C $$d $@ DESTDIR=$(DESTDIR) PREFIX=$(PREFIX) || exit 1; \
38 done
39clean:
40 @for d in $(REVERSE_SUBDIRS); do \
41 $(MAKE) -C $$d $@ || exit 1; \
42 done