1 # $Id: Makefile.in,v 1.7 2002/09/18 15:29:46 pkj Exp $
2 # Copyright (c) 1993, 1994, 1995, 1996
3 # The Regents of the University of California. All rights reserved.
5 # Redistribution and use in source and binary forms, with or without
6 # modification, are permitted provided that: (1) source code distributions
7 # retain the above copyright notice and this paragraph in its entirety, (2)
8 # distributions including binary code include the above copyright notice and
9 # this paragraph in its entirety in the documentation or other materials
10 # provided with the distribution, and (3) all advertising materials mentioning
11 # features or use of this software display the following acknowledgement:
12 # ``This product includes software developed by the University of California,
13 # Lawrence Berkeley Laboratory and its contributors.'' Neither the name of
14 # the University nor the names of its contributors may be used to endorse
15 # or promote products derived from this software without specific prior
17 # THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR IMPLIED
18 # WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF
19 # MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
21 # @(#) $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)
24 # Various configurable paths (remember to edit Makefile.in, not Makefile)
29 exec_prefix = @
exec_prefix@
30 # Pathname of directory to install the include files
31 INCLDEST
= @
includedir@
32 # Pathname of directory to install the library
34 # Pathname of directory to install the man page
42 # You shouldn't need to edit anything below.
51 AXIS_USABLE_LIBS
= UCLIBC GLIBC
52 -include $(AXIS_TOP_DIR
)/tools
/build
/Rules.axis
62 CFLAGS
+= $(CCOPT
) $(INCLS
) $(DEFS
)
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.
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.
78 $(CC
) $(CFLAGS
) -c
$(srcdir)/$*.c
80 PSRC
= pcap-@V_PCAP@.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
85 SRC
= $(PSRC
) $(CSRC
) $(GENSRC
)
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
99 $(SRC
) $(HDR
) $(TAGHDR
)
101 CLEANFILES
= $(OBJ
) libpcap.a
$(GENSRC
) $(GENHDR
) lex.yy.c
110 scanner.c
: $(srcdir)/scanner.l
112 $(LEX
) -t
$< > $$$$.
$@
; mv
$$$$.
$@
$@
114 scanner.o
: scanner.c tokdefs.h
116 grammar.c
: $(srcdir)/grammar.y
117 @
rm -f grammar.c tokdefs.h
124 $(CC
) $(CFLAGS
) -Dyylval
=pcap_lval
-c grammar.c
127 version.c
: $(srcdir)/VERSION
129 sed
-e
's/.*/char pcap_version[] = "&";/' $(srcdir)/VERSION
> $@
132 $(INSTALL
) -m
444 -o bin
-g bin libpcap.a
$(DESTDIR
)$(LIBDEST
)/libpcap.a
133 $(RANLIB
) $(DESTDIR
)$(LIBDEST
)/libpcap.a
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
144 $(INSTALL
) -m
444 -o bin
-g bin
$(srcdir)/pcap
.3 \
145 $(DESTDIR
)$(MANDEST
)/man3
/pcap
.3
151 rm -f
$(CLEANFILES
) Makefile config.cache config.log config.status \
152 gnuc.h os-proto.h bpf_filter.c net
155 ctags
-wtd
$(TAGFILES
)
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
; \
162 "rm -f ../$$name; ln -s $$dir ../$$name" ; \
163 rm -f ..
/$$name; ln
-s
$$dir ..
/$$name ; \
165 "(cd .. ; $$tar - [lots of files]) | compress > /tmp/$$name.tar.Z" ; \
166 (cd ..
; $$tar - $$list) | compress
> /tmp
/$$name.
tar.Z
; \
168 "rm -f ../$$name" ; \
172 depend
: $(GENSRC
) force
173 .
/mkdep
-c
$(CC
) $(DEFS
) $(INCLS
) $(SRC
)