-
Notifications
You must be signed in to change notification settings - Fork 4
/
Makefile.prog
31 lines (26 loc) · 867 Bytes
/
Makefile.prog
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
all:
if [ -z "$${HAVE_BUILD_FLAGS}" ]; then \
cd ${SUBDIR_DEPTH}; \
${MAKE} BUILD_SUBDIR=${RELATIVE_DIR} \
BUILD_TARGET=${PROG} buildsubdir; \
else \
${MAKE} ${PROG}; \
fi
install:${PROG}
mkdir -p ${BINDIR}
cp ${PROG} ${BINDIR}/_inst.${PROG}.$$$$_ && \
strip ${BINDIR}/_inst.${PROG}.$$$$_ && \
chmod 0555 ${BINDIR}/_inst.${PROG}.$$$$_ && \
mv -f ${BINDIR}/_inst.${PROG}.$$$$_ ${BINDIR}/${PROG}
if ! [ -z "${MAN1DIR}" ]; then \
mkdir -p ${MAN1DIR}; \
for MPAGE in ${MAN1}; do \
cp $$MPAGE ${MAN1DIR}/_inst.$$MPAGE.$$$$_ && \
chmod 0444 ${MAN1DIR}/_inst.$$MPAGE.$$$$_ && \
mv -f ${MAN1DIR}/_inst.$$MPAGE.$$$$_ ${MAN1DIR}/$$MPAGE; \
done; \
fi
clean:
rm -f ${PROG} ${SRCS:.c=.o}
${PROG}:${SRCS:.c=.o}
${CC} -o ${PROG} ${SRCS:.c=.o} ${LDFLAGS} ${LDADD_EXTRA} ${LDADD_REQ} ${LDADD_POSIX}