Makefile revision 7008
0283e511317cae3785a9d48e236289a234a25368Mark Andrews
664e11f0b14c78cef7cf6b8c70323a1da494e351Mark Andrews# CDDL HEADER START
664e11f0b14c78cef7cf6b8c70323a1da494e351Mark Andrews#
0283e511317cae3785a9d48e236289a234a25368Mark Andrews# The contents of this file are subject to the terms of the
016c4317500eb565b82b27d00ba6b621c6e29110Mark Andrews# Common Development and Distribution License (the "License").
ce9c1558a6c81b49a5cedf55d168f889aeb5d310Mark Andrews# You may not use this file except in compliance with the License.
ce9c1558a6c81b49a5cedf55d168f889aeb5d310Mark Andrews#
ce9c1558a6c81b49a5cedf55d168f889aeb5d310Mark Andrews# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
ce9c1558a6c81b49a5cedf55d168f889aeb5d310Mark Andrews# or http://www.opensolaris.org/os/licensing.
0f3264c8d1b66de8dedd137d53615b8a8556adfaMark Andrews# See the License for the specific language governing permissions
0f3264c8d1b66de8dedd137d53615b8a8556adfaMark Andrews# and limitations under the License.
0f3264c8d1b66de8dedd137d53615b8a8556adfaMark Andrews#
0e30609d7b3e31e3ff249d185041b9140b5410baMark Andrews# When distributing Covered Code, include this CDDL HEADER in each
0e30609d7b3e31e3ff249d185041b9140b5410baMark Andrews# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
0e30609d7b3e31e3ff249d185041b9140b5410baMark Andrews# If applicable, add the following below this CDDL HEADER, with the
9e8947d9e606b967d0792d0ab1ee7afac5e5f39dMark Andrews# fields enclosed by brackets "[]" replaced with your own identifying
9e8947d9e606b967d0792d0ab1ee7afac5e5f39dMark Andrews# information: Portions Copyright [yyyy] [name of copyright owner]
9e8947d9e606b967d0792d0ab1ee7afac5e5f39dMark Andrews#
3cff31d890bf0815b6b2c7603d1e5c37dc3f26b7Mark Andrews# CDDL HEADER END
3cff31d890bf0815b6b2c7603d1e5c37dc3f26b7Mark Andrews#
2005c3b37bb39a37dc0b034bb2149006df7e3759Mark Andrews
2005c3b37bb39a37dc0b034bb2149006df7e3759Mark Andrews#
c09c2bf800ba0f5e6efe6b47ba72f43e4a61ca7dMark Andrews# Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
9a7d202077fae00fbdca610d8a8d90689e30f331Mark Andrews#
9a7d202077fae00fbdca610d8a8d90689e30f331Mark Andrews
9a7d202077fae00fbdca610d8a8d90689e30f331Mark Andrews# Can't use the Studio compilers as they don't support the GNU
9a7d202077fae00fbdca610d8a8d90689e30f331Mark Andrews# __attribute__ extension
9a7d202077fae00fbdca610d8a8d90689e30f331Mark AndrewsCOMPILER = gcc3
9a7d202077fae00fbdca610d8a8d90689e30f331Mark Andrews
9a7d202077fae00fbdca610d8a8d90689e30f331Mark Andrewsinclude ../../make-rules/shared-macros.mk
4a5b30c24ca7ceefec4ca142069b886f3d4ab9f9Mark Andrews
4a5b30c24ca7ceefec4ca142069b886f3d4ab9f9Mark AndrewsCOMPONENT_NAME= nmap
c368f28dad471c70213b41f7a0ad1b4ef4d8c543Mark AndrewsCOMPONENT_VERSION= 6.25
f1d6c77eccf502398ae5954fb884bde70764a047Mark AndrewsCOMPONENT_PROJECT_URL= http://nmap.org/
f1d6c77eccf502398ae5954fb884bde70764a047Mark AndrewsCOMPONENT_SRC= $(COMPONENT_NAME)-$(COMPONENT_VERSION)
f1d6c77eccf502398ae5954fb884bde70764a047Mark AndrewsCOMPONENT_ARCHIVE= $(COMPONENT_SRC).tgz
f1d6c77eccf502398ae5954fb884bde70764a047Mark AndrewsCOMPONENT_ARCHIVE_HASH= \
7adca0ea2fcd44641861523b718d6980c0666103Mark Andrews sha256:42c54fd5cc5f05e5df909757d62307102a8ff1dfaf5c2626b1cb5f2ecd009e57
7adca0ea2fcd44641861523b718d6980c0666103Mark AndrewsCOMPONENT_ARCHIVE_URL= $(COMPONENT_PROJECT_URL)dist/$(COMPONENT_ARCHIVE)
7adca0ea2fcd44641861523b718d6980c0666103Mark AndrewsCOMPONENT_BUGDB= utility/nmap
9dcc44d7b309b61e89083807d47af471ec6bae1fMark Andrews
5badfc7e00b2ec2c7b93657906b8609114ee00ccMark AndrewsTPNO= 9217
5badfc7e00b2ec2c7b93657906b8609114ee00ccMark Andrews
5badfc7e00b2ec2c7b93657906b8609114ee00ccMark Andrewsinclude $(WS_MAKE_RULES)/prep.mk
dc2a0aa7aaa8b85398ae183c7274c0eeec5009afMark Andrews
dc2a0aa7aaa8b85398ae183c7274c0eeec5009afMark Andrews# pyobject-27and pygtk2-27 are only available on S11.3 and later
2005c3b37bb39a37dc0b034bb2149006df7e3759Mark Andrewsifeq ($(BUILD_TYPE), evaluation)
1fa2ce7eaef0c17d554495220565b681639b2ce5Mark AndrewsBUILD_32=
7539c231d47677250008737b0691f9518111f3f5Mark AndrewsINSTALL_32=
7539c231d47677250008737b0691f9518111f3f5Mark AndrewsPUBLISH_STAMP=
7ae2fa27e921ff5a2de4b0bb3aef5013315e92a8Tatuya JINMEI 神明達哉endif
7ae2fa27e921ff5a2de4b0bb3aef5013315e92a8Tatuya JINMEI 神明達哉
7ae2fa27e921ff5a2de4b0bb3aef5013315e92a8Tatuya JINMEI 神明達哉include $(WS_MAKE_RULES)/configure.mk
7fe86a54252bab063030512a0e4150e1b7814effMark Andrewsinclude $(WS_MAKE_RULES)/ips.mk
7fe86a54252bab063030512a0e4150e1b7814effMark Andrews
1c3ed2a83d176d9023b51b60dfc96c133f678362Tatuya JINMEI 神明達哉COMPONENT_PRE_CONFIGURE_ACTION = \
1c3ed2a83d176d9023b51b60dfc96c133f678362Tatuya JINMEI 神明達哉 ($(CLONEY) $(SOURCE_DIR) $(@D))
1c3ed2a83d176d9023b51b60dfc96c133f678362Tatuya JINMEI 神明達哉
e951a79d901cc9b72a4882c38f02b568eed6bf24Mark AndrewsPYTHON_VERSION = 2.7
fc53f564caa9d40f4b73a2808260b1dc07e86fddEvan Hunt
e951a79d901cc9b72a4882c38f02b568eed6bf24Mark AndrewsPKG_MACROS += PYVER=$(PYTHON_VERSION)
9a727082a0f4959d4ad5ee91c171c2fad92ac996Mark Andrews
a59640bf27db16e02e01484297e36b7456e163bbMark AndrewsCONFIGURE_OPTIONS += CFLAGS="$(CFLAGS)"
4462e590791925b6a5efceacbff054a6b5fe35edMark AndrewsCONFIGURE_OPTIONS += CXX="$(CXX)"
4462e590791925b6a5efceacbff054a6b5fe35edMark AndrewsCONFIGURE_OPTIONS += CXXFLAGS="$(CXXFLAGS)"
9925249931480c9e422b70c948b2665264ec46f5Mark AndrewsCONFIGURE_OPTIONS += CPPFLAGS="$(CPPFLAGS)"
9925249931480c9e422b70c948b2665264ec46f5Mark AndrewsCONFIGURE_OPTIONS += LDFLAGS="$(LDFLAGS)"
9925249931480c9e422b70c948b2665264ec46f5Mark AndrewsCONFIGURE_OPTIONS += LIBS="-lsocket -lnsl"
fc7043d7d1294478c9988c10af9a7fb8fd810338Evan HuntCONFIGURE_OPTIONS += PYTHON="$(PYTHON.$(PYTHON_VERSION))"
fc7043d7d1294478c9988c10af9a7fb8fd810338Evan HuntCONFIGURE_OPTIONS += --srcdir=$(BUILD_DIR_32)
fc7043d7d1294478c9988c10af9a7fb8fd810338Evan HuntCONFIGURE_OPTIONS += --localstatedir=/var
cef715b6556ca1207b85aa1eac6ce817af2be44eMark AndrewsCONFIGURE_OPTIONS += --without-localdirs
cef715b6556ca1207b85aa1eac6ce817af2be44eMark AndrewsCONFIGURE_OPTIONS += --with-zenmap
cef715b6556ca1207b85aa1eac6ce817af2be44eMark AndrewsCONFIGURE_OPTIONS += --with-openssl
5497de6931b5ac26f65c2343b0318614f73933baMark AndrewsCONFIGURE_OPTIONS += --with-libpcap
5497de6931b5ac26f65c2343b0318614f73933baMark AndrewsCONFIGURE_OPTIONS += --with-libpcre
5497de6931b5ac26f65c2343b0318614f73933baMark AndrewsCONFIGURE_OPTIONS += --with-liblua
f86c5d30de5d2bf4a4aab98f72295309d62e92eeMark AndrewsCONFIGURE_OPTIONS += --with-ncat
f86c5d30de5d2bf4a4aab98f72295309d62e92eeMark AndrewsCONFIGURE_OPTIONS += --with-ndiff
f86c5d30de5d2bf4a4aab98f72295309d62e92eeMark Andrews
262c39b2366bf79062f7f86b218947523dd1cbacEvan Hunt# pkgdepend doesn't like the first line of a Python script to be:
262c39b2366bf79062f7f86b218947523dd1cbacEvan Hunt# '#!/usr/bin/env python' so turn it into '#!/usr/bin/python$(PYTHON_VERSION)'
262c39b2366bf79062f7f86b218947523dd1cbacEvan HuntCOMPONENT_POST_INSTALL_ACTION += \
1ff207c2fa4182156932f3f5c982170385a19225Mark Andrews $(GSED) -i -e "s?env python?python$(PYTHON_VERSION)?" \
b1e32169ac5cf21fca540fa122a546db71090491Mark Andrews $(PROTOUSRBINDIR)/uninstall_zenmap
827572e191fad1326c624593bf35d8eb1928f607Mark Andrews
1aba9fe67899522364a9dbc3ee5a14da081f0314Evan HuntASLR_MODE = $(ASLR_ENABLE)
1aba9fe67899522364a9dbc3ee5a14da081f0314Evan Hunt
1aba9fe67899522364a9dbc3ee5a14da081f0314Evan Hunt# common targets
546c2bf791782df1077217bdaf1865235fa95a93Mark Andrewsbuild: $(BUILD_32)
546c2bf791782df1077217bdaf1865235fa95a93Mark Andrews
546c2bf791782df1077217bdaf1865235fa95a93Mark Andrewsinstall: $(INSTALL_32)
6c7f722d31d12cf83964c8132f0a59ef70e34cb5Mark Andrews
6c7f722d31d12cf83964c8132f0a59ef70e34cb5Mark Andrewstest: $(NO_TESTS)
fcc2a57e13fbecf085e9d11702709b3d5a49b043Mark Andrews
fcc2a57e13fbecf085e9d11702709b3d5a49b043Mark AndrewsREQUIRED_PACKAGES += library/pcre
fcc2a57e13fbecf085e9d11702709b3d5a49b043Mark AndrewsREQUIRED_PACKAGES += library/python/pygobject-27
fcdafc1e30dd4d10184b56201ea2fc3bab711e5eMark AndrewsREQUIRED_PACKAGES += library/python/pygtk2-27
fcdafc1e30dd4d10184b56201ea2fc3bab711e5eMark AndrewsREQUIRED_PACKAGES += library/security/openssl
f1263d2aa405087e74caf001cd443079f50ee903Mark AndrewsREQUIRED_PACKAGES += runtime/lua
f1263d2aa405087e74caf001cd443079f50ee903Mark AndrewsREQUIRED_PACKAGES += runtime/python-27
f1263d2aa405087e74caf001cd443079f50ee903Mark AndrewsREQUIRED_PACKAGES += system/library
b1d21f6c93c93bd27492fc41f1c3205c39ab2167Mark AndrewsREQUIRED_PACKAGES += system/library/gcc-3-runtime
b1d21f6c93c93bd27492fc41f1c3205c39ab2167Mark AndrewsREQUIRED_PACKAGES += system/library/libpcap
b1d21f6c93c93bd27492fc41f1c3205c39ab2167Mark AndrewsREQUIRED_PACKAGES += system/library/math
efb3fa669f00ccfd9aada997b426616b6b0ce044Mark AndrewsREQUIRED_PACKAGES += system/network/bpf
efb3fa669f00ccfd9aada997b426616b6b0ce044Mark Andrews