usr/src/lib/libpcap/Makefile.sfw
author Jon Tibble <meths@btinternet.com>
Mon, 04 May 2015 14:04:39 +0100
branchoi_151a
changeset 254 9c2a4ac793f0
parent 209 44a8c4ba6ecc
permissions -rw-r--r--
Bash patch catchup including shellshock

#
# CDDL HEADER START
#
# The contents of this file are subject to the terms of the
# Common Development and Distribution License (the "License").
# You may not use this file except in compliance with the License.
#
# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
# or http://www.opensolaris.org/os/licensing.
# See the License for the specific language governing permissions
# and limitations under the License.
#
# When distributing Covered Code, include this CDDL HEADER in each
# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
# If applicable, add the following below this CDDL HEADER, with the
# fields enclosed by brackets "[]" replaced with your own identifying
# information: Portions Copyright [yyyy] [name of copyright owner]
#
# CDDL HEADER END
#
# Copyright (c) 2008, 2010, Oracle and/or its affiliates. All rights reserved.
#

#ident	"@(#)Makefile.sfw	1.5	10/11/01 SMI"

include ../Makefile.lib

VER=libpcap-1.1.1
VER64=$(VER)-64
TARBALL =	$(VER).tar.gz

# Common environment variables
MAKE=$(GMAKE)
TARGET_COMENV +=	INSTALL=/usr/bin/ginstall
TARGET_COMENV +=	PATH="$(SFW_PATH)"
TARGET_COMENV +=	MAKE="$(GMAKE)"
TARGET_COMENV +=	LIBS="$(LIBS)"
TARGET_COMENV +=	"ac_cv_func_getifaddrs=no"

# environment variables for 32-bit
TARGET_ENV +=	CC="$(CC)"
TARGET_ENV += CFLAGS="$(CFLAGS) -I. -xstrconst $($(MACH)_C_PICFLAGS) -DHAVE_CONFIG_H -D_U_="""
TARGET_ENV +=	$(TARGET_COMENV)

TARGET_ENV64 +=	CFLAGS="$(CFLAGS64) -I. -xstrconst $($(MACH64)_C_PICFLAGS) \
	-DHAVE_CONFIG_H -D_U_="""
TARGET_ENV64 +=	CC="$(CC64) -m64"
TARGET_ENV64 +=	$(TARGET_COMENV)
CONFIGURE_OPTIONS +=	--enable-ipv6

CFGMAN3PCAP =		$(CFGMAN)/man3pcap
ROOTMAN3PCAP =		$(ROOT)$(CFGMAN3PCAP)

all : all32 all64

all32: $(VER)/config.status
	(cd $(VER); env $(TARGET_ENV) $(MAKE) shared) 

all64: $(VER64)/config.status
	(cd $(VER64); env $(TARGET_ENV64) $(MAKE) shared)

install: all
	mkdir -m 755 -p $(ROOTINCLUDE) $(ROOTINCLUDE)/pcap
	for i in $(ROOT) $(ROOT)$(CFGPREFIX) $(ROOT)$(CFGPREFIX)/share \
	    $(ROOT)$(CFGMAN) $(ROOTMAN3PCAP); do \
		mkdir -m 755 -p $$i; \
	done
	ROOTLIB=$(ROOTLIB) ROOTINCLUDE=$(ROOTINCLUDE) ROOTMAN3PCAP=$(ROOTMAN3PCAP) $(SH) ./install-sfw
	ROOTLIB64=$(ROOTLIB64) MACH64=$(MACH64) $(SH) ./install-sfw-64

real-all: all32 all64

$(VER)/config.status: $(VER)/configure
	(cd $(VER); "/usr/bin/autoconf"; env $(TARGET_ENV) \
	    ./configure $(CONFIGURE_OPTIONS))

# Running 'autoconf' as configure.in has been patched. 
$(VER64)/config.status: $(VER64)/configure
	(cd $(VER64); "/usr/bin/autoconf"; env $(TARGET_ENV64) \
	    ./configure $(CONFIGURE_OPTIONS))

# Running 'autoheader' as configure.in has been patched. 
$(VER)/configure: $(VER)/.patched
	(cd $(VER);"/usr/bin/autoheader";)

$(VER64)/configure: $(VER64)/.patched
	(cd $(VER64);"/usr/bin/autoheader";)

clean:
	-rm -rf $(VER)
	-rm -rf $(VER64)

install_h:

include ../Makefile.targ