0
|
1 |
#
|
|
2 |
# CDDL HEADER START
|
|
3 |
#
|
|
4 |
# The contents of this file are subject to the terms of the
|
|
5 |
# Common Development and Distribution License (the "License").
|
|
6 |
# You may not use this file except in compliance with the License.
|
|
7 |
#
|
|
8 |
# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
|
|
9 |
# or http://www.opensolaris.org/os/licensing.
|
|
10 |
# See the License for the specific language governing permissions
|
|
11 |
# and limitations under the License.
|
|
12 |
#
|
|
13 |
# When distributing Covered Code, include this CDDL HEADER in each
|
|
14 |
# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
|
|
15 |
# If applicable, add the following below this CDDL HEADER, with the
|
|
16 |
# fields enclosed by brackets "[]" replaced with your own identifying
|
|
17 |
# information: Portions Copyright [yyyy] [name of copyright owner]
|
|
18 |
#
|
|
19 |
# CDDL HEADER END
|
|
20 |
#
|
13
|
21 |
# Copyright (c) 2008, 2010, Oracle and/or its affiliates. All rights reserved.
|
0
|
22 |
#
|
13
|
23 |
|
|
24 |
#ident "@(#)Makefile.sfw 1.4 10/04/15 SMI"
|
0
|
25 |
|
|
26 |
include ../Makefile.lib
|
|
27 |
|
3
|
28 |
VER=libpcap-1.0.0
|
0
|
29 |
VER64=$(VER)-64
|
|
30 |
TARBALL = $(VER).tar.gz
|
|
31 |
|
|
32 |
# Common environment variables
|
|
33 |
MAKE=$(GMAKE)
|
|
34 |
TARGET_COMENV += INSTALL=/usr/bin/ginstall
|
|
35 |
TARGET_COMENV += PATH="$(SFW_PATH)"
|
|
36 |
TARGET_COMENV += MAKE="$(GMAKE)"
|
3
|
37 |
TARGET_COMENV += LIBS="$(LIBS)"
|
13
|
38 |
TARGET_COMENV += "ac_cv_func_getifaddrs=no"
|
3
|
39 |
PATCHES:sh = echo Patches/*.patch
|
|
40 |
|
0
|
41 |
|
|
42 |
# environment variables for 32-bit
|
|
43 |
TARGET_ENV += CC="$(CC)"
|
3
|
44 |
TARGET_ENV += CFLAGS="$(CFLAGS) -I. -xstrconst $($(MACH)_C_PICFLAGS) -DHAVE_CONFIG_H -D_U_="""
|
0
|
45 |
TARGET_ENV += $(TARGET_COMENV)
|
|
46 |
|
|
47 |
TARGET_ENV64 += CFLAGS="$(CFLAGS64) -I. -xstrconst $($(MACH64)_C_PICFLAGS) \
|
3
|
48 |
-DHAVE_CONFIG_H -D_U_="""
|
0
|
49 |
TARGET_ENV64 += CC="$(CC64)"
|
|
50 |
TARGET_ENV64 += $(TARGET_COMENV)
|
3
|
51 |
CONFIGURE_OPTIONS += --enable-ipv6
|
|
52 |
|
|
53 |
CFGMAN3PCAP = $(CFGMAN)/man3pcap
|
|
54 |
ROOTMAN3PCAP = $(ROOT)$(CFGMAN3PCAP)
|
0
|
55 |
|
|
56 |
all : all32 all64
|
|
57 |
|
|
58 |
all32: $(VER)/config.status
|
|
59 |
(cd $(VER); env $(TARGET_ENV) $(MAKE) shared)
|
|
60 |
|
|
61 |
all64: $(VER64)/config.status
|
|
62 |
(cd $(VER64); env $(TARGET_ENV64) $(MAKE) shared)
|
|
63 |
|
|
64 |
install: all
|
3
|
65 |
mkdir -m 755 -p $(ROOTINCLUDE) $(ROOTINCLUDE)/pcap
|
|
66 |
for i in $(ROOT) $(ROOT)$(CFGPREFIX) $(ROOT)$(CFGPREFIX)/share \
|
|
67 |
$(ROOT)$(CFGMAN) $(ROOTMAN3PCAP); do \
|
|
68 |
mkdir -m 755 -p $$i; \
|
|
69 |
done
|
|
70 |
ROOTLIB=$(ROOTLIB) ROOTINCLUDE=$(ROOTINCLUDE) ROOTMAN3PCAP=$(ROOTMAN3PCAP) $(SH) ./install-sfw
|
|
71 |
ROOTLIB64=$(ROOTLIB64) MACH64=$(MACH64) $(SH) ./install-sfw-64
|
0
|
72 |
|
|
73 |
real-all: all32 all64
|
|
74 |
|
|
75 |
$(VER)/config.status: $(VER)/configure
|
|
76 |
(cd $(VER); "/usr/bin/autoconf"; env $(TARGET_ENV) \
|
|
77 |
./configure $(CONFIGURE_OPTIONS))
|
|
78 |
|
|
79 |
# Running 'autoconf' as configure.in has been patched.
|
|
80 |
$(VER64)/config.status: $(VER64)/configure
|
|
81 |
(cd $(VER64); "/usr/bin/autoconf"; env $(TARGET_ENV64) \
|
|
82 |
./configure $(CONFIGURE_OPTIONS))
|
|
83 |
|
|
84 |
# Running 'autoheader' as configure.in has been patched.
|
3
|
85 |
$(VER)/configure: $(VER)/.patched
|
0
|
86 |
(cd $(VER);"/usr/bin/autoheader";)
|
|
87 |
|
3
|
88 |
$(VER64)/configure: $(VER64)/.patched
|
0
|
89 |
(cd $(VER64);"/usr/bin/autoheader";)
|
|
90 |
|
|
91 |
clean:
|
|
92 |
-rm -rf $(VER)
|
|
93 |
-rm -rf $(VER64)
|
|
94 |
|
|
95 |
install_h:
|
|
96 |
|
|
97 |
include ../Makefile.targ
|