xref: /freebsd/gnu/usr.bin/diff3/Makefile (revision 2f02600abfddfc4e9f20dd384a2e729b451e16bd)
1# $FreeBSD$
2
3DIFFSRC=${.CURDIR}/../../../contrib/diff/src
4.PATH:  ${DIFFSRC} \
5	${.CURDIR}/../../../contrib/diff/lib \
6	${.CURDIR}/../../../contrib/diff/man
7
8PROG=		diff3
9SRCS=           diff3.c version-etc.c \
10		xmalloc.c error.c c-stack.c exitfail.c cmpbuf.c
11
12# Important for ctype macros!
13CFLAGS+=-funsigned-char
14
15CFLAGS+=-I${.CURDIR}/../../../contrib/diff/
16CFLAGS+=-I${.CURDIR}/../../../contrib/diff/src
17CFLAGS+=-I${.CURDIR}/../../../contrib/diff/lib
18CFLAGS+=-DHAVE_CONFIG_H
19CFLAGS+=-DDEFAULT_DIFF_PROGRAM=\"/usr/bin/diff\"
20
21.for f in diff3.c
22${f}: ${DIFFSRC}/${f} ${.CURDIR}/${f}.diff
23	patch -s -o ${.TARGET} < ${.CURDIR}/${f}.diff ${DIFFSRC}/${f}
24CLEANFILES+= ${f}
25.endfor
26
27.include <bsd.prog.mk>
28