File: Makefile

package info (click to toggle)
lltdscan 0+20180223-1
  • links: PTS
  • area: main
  • in suites: bullseye, sid
  • size: 112 kB
  • sloc: ansic: 382; makefile: 128
file content (55 lines) | stat: -rw-r--r-- 1,399 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
TARGETS=lltdscan

CD=cd
CP=cp
TAR=tar
GPG=gpg
MAKE=make
RM=rm
SUDO=sudo

CC=gcc
# explicit pcap include dir is for redhat which is fux0red
CFLAGS=-g -I/usr/include -L/usr//lib -DFINDIF=$(FINDIF) -DUSE_NETIF=$(USE_NETIF) -DOPENBSD=$(OPENBSD) -DLINUX=$(LINUX) -DSOLARIS=$(SOLARIS) -DFREEBSD=$(FREEBSD) -DMACOSX=$(MACOSX) -I/usr/include/pcap -L/opt/csw/lib -R/opt/csw/lib

CFLAGS2=-g -I/usr/include -I/usr/include/libnet-1.1 -I/usr/include/pcap -I/usr/include/libnet11
LDFLAGS2=-g -L/usr/lib -L/usr/lib/libnet-1.1 -L/opt/csw/lib -L/usr/lib/libnet11 -L/usr/lib/libnet113

all: lltdscan

doc: arping.yodl
	yodl2man -o arping.8 arping.yodl

#install:
#	install -c lltdscan /usr/bin/lltdscan
#	install lltdscan.8 /usr/man/man8/lltdscan.8

SYS=$(shell uname -s)
ifeq ($(SYS),SunOS)
EXTRA_LIBS=-lsocket -lnsl
endif

lltdscan: lltdscan.c lltd.c
	$(CC) $(CFLAGS2) $(LDFLAGS2) -o lltdscan lltdscan.c -lnet -lpcap -lrt $(EXTRA_LIBS)

clean:
	rm -f *.o $(TARGETS)

distclean: clean
	rm -f config{.cache,.h,.log,.status}

V=$(shell grep version arping-2/arping.c|grep const|sed 's:[a-z =]*::;s:f;::')
DFILE=arping-$(V).tar.gz
DDIR=arping-$(V)
dist:
	($(CD) ..; \
	$(CP) -ax arping $(DDIR); \
	$(RM) -fr $(DDIR)/{.\#*,CVS,.svn,*~} \
		$(DDIR)/arping-2/{.\#*,CVS,.svn,*~}; \
	$(MAKE) -C $(DDIR) doc; \
	$(TAR) cfz $(DFILE) $(DDIR); \
	$(GPG) -b -a $(DFILE); \
	)

maintainerclean: distclean
	rm -f config{.h.in,ure}