-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathshared.mk
More file actions
30 lines (22 loc) · 797 Bytes
/
shared.mk
File metadata and controls
30 lines (22 loc) · 797 Bytes
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
BINARIES=$(foreach serv,$(SERVLETS),bin/lib$(serv).so)
LINKER=gcc
OUTPUT=../bin
LDFLAGS:=$(LDFLAGS) -L$(ENVROOT)/lib -lpstd -lproto
CFLAGS:=$(CFLAGS) -I$(ENVROOT)/include/pstd -I$(ENVROOT)/include/proto
PARAM=LINKER="$(LINKER)" OUTPUT="$(OUTPUT)" LDFLAGS="$(LDFLAGS)" CFLAGS="$(CFLAGS)"
default: $(BINARIES)
$(BINARIES): bin/lib%.so: % __always_build__ __check_environment__
cd $< && make -f $(ENVROOT)/lib/plumber/servlet.mk $(PARAM)
__always_build__:
__check_environment__:
@if [ "x$(ENVROOT)" = "x" ]; then \
echo "You should build the example in the Plumber Isolated Environment, see the init script for details"; \
exit 1; \
fi
.PHONY: clean
clean:
for serv in $(SERVLETS); do \
cd $${serv}; \
make -f $(ENVROOT)/lib/plumber/servlet.mk clean $(PARAM); \
cd ..; \
done;