summaryrefslogtreecommitdiffstats
path: root/Makefile
blob: eeca33bdb64706cae5cf8660123568aa07ead1f3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
GDBUS_APPS = bmcctl \
	     flashbios \
	     op-flasher \
	     op-hostctl \
	     op-pwrctl

SUBDIRS = fanctl \
	  ledctl \
	  libopenbmc_intf \
	  pychassisctl \
	  pydownloadmgr \
	  pyflashbmc \
	  pyinventorymgr \
	  pyiplobserver \
	  pyiplledmontor \
	  pyipmitest \
	  pystatemgr \
	  pysystemmgr \
	  pytools \
	  softbeep \
	  hardbeep

REVERSE_SUBDIRS = $(shell echo $(SUBDIRS) $(GDBUS_APPS) | tr ' ' '\n' | tac |tr '\n' ' ')

.PHONY: subdirs $(SUBDIRS) $(GDBUS_APPS)

subdirs: $(SUBDIRS) $(GDBUS_APPS)

$(SUBDIRS):
	$(MAKE) -C $@

$(GDBUS_APPS): libopenbmc_intf
	$(MAKE) -C $@ CFLAGS="-I ../$^" LDFLAGS="-L ../$^"

install: subdirs
	@for d in $(SUBDIRS) $(GDBUS_APPS); do \
		$(MAKE) -C $$d $@ DESTDIR=$(DESTDIR) PREFIX=$(PREFIX) || exit 1; \
	done
clean:
	@for d in $(REVERSE_SUBDIRS); do \
		$(MAKE) -C $$d $@ || exit 1; \
	done
OpenPOWER on IntegriCloud