add initial support for the crisarchitecture used on foxboards to openwrt
[openwrt/svn-archive/archive.git] / target / linux / etrax-2.6 / image / e100boot / src / libpcap-0.4 / Makefile
1 # Generated automatically from Makefile.in by configure.
2 # $Id: Makefile.in,v 1.7 2002/09/18 15:29:46 pkj Exp $
3 # Copyright (c) 1993, 1994, 1995, 1996
4 # The Regents of the University of California. All rights reserved.
5 #
6 # Redistribution and use in source and binary forms, with or without
7 # modification, are permitted provided that: (1) source code distributions
8 # retain the above copyright notice and this paragraph in its entirety, (2)
9 # distributions including binary code include the above copyright notice and
10 # this paragraph in its entirety in the documentation or other materials
11 # provided with the distribution, and (3) all advertising materials mentioning
12 # features or use of this software display the following acknowledgement:
13 # ``This product includes software developed by the University of California,
14 # Lawrence Berkeley Laboratory and its contributors.'' Neither the name of
15 # the University nor the names of its contributors may be used to endorse
16 # or promote products derived from this software without specific prior
17 # written permission.
18 # THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR IMPLIED
19 # WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF
20 # MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
21 #
22 # @(#) $Header: /usr/local/cvs/linux/tools/build/e100boot/libpcap-0.4/Makefile.in,v 1.7 2002/09/18 15:29:46 pkj Exp $ (LBL)
23
24 #
25 # Various configurable paths (remember to edit Makefile.in, not Makefile)
26 #
27
28 # Top level hierarchy
29 prefix = /usr/local
30 exec_prefix = ${prefix}
31 # Pathname of directory to install the include files
32 INCLDEST = ${prefix}/include
33 # Pathname of directory to install the library
34 LIBDEST = ${exec_prefix}/lib
35 # Pathname of directory to install the man page
36 MANDEST = ${prefix}/man
37
38 # VPATH
39 srcdir = .
40
41 #
42 # You shouldn't need to edit anything below.
43 #
44 CFLAGS =
45 CC = gcc
46 AR = ar
47 INSTALL = install_elinux -p
48 RANLIB = ranlib
49
50 prefix =
51 AXIS_USABLE_LIBS = UCLIBC GLIBC
52 -include $(AXIS_TOP_DIR)/tools/build/Rules.axis
53 ifndef AXIS_BUILDTYPE
54 prefix = /usr/local
55 endif
56
57 CCOPT = -O2
58 INCLS = -I. -Ilinux-include
59 DEFS = -DHAVE_MALLOC_H=1 -DHAVE_ETHER_HOSTTON=1 -DHAVE_STRERROR=1 -DHAVE_NET_IF_ARP_H=1
60
61 # Standard CFLAGS
62 CFLAGS += $(CCOPT) $(INCLS) $(DEFS)
63
64
65 #
66 # Flex and bison allow you to specify the prefixes of the global symbols
67 # used by the generated parser. This allows programs to use lex/yacc
68 # and link against libpcap. If you don't have flex or bison, get them.
69 #
70 LEX = flex -Ppcap_
71 YACC = bison -y -p pcap_
72
73 # Explicitly define compilation rule since SunOS 4's make doesn't like gcc.
74 # Also, gcc does not remove the .o before forking 'as', which can be a
75 # problem if you don't own the file but can write to the directory.
76 .c.o:
77 @rm -f $@
78 $(CC) $(CFLAGS) -c $(srcdir)/$*.c
79
80 PSRC = pcap-linux.c
81 CSRC = pcap.c inet.c gencode.c optimize.c nametoaddr.c \
82 etherent.c savefile.c bpf_filter.c bpf_image.c
83 GENSRC = scanner.c grammar.c version.c
84
85 SRC = $(PSRC) $(CSRC) $(GENSRC)
86
87 # We would like to say "OBJ = $(SRC:.c=.o)" but Ultrix's make cannot
88 # hack the extra indirection
89 OBJ = $(PSRC:.c=.o) $(CSRC:.c=.o) $(GENSRC:.c=.o)
90 HDR = pcap.h pcap-int.h pcap-namedb.h pcap-nit.h pcap-pf.h \
91 ethertype.h gencode.h gnuc.h
92 GENHDR = \
93 tokdefs.h
94
95 TAGHDR = \
96 bpf/net/bpf.h
97
98 TAGFILES = \
99 $(SRC) $(HDR) $(TAGHDR)
100
101 CLEANFILES = $(OBJ) libpcap.a $(GENSRC) $(GENHDR) lex.yy.c
102
103 all: libpcap.a
104
105 libpcap.a: $(OBJ)
106 @rm -f $@
107 $(AR) rc $@ $(OBJ)
108 $(RANLIB) $@
109
110 scanner.c: $(srcdir)/scanner.l
111 @rm -f $@
112 $(LEX) -t $< > $$$$.$@; mv $$$$.$@ $@
113
114 scanner.o: scanner.c tokdefs.h
115 tokdefs.h: grammar.c
116 grammar.c: $(srcdir)/grammar.y
117 @rm -f grammar.c tokdefs.h
118 $(YACC) -d $<
119 mv y.tab.c grammar.c
120 mv y.tab.h tokdefs.h
121
122 grammar.o: grammar.c
123 @rm -f $@
124 $(CC) $(CFLAGS) -Dyylval=pcap_lval -c grammar.c
125
126 version.o: version.c
127 version.c: $(srcdir)/VERSION
128 @rm -f $@
129 sed -e 's/.*/char pcap_version[] = "&";/' $(srcdir)/VERSION > $@
130
131 install: force
132 $(INSTALL) -m 444 -o bin -g bin libpcap.a $(DESTDIR)$(LIBDEST)/libpcap.a
133 $(RANLIB) $(DESTDIR)$(LIBDEST)/libpcap.a
134
135 install-incl: force
136 $(INSTALL) -m 444 -o bin -g bin $(srcdir)/pcap.h \
137 $(DESTDIR)$(INCLDEST)/pcap.h
138 $(INSTALL) -m 444 -o bin -g bin $(srcdir)/pcap-namedb.h \
139 $(DESTDIR)$(INCLDEST)/pcap-namedb.h
140 $(INSTALL) -m 444 -o bin -g bin $(srcdir)/net/bpf.h \
141 $(DESTDIR)$(INCLDEST)/net/bpf.h
142
143 install-man: force
144 $(INSTALL) -m 444 -o bin -g bin $(srcdir)/pcap.3 \
145 $(DESTDIR)$(MANDEST)/man3/pcap.3
146
147 clean:
148 rm -f $(CLEANFILES)
149
150 distclean:
151 rm -f $(CLEANFILES) Makefile config.cache config.log config.status \
152 gnuc.h os-proto.h bpf_filter.c net
153
154 tags: $(TAGFILES)
155 ctags -wtd $(TAGFILES)
156
157 tar: force
158 @cwd=`pwd` ; dir=`basename $$cwd` ; name=libpcap-`cat VERSION` ; \
159 list="" ; tar="tar chFFf" ; \
160 for i in `cat FILES` ; do list="$$list $$name/$$i" ; done; \
161 echo \
162 "rm -f ../$$name; ln -s $$dir ../$$name" ; \
163 rm -f ../$$name; ln -s $$dir ../$$name ; \
164 echo \
165 "(cd .. ; $$tar - [lots of files]) | compress > /tmp/$$name.tar.Z" ; \
166 (cd .. ; $$tar - $$list) | compress > /tmp/$$name.tar.Z ; \
167 echo \
168 "rm -f ../$$name" ; \
169 rm -f ../$$name
170
171 force: /tmp
172 depend: $(GENSRC) force
173 ./mkdep -c $(CC) $(DEFS) $(INCLS) $(SRC)