File: Makefile

package info (click to toggle)
driftnet 0.1.4-4
  • links: PTS
  • area: main
  • in suites: woody
  • size: 144 kB
  • ctags: 159
  • sloc: ansic: 1,157; makefile: 81
file content (66 lines) | stat: -rw-r--r-- 1,516 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
#
# Makefile:
# Makefile for driftnet.
#
# Copyright (c) 2001 Chris Lightfoot. All rights reserved.
# Email: chris@ex-parrot.com; WWW: http://www.ex-parrot.com/~chris/
#
# $Id: Makefile,v 1.11 2001/09/11 09:33:41 chris Exp $
#

VERSION = 0.1.4

#CC = gcc

CFLAGS  += -g -Wall `gtk-config --cflags` -DDRIFTNET_VERSION='"$(VERSION)"'
LDFLAGS += -g
LDLIBS  += -lpcap -ljpeg -lungif `gtk-config --libs`

# This may or may not be necessary on your system.
CFLAGS  += -I/usr/include/pcap

SUBDIRS = 

BINDIR = $(DESTDIR)/usr/bin
MANDIR = $(DESTDIR)/usr/share/man/man1
TXTS = README TODO COPYING CHANGES CREDITS
SRCS = gif.c img.c jpeg.c png.c driftnet.c image.c display.c
HDRS = img.h driftnet.h
BINS = driftnet

OBJS = $(SRCS:.c=.o)

driftnet:   depend $(OBJS)
	$(CC) -o driftnet $(OBJS) $(LDFLAGS) $(LDLIBS)

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

install: driftnet
	install -D -oroot -groot -m0755 driftnet $(BINDIR)/driftnet
	install -D -oroot -groot -m0644 driftnet.1 $(MANDIR)/driftnet.1

clean:  nodepend
	rm -f *~ *.bak *.o core $(BINS) TAGS

tags:
	etags *.c *.h

tarball: nodepend $(SRCS) $(HDRS) $(TXTS)
	mkdir driftnet-$(VERSION)
	set -e ; for i in Makefile $(SRCS) $(HDRS) $(TXTS) ; do cp $$i driftnet-$(VERSION)/$$i ; done
	tar cvzf driftnet-$(VERSION).tar.gz driftnet-$(VERSION)
	rm -rf driftnet-$(VERSION)
	mv driftnet-$(VERSION).tar.gz ..
	

depend:
	makedepend -- $(CFLAGS) -- $(SRCS)
	touch depend
	rm -f Makefile.bak

nodepend:
	makedepend -- --
	rm -f depend Makefile.bak

# DO NOT DELETE