summaryrefslogtreecommitdiffstats
path: root/contrib/csup/Makefile
blob: 06f7b92c0321b88d5659c401d0e304c6840964d2 (plain)
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
49
50
51
52
53
54
55
56
57
58
59
60
61
62
# $FreeBSD$

PREFIX?=	/usr/local
BINDIR?=	${PREFIX}/bin
MANDIR?=	${PREFIX}/man/man

UNAME!=		/usr/bin/uname -s

PROG=	csup
SRCS=	attrstack.c attrstack.h \
	config.c config.h \
	detailer.c detailer.h \
	diff.c diff.h \
	fattr.c fattr.h fattr_bsd.h \
	fixups.c fixups.h \
	fnmatch.c fnmatch.h \
	globtree.c globtree.h \
	keyword.c keyword.h \
	lister.c lister.h \
	main.c main.h \
	misc.c misc.h \
	mux.c mux.h \
	parse.h parse.y \
	pathcomp.c pathcomp.h \
	proto.c proto.h \
	status.c status.h \
	stream.c stream.h \
	threads.c threads.h \
	token.h token.l \
	updater.c updater.h

CFLAGS+=	-I. -I${.CURDIR} -g -pthread -DHAVE_FFLAGS -DNDEBUG
WARNS?=		6

# A bit of tweaking is needed to get this Makefile working
# with the bsd.prog.mk of all the *BSD OSes...
.if (${UNAME} == "NetBSD")
LDFLAGS+=	-pthread
YHEADER=	yes

.elif (${UNAME} == "OpenBSD")
# I bet there's a better way to do this with the OpenBSD mk
# framework but well, this works and I got bored.
LDFLAGS+=	-pthread
YFLAGS=		-d
CLEANFILES+=	parse.c parse.h y.tab.h

config.c:	parse.h

token.l:	parse.h

y.tab.h:	parse.c

parse.h:	y.tab.h
	cp ${.ALLSRC} ${.TARGET}

.endif

DPADD=	${LIBCRYPTO} ${LIBZ}
LDADD=	-lcrypto -lz

.include <bsd.prog.mk>
OpenPOWER on IntegriCloud