File: Makefile

package info (click to toggle)
cdpr 2.2.1-1
  • links: PTS
  • area: main
  • in suites: etch, etch-m68k, lenny, squeeze
  • size: 160 kB
  • ctags: 79
  • sloc: ansic: 1,020; perl: 68; makefile: 46; php: 22
file content (37 lines) | stat: -rw-r--r-- 905 bytes parent folder | download
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
#!/usr/bin/make -f

prefix ?= /usr/local

# Seems that RedHat keeps the pcap headers elsewhere...
# Uncomment the below line for RH systems.
#CFLAGS=-Wall -ggdb -lpcap -I/usr/include/pcap

# Standard build with pcap installed on the system
CFLAGS = -Wall -W -O2 -ggdb

# Build for the Zaurus with the pcap headers/libs one dir up
#CFLAGS = -DZAURUS -Wall -I. -I../libpcap-0.7.1 -L../libpcap-0.7.1 -ggdb

# Build for Solaris with the pcap headers/libs one dir up
#CFLAGS = -DSOLARIS -Wall -I. -I../libpcap-0.7.1 -L../libpcap-0.7.1 -ggdb

LDFLAGS = -lpcap

# Build for Solaris
#LDFLAGS = -lsocket -lnsl -lpcap

all: cdpr

cdpr: cdpr.c cdprs.c conffile.c cdp.h cdpr.h
	gcc $(CFLAGS) cdpr.c cdprs.c conffile.c $(LDFLAGS) -o cdpr

install: all
	mkdir -p $(DESTDIR)$(prefix)/sbin/
	install --mode=755 cdpr $(DESTDIR)$(prefix)/sbin/cdpr

clean:
	rm -f cdpr

distclean: clean

.PHONY: all install clean distclean