forked from DentonGentry/gfiber-platform
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
172 lines (136 loc) · 3.84 KB
/
Makefile
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
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
default: all
# Build everything by default
BUILD_HNVRAM?= # default off: needs separate library
BUILD_SSDP?=y
BUILD_DNSSD?=y
BUILD_LOGUPLOAD?= # default off: needs libgtest
BUILD_BLUETOOTH?= # default off: needs bluetooth.h
BUILD_WAVEGUIDE?=y
BUILD_DVBUTILS?=y
BUILD_SYSMGR?=y
BUILD_CACHE_WARMING?=y
BUILD_STATUTILS?=y
BUILD_SPEEDTEST?=y
BUILD_CRYPTDEV?= # default off: needs libdevmapper
BUILD_SIGNING?= # default off: needs libgtest
BUILD_JSONPOLL?=n
BUILD_BOUNCER?= # default off: costly
BUILD_SYSLOG?= # default off: new
BUILD_PRESTERASTATS?=n
export BUILD_HNVRAM BUILD_SSDP BUILD_DNSSD BUILD_LOGUPLOAD \
BUILD_BLUETOOTH BUILD_WAVEGUIDE BUILD_DVBUTILS BUILD_SYSMGR \
BUILD_STATUTILS BUILD_CRYPTDEV BUILD_SIGNING BUILD_JSONPOLL \
BUILD_PRESTERASTATS BUILD_CACHE_WARMING BUILD_BOUNCER BUILD_SYSLOG
# note: libgpio is not built here. It's conditionally built
# via buildroot/packages/google/google_platform/google_platform.mk
DIRS=libstacktrace libexperiments ginstall cmds \
antirollback tvstat gpio-mailbox spectralanalyzer wifi wifiblaster \
sysvar py_mtd devcert
ifeq ($(BUILD_SYSMGR),y)
DIRS+=sysmgr
DIRS+=base
endif
ifeq ($(BUILD_WAVEGUIDE),y)
DIRS+=waveguide
DIRS+=taxonomy
endif
ifeq ($(BUILD_HNVRAM),y)
DIRS+=hnvram
endif
ifeq ($(BUILD_CACHE_WARMING),y)
DIRS+=cache_warming
endif
ifeq ($(BUILD_LOGUPLOAD),y)
DIRS+=logupload/client
endif
ifeq ($(BUILD_DVBUTILS),y)
DIRS+=dvbutils
endif
ifeq ($(BUILD_CRYPTDEV),y)
DIRS+=cryptdev
endif
ifeq ($(BUILD_SIGNING),y)
DIRS+=signing
endif
ifeq ($(BUILD_SPEEDTEST),y)
DIRS+=speedtest
endif
ifeq ($(BUILD_JSONPOLL),y)
DIRS+=jsonpoll
endif
ifeq ($(BUILD_CRAFTUI),y)
DIRS+=craftui
endif
ifeq ($(BUILD_BOUNCER),y)
DIRS+=bouncer
endif
ifeq ($(BR2_TARGET_GENERIC_PLATFORM_NAME),gfsc100)
DIRS+=diags
endif
ifeq ($(BR2_TARGET_GENERIC_PLATFORM_NAME),gfmn100)
DIRS+=diags
endif
ifeq ($(BR2_TARGET_GENERIC_PLATFORM_NAME),gflt110)
DIRS+=diags
endif
ifeq ($(BR2_TARGET_GENERIC_PLATFORM_NAME),gflt400)
DIRS+=diags
endif
ifeq ($(BR2_TARGET_GENERIC_PLATFORM_NAME),gfrg240)
DIRS+=diags
endif
ifeq ($(BUILD_CONMAN),y)
DIRS+=conman
endif
ifeq ($(BUILD_PRESTERASTATS),y)
DIRS+=presterastats
endif
ifeq ($(BUILD_LEDPATTERN),y)
DIRS+=ledpattern
endif
ifeq ($(BUILD_BLUETOOTH),y)
DIRS+=rcu_audio
endif
PREFIX=/usr
BINDIR=$(DESTDIR)$(PREFIX)/bin
LIBDIR=$(DESTDIR)$(PREFIX)/lib
all: $(addsuffix /all,$(DIRS)) build-commonpy
test: $(addsuffix /test,$(DIRS))
clean: $(addsuffix /clean,$(DIRS))
find \( -name '*.pyc' -o -name '*~' \) -exec rm -fv {} \;
rm -rf build
install-libs: $(addsuffix /install-libs,$(DIRS))
# The install targets in the recursive call use setuptools to build the python
# packages. These cannot be run in parallel, as they appear to race with each
# other to write site-packages/easy-install.pth.
install:
set -e; for d in $(DIRS); do $(MAKE) -C $$d install; done
$(MAKE) install-commonpy
mkdir -p $(BINDIR)
rm -fv $(BINDIR)/hnvram
ifeq ($(BR2_TARGET_GENERIC_PLATFORM_NAME), gfmn100)
ln -s /usr/bin/hnvram_wrapper $(BINDIR)/hnvram
else ifeq ($(BR2_TARGET_GENERIC_PLATFORM_NAME), gflt110)
ln -s /usr/bin/hnvram_wrapper $(BINDIR)/hnvram
else
ln -s /usr/bin/hnvram_binary $(BINDIR)/hnvram
endif
sysmgr/all: base/all libstacktrace/all libexperiments/all
cmds/all: libstacktrace/all libexperiments/all
gpio-mailbox/all: libstacktrace/all libexperiments/all
%/all:
$(MAKE) -C $* all
%/test:
$(MAKE) -C $* test
%/clean:
$(MAKE) -C $* clean
%/install:
$(MAKE) -C $* install
build-commonpy:
PYTHONPATH=$(HOSTPYTHONPATH) $(HOSTDIR)/usr/bin/python setup.py build
PYTHONPATH=$(TARGETPYTHONPATH) $(HOSTDIR)/usr/bin/python setup.py build
install-commonpy:
PYTHONPATH=$(HOSTPYTHONPATH) $(HOSTDIR)/usr/bin/python setup.py install --prefix=$(HOSTDIR)$(PREFIX)
PYTHONPATH=$(TARGETPYTHONPATH) $(HOSTDIR)/usr/bin/python setup.py install --prefix=$(DESTDIR)$(PREFIX)
%/install-libs:
$(MAKE) -C $* install-libs