File: Makefile

package info (click to toggle)
arpon 2.0-2.1
  • links: PTS
  • area: main
  • in suites: wheezy
  • size: 564 kB
  • sloc: ansic: 2,275; sh: 168; makefile: 141
file content (82 lines) | stat: -rwxr-xr-x 3,146 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
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
SOURCE = src/arpon.c
EXEC = debian/build/src/arpon
EXEC_FILE = arpon
MAN = man8/arpon.8
FILE = etc/arpon.sarpi

CFLAGS += -g -Wall -Werror
LDFLAGS +=

LIBS_LINUX = -lpthread -lpcap -ldnet -lnet -L/usr/local/lib -I/usr/local/include
LIBS_DEBIAN = -lpthread -lpcap -ldumbnet -lnet -L/usr/lib -I/usr/include
LIBS_GENTOO = -lpthread -lpcap -ldnet -lnet -L/usr/lib -I/usr/include
LIBS_OSX = -lpthread -lpcap -ldnet -lnet -L/opt/local/lib/ -I/opt/local/include/
LIBS_FREEBSD = -lpthread -lpcap -ldnet -lnet -L/usr/local/lib -I/usr/local/include -L/usr/local/lib/libnet11 -I/usr/local/include/libnet11
LIBS_FREEBSD_NEW = -lpthread -lpcap -ldnet -lnet -L/usr/local/lib -I/usr/local/include -L/usr/local/lib/libnet113 -I/usr/local/include/libnet113 
LIBS_NETBSD = -lpthread -lpcap -ldnet -lnet -L/usr/local/lib -I/usr/local/include -L/usr/lib/libnet11 -I/usr/include/libnet11
LIBS_NETBSD_NEW = -lpthread -lpcap -ldnet -lnet -L/usr/pkg/lib -I/usr/pkg/include -L/usr/pkg/lib/libnet11 -I/usr/pkg/include/libnet11
LIBS_OPENBSD = -lpthread -lpcap -ldnet -lnet -L/usr/local/lib -I/usr/local/include -L/usr/lib/libnet11 -I/usr/include/libnet11
LIBS_OPENBSD_NEW = -lpthread -lpcap -ldnet -lnet -L/usr/local/lib -I/usr/local/include -L/usr/local/lib/libnet-1.1 -I/usr/local/include/libnet-1.1

arpon:
	@echo ""
	@echo "  Portings avaible:" 
	@echo ""
	@echo "  - Linux          run:  make linux"
	@echo "  - Linux Debian   run:  make debian"	
	@echo "  - Linux Gentoo   run:  make gentoo"
	@echo "  - Mac OS X       run:  make osx"
	@echo "  - FreeBSD        run:  make freebsd"
	@echo "  - FreeBSD new    run:  make freebsd_new"
	@echo "  - NetBSD         run:  make netbsd"
	@echo "  - NetBSD new     run:  make netbsd_new"
	@echo "  - OpenBSD        run:  make openbsd"
	@echo "  - OpenBSD new    run:  make openbsd_new"
	@echo ""
	@echo "  Have got problems? Read INSTALL file."	
	@echo ""

linux: $(SOURCE)
	gcc $(CFLAGS) $(LDFLAGS) $(LIBS_LINUX) -DLINUX -o $(EXEC) $(SOURCE)

debian: $(SOURCE)
	gcc $(CFLAGS) $(LDFLAGS) $(LIBS_DEBIAN) -DLINUX -DDEBIAN -o $(EXEC) $(SOURCE)

gentoo: $(SOURCE)
	gcc $(CFLAGS) $(LDFLAGS) $(LIBS_GENTOO) -DLINUX -o $(EXEC) $(SOURCE)

osx: $(SOURCE)
	gcc $(CFLAGS) $(LDFLAGS) $(LIBS_OSX) -o $(EXEC) $(SOURCE)

freebsd: $(SOURCE)
	gcc $(CFLAGS) $(LDFLAGS) $(LIBS_FREEBSD) -o $(EXEC) $(SOURCE)

freebsd_new: $(SOURCE)
	gcc $(CFLAGS) $(LDFLAGS) $(LIBS_FREEBSD_NEW) -o $(EXEC) $(SOURCE)

netbsd: $(SOURCE)
	gcc $(CFLAGS) $(LDFLAGS) $(LIBS_NETBSD) -DNETBSD -o $(EXEC) $(SOURCE)

netbsd_new: $(SOURCE)
	gcc $(CFLAGS) $(LDFLAGS) $(LIBS_NETBSD_NEW) -DNETBSD -o $(EXEC) $(SOURCE) /usr/pkg/lib/libnet11/libnet.a

openbsd: $(SOURCE)
	gcc $(CFLAGS) $(LDFLAGS) $(LIBS_OPENBSD) -DOPENBSD -o $(EXEC) $(SOURCE)

openbsd_new: $(SOURCE)
	gcc $(CFLAGS) $(LDFLAGS) $(LIBS_OPENBSD_NEW) -DOPENBSD -o $(EXEC) $(SOURCE)

clean:
	rm -f $(EXEC)

install:
	cp $(EXEC) $(DESTDIR)/usr/sbin/
	cp $(FILE) $(DESTDIR)/etc
	cp $(MAN) $(DESTDIR)/usr/share/man/man8/

uninstall:
	rm -f $(DESTDIR)/sbin/$(EXEC_FILE)
	rm -f $(DESTDIR)/$(FILE)
	rm -f $(DESTDIR)/usr/share/man/$(MAN)

.PHONY: arpon osx freebsd netbsd openbsd linux debian gentoo clean install uninstall