File: Makefile

package info (click to toggle)
cdpr 2.4-3
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, bullseye, forky, sid, trixie
  • size: 292 kB
  • sloc: ansic: 1,074; perl: 72; makefile: 23; php: 23
file content (41 lines) | stat: -rw-r--r-- 976 bytes parent folder | download | duplicates (2)
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
#!/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
#CFLAGS = -Wall -W -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

LIBS = -lpcap

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

all: cdpr

%.o:%.c cdp.h cdpr.h
	$(CC) $(CPPFLAGS) $(CFLAGS) -c -o $@ $<

cdpr: cdpr.o cdprs.o conffile.o
	$(CC) $(LDFLAGS) -o cdpr cdpr.o cdprs.o conffile.o $(LIBS)

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

clean:
	rm -f *.o cdpr

distclean: clean

.PHONY: all install clean distclean