Debian Codegraph @

Makefile

raw ◀ ▶
Source reconstructed at patch state 2 of 4 — not the installed (fully patched) source.
4 Debian patches touch this file
1 #!/usr/bin/make -f
2
3 prefix ?= /usr/local
4
5 # Seems that RedHat keeps the pcap headers elsewhere...
6 # Uncomment the below line for RH systems.
7 #CFLAGS=-Wall -ggdb -lpcap -I/usr/include/pcap
8
9 # Standard build with pcap installed on the system
10 #CFLAGS = -Wall -W -O2
11 #CFLAGS = -Wall -W -ggdb
12
13 # Build for the Zaurus with the pcap headers/libs one dir up
14 #CFLAGS = -DZAURUS -Wall -I. -I../libpcap-0.7.1 -L../libpcap-0.7.1 -ggdb
15
16 # Build for Solaris with the pcap headers/libs one dir up
17 #CFLAGS = -DSOLARIS -Wall -I. -I../libpcap-0.7.1 -L../libpcap-0.7.1 -ggdb
18
19 LDFLAGS = -lpcap
20
21 # Build for Solaris
22 #LDFLAGS = -lsocket -lnsl -lpcap
23
24 all: cdpr
25
26 cdpr.o: cdpr.c cdp.h cdpr.h
27 gcc -c $(CFLAGS) cdpr.c
28
29 cdprs.o: cdprs.c cdp.h cdpr.h
30 gcc -c $(CFLAGS) cdprs.c
31
32 conffile.o: conffile.c cdp.h cdpr.h
33 gcc -c $(CFLAGS) conffile.c
34
35 cdpr: cdpr.o cdprs.o conffile.o
36 gcc $(LDFLAGS) -o cdpr cdpr.o cdprs.o conffile.o
37
38 install: all
39 mkdir -p $(DESTDIR)$(prefix)/sbin/
40 install --mode=755 cdpr $(DESTDIR)$(prefix)/sbin/cdpr
41
42 clean:
43 rm -f *.o cdpr
44
45 distclean: clean
46
47 .PHONY: all install clean distclean