aboutsummaryrefslogtreecommitdiff
path: root/contrib/csup/Makefile
blob: b6bf077301a1be6a0e33c400510a8d6b9601a7c0 (plain) (blame)
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
# $FreeBSD: src/contrib/csup/Makefile,v 1.2.2.1.6.1 2010/12/21 17:09:25 kensmith Exp $

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

UNAME!=		/usr/bin/uname -s

PROG=	csup
SRCS=	attrstack.c config.c detailer.c diff.c fattr.c fixups.c fnmatch.c \
	globtree.c idcache.c keyword.c lister.c main.c misc.c mux.c parse.y \
	pathcomp.c proto.c status.c stream.c threads.c token.l updater.c \
	rcsfile.c rcsparse.c lex.rcs.c rsyncfile.c

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

# 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>