]> sjero.net Git - strip6in4/blob - Makefile
Add README and man page
[strip6in4] / Makefile
1 ###############################################################################
2 #Author: Samuel Jero
3 #
4 # Date: 3/2013
5 #
6 # Makefile for program strip6in4
7 ###############################################################################
8
9 CFLAGS= -O2 -Wall -Werror -g
10
11 # for solaris, you probably want:
12 #       LDLIBS = -lpcap -lnsl -lsocket
13 # for HP, I'm told that you need:
14 #       LDLIBS = -lpcap -lstr
15 # everybody else (that I know of) just needs:
16 #       LDLIBS = -lpcap
17 LDLIBS = -lpcap
18
19 BINDIR = /usr/local/bin
20 MANDIR = /usr/local/man
21
22
23 all: strip6in4 strip6in4.1
24
25 strip6in4: strip6in4.o encap.o
26         gcc ${CFLAGS} --std=gnu99 strip6in4.o encap.o -ostrip6in4 ${LDLIBS}
27
28 strip6in4.o: strip6in4.h strip6in4.c
29         gcc ${CFLAGS} ${LDLIBS} --std=gnu99 -c strip6in4.c -ostrip6in4.o
30
31 encap.o: encap.c strip6in4.h encap.h
32         gcc ${CFLAGS} ${LDLIBS} --std=gnu99 -c encap.c -oencap.o
33
34 strip6in4.1: strip6in4.pod
35         pod2man -s 1 -c "strip6in4" strip6in4.pod > strip6in4.1
36
37 install: strip6in4
38         install -m 755 -o bin -g bin strip6in4 ${BINDIR}/strip6in4
39         install -m 444 -o bin -g bin strip6in4.1 ${MANDIR}/man1/strip6in4.1
40
41 uninstall:
42         rm -f ${BINDIR}/strip6in4
43         rm -f ${MANDIR}/man1/strip6in4.1
44
45 clean:
46         rm -f *~ strip6in4 core *.o strip6in4.1