-
Notifications
You must be signed in to change notification settings - Fork 3
/
Makefile
executable file
·48 lines (40 loc) · 1.14 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
BUILDVERSION != sh "${.CURDIR}/buildver.sh"
LIB= clens
SRCS+= clens.c arc4random_buf.c arc4random_uniform.c
HDRS+= clens/clens.h
.if !${BUILDVERSION} == ""
CPPFLAGS+= -DBUILDSTR=\"$(BUILDVERSION)\"
.endif
HDRDIRS+= clens
SYSTEM != uname -s
.if exists(${.CURDIR}/config/Makefile.$(SYSTEM:L))
.include "${.CURDIR}/config/Makefile.$(SYSTEM:L)"
.endif
LOCALBASE?=/usr/local
BINDIR?=${LOCALBASE}/bin
LIBDIR?=${LOCALBASE}/lib
INCDIR?=${LOCALBASE}/include
.PATH: $(.CURDIR)/src
CFLAGS+= -Wall -Werror
CFLAGS+= -ggdb3 -I${.CURDIR}/include/clens -I${INCDIR}
afterinstall:
@for d in $(HDRDIRS); do \
echo "$(INSTALL) -d -m 0755 $(INCDIR)/$$d"; \
${INSTALL} -d -m 0755 ${INCDIR}/$$d; \
done
@cd ${.CURDIR}/include; for i in ${HDRS}; do \
cmp -s $$i ${INCDIR}/$$i || \
${INSTALL} ${INSTALL_COPY} -m 444 -o $(BINOWN) -g $(BINGRP) $$i ${INCDIR}/$$i; \
echo ${INSTALL} ${INSTALL_COPY} -m 444 -o $(BINOWN) -g $(BINGRP) $$i ${INCDIR}/$$i; \
done
uninstall:
@for i in $(HDRS); do \
echo rm -f ${INCDIR}/$$i ;\
rm -f ${INCDIR}/$$i; \
done
@for i in $(_LIBS); do \
echo rm -f ${LIBDIR}/$$i ;\
rm -f ${LIBDIR}/$$i; \
done
rm -rf ${INCDIR}/clens
.include <bsd.lib.mk>