File: Makefile

package info (click to toggle)
ptunnel 0.61-2
  • links: PTS
  • area: main
  • in suites: lenny
  • size: 196 kB
  • ctags: 291
  • sloc: ansic: 1,378; makefile: 33
file content (41 lines) | stat: -rw-r--r-- 766 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
# Makefile for the pingtunnel utility
# (c) 2004-2005 Daniel Stdle, daniels@stud.cs.uit.no

CC	 		= gcc
CFLAGS		= -Wall -g
LDOPTS		= -lpthread -lpcap
PT_OBJS		= ptunnel.o md5.o
prefix		= ${DESTDIR}/usr
bindir		= $(prefix)/sbin
mandir		= $(prefix)/share/man/man8

all: ptunnel

dist:
	rm -rf PingTunnel/
	mkdir PingTunnel
	cp ptunnel.c ptunnel.h Makefile.dist PingTunnel/
	mv PingTunnel/Makefile.dist PingTunnel/Makefile
	

install: ptunnel
	install -d $(bindir)/
	install -d $(mandir)/
	install ./ptunnel $(bindir)/ptunnel
	install ./ptunnel.8 $(mandir)/ptunnel.8

ptunnel: $(PT_OBJS)
	$(CC) -o $@ $^ $(LDOPTS)

clean:
	rm -f *.o ptunnel
	rm -f .depend

depend: .depend
.depend:
	$(CC) $(CFLAGS) -MM *.c > $@

%.o:%.c
	$(CC) $(CFLAGS) -c -o $@ $<

-include .depend