]> pilppa.org Git - familiar-h63xx-build.git/blob - org.handhelds.familiar/packages/driftnet/driftnet-0.1.6/Makefile
OE tree imported from monotone branch org.openembedded.oz354fam083 at revision 8b12e3...
[familiar-h63xx-build.git] / org.handhelds.familiar / packages / driftnet / driftnet-0.1.6 / Makefile
1 #
2 # Makefile:
3 # Makefile for driftnet.
4 #
5 # Copyright (c) 2001 Chris Lightfoot. All rights reserved.
6 # Email: chris@ex-parrot.com; WWW: http://www.ex-parrot.com/~chris/
7 #
8 # $Id: Makefile,v 1.34 2002/07/09 17:30:42 chris Exp $
9 #
10
11 #
12 # User-serviceable parts:
13 #
14
15 # Compiler to use.
16 CC = arm-linux-gcc
17
18 # Basic compiler, linker flags; should not need any changes.
19 CFLAGS += -g -Wall
20 LDFLAGS += -g
21
22 # You might need these if libpcap is installed somewhere random.
23 #CFLAGS += -I/usr/include/pcap
24 #LDFLAGS += -L/path/to/libpcap.so
25
26 # Required on Linux to get BSDish definitions of the TCP/IP structs.
27 CFLAGS += -D_BSD_SOURCE
28
29 # We always need the pcap and pthread libraries.
30 LDLIBS += -lpcap -lpthread
31
32 # Optional C compiler and linker flags. Typical driftnet builds have support
33 # for displaying captured images in an X window, and need the following flags:
34 CFLAGS  += -I$(STAGING_INCDIR)/glib-2.0 -I$(STAGING_INCDIR)/gtk-2.0 -I$(STAGING_INCDIR)/../lib/gtk-2.0/include -I$(STAGING_INCDIR)/atk-1.0
35 LDLIBS  += -ljpeg -lungif -lgtk -lgdk -rdynamic -lgmodule -lglib -ldl -lXi -lXext -lX11 -lm
36
37 # Alternatively, you can build a version of driftnet which can only be used
38 # in `adjunct' mode as the back end for some other image-processing program. To
39 # use this, comment out the two preceding CFLAGS and LDLIBS lines and uncomment
40 # the following line:
41 #CFLAGS += -DNO_DISPLAY_WINDOW
42
43 # On systems with a C99 compiler, driftnet will use <stdint.h> for the
44 # definitions of types such as uint8_t. On other systems like Solaris, these
45 # are in <sys/types.h>, and you should uncomment this line.
46 #CFLAGS += -DUSE_SYS_TYPES_H
47
48 # On Solaris, it is necessary to link against -lposix4 for the definition of
49 # nanosleep; uncomment the below.
50 #LDLIBS  += -lposix4
51
52 # added 20020604 edobbs
53 # On BSD systems, may need to use /usr/local/include
54 #CFLAGS += -I/usr/local/include
55
56
57 #
58 # No user-serviceable parts below this point.
59 #
60
61 # Driftnet version.
62 VERSION = 0.1.6
63 CFLAGS += -DDRIFTNET_VERSION='"$(VERSION)"'
64
65 SUBDIRS = 
66
67 TXTS = README TODO COPYING CHANGES CREDITS driftnet.1 driftnet.1.in endian.c
68 SRCS = audio.c mpeghdr.c gif.c img.c jpeg.c png.c driftnet.c image.c \
69        display.c playaudio.c connection.c media.c
70 HDRS = img.h driftnet.h mpeghdr.h
71 BINS = driftnet
72
73 OBJS = $(SRCS:.c=.o)
74
75 default: driftnet driftnet.1
76
77 driftnet:   depend $(OBJS)
78         $(CC) -o driftnet $(OBJS) $(LDFLAGS) $(LDLIBS)
79
80 driftnet.1: driftnet.1.in Makefile
81         ( echo '.\" DO NOT EDIT THIS FILE-- edit driftnet.1.in instead' ; sed s/@@@VERSION@@@/$(VERSION)/ ) < driftnet.1.in > driftnet.1
82
83 endianness: endian
84
85
86 endian: endian.c
87         $(CC) $(CFLAGS) -o endian endian.c
88
89 %.o:    %.c Makefile endianness
90         $(CC) $(CFLAGS) -DDRIFTNET_LITTLE_ENDIAN -c -o $@ $<
91
92 clean:  nodepend
93         rm -f *~ *.bak *.o core $(BINS) TAGS driftnet.1 endian endianness
94
95 tags:
96         etags *.c *.h
97
98 tarball: nodepend $(SRCS) $(HDRS) $(TXTS)
99         mkdir driftnet-$(VERSION)
100         set -e ; for i in Makefile $(SRCS) $(HDRS) $(TXTS) ; do cp $$i driftnet-$(VERSION)/$$i ; done
101         tar cvzf driftnet-$(VERSION).tar.gz driftnet-$(VERSION)
102         rm -rf driftnet-$(VERSION)
103         mv driftnet-$(VERSION).tar.gz ..
104         
105 depend: endianness
106         makedepend -- $(CFLAGS) -DDRIFTNET_LITTLE_ENDIAN -- $(SRCS)
107         touch depend
108         rm -f Makefile.bak
109
110 nodepend:
111         makedepend -- --
112         rm -f depend Makefile.bak
113
114 # DO NOT DELETE