c26f15
build system: Makefile.in, custom.mk: added --all-[static|shared] support.
@@ -104,8 +104,13 @@ all: shared static app
|
|
104
104
|
|
105
105
|
install: install-libs install-headers install-app install-extras
|
106
106
|
|
107
|
-
app:
|
107
|
+
app: package-app app-tag
|
108
108
|
|
109
|
+
app-tag: package-app app.tag
|
110
|
+
|
111
|
+
app.tag: package-app
|
112
|
+
cp $(PACKAGE_APP) $(APP)
|
113
|
+
touch app.tag
|
109
114
|
|
110
115
|
install-libs: install-shared install-static install-libs-extras
|
111
116
|
|
@@ -147,11 +152,11 @@ static-lib: static-objs $(STATIC_LIB)
|
|
147
152
|
|
148
153
|
|
149
154
|
|
150
|
-
default-app: version.tag static $(DEFAULT_APP)
|
155
|
+
default-app: version.tag static-objs $(DEFAULT_APP)
|
151
156
|
|
152
157
|
shared-app: version.tag shared $(SHARED_APP)
|
153
158
|
|
154
|
-
static-app: version.tag static $(STATIC_APP)
|
159
|
+
static-app: version.tag static-objs $(STATIC_APP)
|
155
160
|
|
156
161
|
|
157
162
|
|
@@ -167,16 +172,18 @@ $(SHARED_LIB): $(SHARED_OBJS)
|
|
167
172
|
|
168
173
|
(STATIC_LIB): $(STATIC_OBJS)
|
169
174
|
|
170
|
-
(APP): $(
|
175
|
+
(APP): $(PACKAGE_APP)
|
171
|
-
cp $^ $@
|
172
176
|
|
173
177
|
$(DEFAULT_APP): $(STATIC_OBJS) $(APP_OBJS)
|
178
|
+
rm -f app.tag
|
174
179
|
$(CC) -o $@ $^ $(LDFLAGS_APP)
|
175
180
|
|
176
181
|
$(SHARED_APP): $(SHARED_LIB) $(APP_OBJS)
|
182
|
+
rm -f app.tag
|
177
183
|
$(CC) -o $@ $(APP_OBJS) -l$(PACKAGE) $(LDFLAGS_SHARED)
|
178
184
|
|
179
185
|
$(STATIC_APP): $(STATIC_OBJS) $(APP_OBJS)
|
186
|
+
rm -f app.tag
|
180
187
|
$(CC) -static -o $@ $^ -l$(PACKAGE) $(LDFLAGS_STATIC)
|
181
188
|
|
182
189
|
|
@@ -322,6 +329,7 @@ clean: clean-implib
|
|
322
329
|
|
323
330
|
|
324
331
|
.PHONY: all install shared static app .display \
|
332
|
+
package-app \
|
325
333
|
shared-objs shared-lib \
|
326
334
|
static-objs static-lib \
|
327
335
|
default-app shared-app static-app \
|
@@ -5,3 +5,27 @@ endif
|
|
5
5
|
ifeq ($(OS_BINFMT),ELF)
|
6
6
|
include $(PROJECT_DIR)/sysinfo/os/elf.mk
|
7
7
|
endif
|
8
|
+
|
9
|
+
|
10
|
+
|
11
|
+
ifeq ($(ALL_STATIC),yes)
|
12
|
+
|
13
|
+
package-app: static-app
|
14
|
+
app: PACKAGE_APP = $(STATIC_APP)
|
15
|
+
app-tag: PACKAGE_APP = $(STATIC_APP)
|
16
|
+
|
17
|
+
|
18
|
+
else ifeq ($(ALL_SHARED),yes)
|
19
|
+
|
20
|
+
package-app: shared-app
|
21
|
+
app: PACKAGE_APP = $(SHARED_APP)
|
22
|
+
app-tag: PACKAGE_APP = $(SHARED_APP)
|
23
|
+
|
24
|
+
|
25
|
+
else
|
26
|
+
|
27
|
+
package-app: default-app
|
28
|
+
app: PACKAGE_APP = $(DEFAULT_APP)
|
29
|
+
app-tag: PACKAGE_APP = $(DEFAULT_APP)
|
30
|
+
|
31
|
+
endif
|