-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathGNUmakefile
65 lines (53 loc) · 1.41 KB
/
GNUmakefile
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
#
# SI6 Networks' ipv6mon Makefile (for GNU make)
#
# Notes to package developers:
#
# By default, binaries will be installed in /usr/local/bin, manual pages in
# /usr/local/man, and configuration file in /etc
#
# The path of the binaries can be overriden by setting "PREFIX" variable
# accordingly. The path of the manual pages can be overriden by setting
# the MANPREFIX variable. Typically, packages will set these variables as
# follows:
#
# PREFIX=/usr/
# MANPREFIX=/usr/share
#
# Finally, please note that this makefile supports the DESTDIR variable, as
# typically employed by package developers.
CC= gcc
CFLAGS+= -Wall -Wno-address-of-packed-member -Wno-missing-braces
LDFLAGS+= -lpcap -lm
ifeq ($(shell uname),SunOS)
LDFLAGS+=-lsocket -lnsl
OS=SunOS
endif
ifndef PREFIX
PREFIX=/usr/local
ifndef MANPREFIX
MANPREFIX=/usr/local
endif
else
ifndef MANPREFIX
MANPREFIX=/usr/share
endif
endif
ETCPATH= $(DESTDIR)/etc
MANPATH= $(DESTDIR)$(MANPREFIX)/man
BINPATH= $(DESTDIR)$(PREFIX)/bin
SBINPATH= $(DESTDIR)$(PREFIX)/sbin
SRCPATH= .
SBINTOOLS= ipv6mon
BINTOOLS=
TOOLS= $(BINTOOLS) $(SBINTOOLS)
LIBS=
all: $(TOOLS)
ipv6mon: $(SRCPATH)/ipv6mon.c $(SRCPATH)/ipv6mon.h
$(CC) $(CPPFLAGS) $(CFLAGS) -o ipv6mon $(SRCPATH)/ipv6mon.c $(LIBS) $(LDFLAGS)
clean:
rm -f $(TOOLS) $(LIBS)
install: all
echo "Please use the platform-specific scripts."
uninstall:
echo "Please use the platform-specific scripts."