-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
38 lines (33 loc) · 818 Bytes
/
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
.POSIX:
PROGS= spiped spipe
BINDIR_DEFAULT= /usr/local/bin
CFLAGS_DEFAULT= -O2
all:
if [ -z "${CFLAGS}" ]; then \
CFLAGS=${CFLAGS_DEFAULT}; \
else \
CFLAGS="${CFLAGS}"; \
fi; \
LDADD_POSIX=`export CC=${CC}; cd POSIX && command -p sh posix-l.sh`; \
for D in ${PROGS} ${BENCH}; do \
( cd $${D} && \
make CFLAGS="$${CFLAGS}" \
LDADD_POSIX="$${LDADD_POSIX}" \
LDADD_EXTRA="${LDADD_EXTRA}" all ) || \
exit 2; \
done
install: all
if [ -z "${BINDIR}" ]; then \
BINDIR=${BINDIR_DEFAULT}; \
else \
BINDIR="${BINDIR}"; \
fi; \
for D in ${PROGS}; do \
( cd $${D} && make BINDIR="$${BINDIR}" install ) || exit 2; \
done
debug:
CFLAGS=-ggdb3 make
clean:
for D in ${PROGS} ${BENCH}; do \
( cd $${D} && make clean ) || exit 2; \
done