components/trousers/Makefile
author John Beck <John.Beck@Oracle.COM>
Fri, 21 Nov 2014 16:37:26 -0800
changeset 2225 f064d3d3190d
parent 1948 2d1537e7942d
child 3817 30b42c38bbc4
permissions -rw-r--r--
20078677 Userland Makefiles should support a configure: target
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
259
520697a05dde 7045320 Move trousers from SFW to Userland
Wyllys Ingersoll <Wyllys.Ingersoll@Oracle.COM>
parents:
diff changeset
     1
#
520697a05dde 7045320 Move trousers from SFW to Userland
Wyllys Ingersoll <Wyllys.Ingersoll@Oracle.COM>
parents:
diff changeset
     2
# CDDL HEADER START
520697a05dde 7045320 Move trousers from SFW to Userland
Wyllys Ingersoll <Wyllys.Ingersoll@Oracle.COM>
parents:
diff changeset
     3
#
520697a05dde 7045320 Move trousers from SFW to Userland
Wyllys Ingersoll <Wyllys.Ingersoll@Oracle.COM>
parents:
diff changeset
     4
# The contents of this file are subject to the terms of the
520697a05dde 7045320 Move trousers from SFW to Userland
Wyllys Ingersoll <Wyllys.Ingersoll@Oracle.COM>
parents:
diff changeset
     5
# Common Development and Distribution License (the "License").
520697a05dde 7045320 Move trousers from SFW to Userland
Wyllys Ingersoll <Wyllys.Ingersoll@Oracle.COM>
parents:
diff changeset
     6
# You may not use this file except in compliance with the License.
520697a05dde 7045320 Move trousers from SFW to Userland
Wyllys Ingersoll <Wyllys.Ingersoll@Oracle.COM>
parents:
diff changeset
     7
#
520697a05dde 7045320 Move trousers from SFW to Userland
Wyllys Ingersoll <Wyllys.Ingersoll@Oracle.COM>
parents:
diff changeset
     8
# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
520697a05dde 7045320 Move trousers from SFW to Userland
Wyllys Ingersoll <Wyllys.Ingersoll@Oracle.COM>
parents:
diff changeset
     9
# or http://www.opensolaris.org/os/licensing.
520697a05dde 7045320 Move trousers from SFW to Userland
Wyllys Ingersoll <Wyllys.Ingersoll@Oracle.COM>
parents:
diff changeset
    10
# See the License for the specific language governing permissions
520697a05dde 7045320 Move trousers from SFW to Userland
Wyllys Ingersoll <Wyllys.Ingersoll@Oracle.COM>
parents:
diff changeset
    11
# and limitations under the License.
520697a05dde 7045320 Move trousers from SFW to Userland
Wyllys Ingersoll <Wyllys.Ingersoll@Oracle.COM>
parents:
diff changeset
    12
#
520697a05dde 7045320 Move trousers from SFW to Userland
Wyllys Ingersoll <Wyllys.Ingersoll@Oracle.COM>
parents:
diff changeset
    13
# When distributing Covered Code, include this CDDL HEADER in each
520697a05dde 7045320 Move trousers from SFW to Userland
Wyllys Ingersoll <Wyllys.Ingersoll@Oracle.COM>
parents:
diff changeset
    14
# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
520697a05dde 7045320 Move trousers from SFW to Userland
Wyllys Ingersoll <Wyllys.Ingersoll@Oracle.COM>
parents:
diff changeset
    15
# If applicable, add the following below this CDDL HEADER, with the
520697a05dde 7045320 Move trousers from SFW to Userland
Wyllys Ingersoll <Wyllys.Ingersoll@Oracle.COM>
parents:
diff changeset
    16
# fields enclosed by brackets "[]" replaced with your own identifying
520697a05dde 7045320 Move trousers from SFW to Userland
Wyllys Ingersoll <Wyllys.Ingersoll@Oracle.COM>
parents:
diff changeset
    17
# information: Portions Copyright [yyyy] [name of copyright owner]
520697a05dde 7045320 Move trousers from SFW to Userland
Wyllys Ingersoll <Wyllys.Ingersoll@Oracle.COM>
parents:
diff changeset
    18
#
520697a05dde 7045320 Move trousers from SFW to Userland
Wyllys Ingersoll <Wyllys.Ingersoll@Oracle.COM>
parents:
diff changeset
    19
# CDDL HEADER END
520697a05dde 7045320 Move trousers from SFW to Userland
Wyllys Ingersoll <Wyllys.Ingersoll@Oracle.COM>
parents:
diff changeset
    20
#
1825
6864cd9b9a00 18552401 trousers doesn't build on 45
Dan Anderson <dan.anderson@oracle.com>
parents: 1186
diff changeset
    21
# Copyright (c) 2011, 2014, Oracle and/or its affiliates. All rights reserved.
259
520697a05dde 7045320 Move trousers from SFW to Userland
Wyllys Ingersoll <Wyllys.Ingersoll@Oracle.COM>
parents:
diff changeset
    22
#
520697a05dde 7045320 Move trousers from SFW to Userland
Wyllys Ingersoll <Wyllys.Ingersoll@Oracle.COM>
parents:
diff changeset
    23
520697a05dde 7045320 Move trousers from SFW to Userland
Wyllys Ingersoll <Wyllys.Ingersoll@Oracle.COM>
parents:
diff changeset
    24
include ../../make-rules/shared-macros.mk
520697a05dde 7045320 Move trousers from SFW to Userland
Wyllys Ingersoll <Wyllys.Ingersoll@Oracle.COM>
parents:
diff changeset
    25
520697a05dde 7045320 Move trousers from SFW to Userland
Wyllys Ingersoll <Wyllys.Ingersoll@Oracle.COM>
parents:
diff changeset
    26
COMPONENT_NAME=		trousers
520697a05dde 7045320 Move trousers from SFW to Userland
Wyllys Ingersoll <Wyllys.Ingersoll@Oracle.COM>
parents:
diff changeset
    27
COMPONENT_VERSION=	0.3.6
520697a05dde 7045320 Move trousers from SFW to Userland
Wyllys Ingersoll <Wyllys.Ingersoll@Oracle.COM>
parents:
diff changeset
    28
COMPONENT_SRC=		$(COMPONENT_NAME)-$(COMPONENT_VERSION)
520697a05dde 7045320 Move trousers from SFW to Userland
Wyllys Ingersoll <Wyllys.Ingersoll@Oracle.COM>
parents:
diff changeset
    29
COMPONENT_ARCHIVE=	$(COMPONENT_SRC).tar.gz
609
775168282b2f 7037821 Userland migration of data from Makefile to manifest may have been a little overzealous
Rich Burridge <rich.burridge@oracle.com>
parents: 259
diff changeset
    30
COMPONENT_PROJECT_URL=	http://sourceforge.net/projects/trousers/files/trousers/
777
e2e604cdbd6a 7123028 Problem with crypto/tss
Dan Anderson <dan.anderson@oracle.com>
parents: 609
diff changeset
    31
COMPONENT_ARCHIVE_HASH=	\
e2e604cdbd6a 7123028 Problem with crypto/tss
Dan Anderson <dan.anderson@oracle.com>
parents: 609
diff changeset
    32
	sha256:91025f60248af44df192e8df16fa6b0c0f1e48c54f6dc51626567ed95758b0d6
609
775168282b2f 7037821 Userland migration of data from Makefile to manifest may have been a little overzealous
Rich Burridge <rich.burridge@oracle.com>
parents: 259
diff changeset
    33
COMPONENT_ARCHIVE_URL=	$(COMPONENT_PROJECT_URL)$(COMPONENT_VERSION)/$(COMPONENT_ARCHIVE)
1058
34d7aaa03423 15886624 Auto-generation of Userland gate list - Phase 3
Rich Burridge <rich.burridge@oracle.com>
parents: 777
diff changeset
    34
COMPONENT_BUGDB=	utility/tss
259
520697a05dde 7045320 Move trousers from SFW to Userland
Wyllys Ingersoll <Wyllys.Ingersoll@Oracle.COM>
parents:
diff changeset
    35
1948
2d1537e7942d 18978320 Userland components should specify TPNOs in Makefiles instead of pkg manifests
John Beck <John.Beck@Oracle.COM>
parents: 1825
diff changeset
    36
TPNO=			8341
2d1537e7942d 18978320 Userland components should specify TPNOs in Makefiles instead of pkg manifests
John Beck <John.Beck@Oracle.COM>
parents: 1825
diff changeset
    37
259
520697a05dde 7045320 Move trousers from SFW to Userland
Wyllys Ingersoll <Wyllys.Ingersoll@Oracle.COM>
parents:
diff changeset
    38
include ../../make-rules/prep.mk
520697a05dde 7045320 Move trousers from SFW to Userland
Wyllys Ingersoll <Wyllys.Ingersoll@Oracle.COM>
parents:
diff changeset
    39
include ../../make-rules/configure.mk
520697a05dde 7045320 Move trousers from SFW to Userland
Wyllys Ingersoll <Wyllys.Ingersoll@Oracle.COM>
parents:
diff changeset
    40
include ../../make-rules/ips.mk
520697a05dde 7045320 Move trousers from SFW to Userland
Wyllys Ingersoll <Wyllys.Ingersoll@Oracle.COM>
parents:
diff changeset
    41
include ../../make-rules/lint-libraries.mk
520697a05dde 7045320 Move trousers from SFW to Userland
Wyllys Ingersoll <Wyllys.Ingersoll@Oracle.COM>
parents:
diff changeset
    42
520697a05dde 7045320 Move trousers from SFW to Userland
Wyllys Ingersoll <Wyllys.Ingersoll@Oracle.COM>
parents:
diff changeset
    43
PATCH_LEVEL=0
520697a05dde 7045320 Move trousers from SFW to Userland
Wyllys Ingersoll <Wyllys.Ingersoll@Oracle.COM>
parents:
diff changeset
    44
520697a05dde 7045320 Move trousers from SFW to Userland
Wyllys Ingersoll <Wyllys.Ingersoll@Oracle.COM>
parents:
diff changeset
    45
LIBS=-lnsl -lsocket -lgen
520697a05dde 7045320 Move trousers from SFW to Userland
Wyllys Ingersoll <Wyllys.Ingersoll@Oracle.COM>
parents:
diff changeset
    46
1825
6864cd9b9a00 18552401 trousers doesn't build on 45
Dan Anderson <dan.anderson@oracle.com>
parents: 1186
diff changeset
    47
CFLAGS += "-D_POSIX_PTHREAD_SEMANTICS"
6864cd9b9a00 18552401 trousers doesn't build on 45
Dan Anderson <dan.anderson@oracle.com>
parents: 1186
diff changeset
    48
1186
447cb9b2ff93 16391309 TrouSerS ERROR: max number of connections reached (10), new connection refused
Dan Anderson <dan.anderson@oracle.com>
parents: 1058
diff changeset
    49
CONFIGURE_OPTIONS += --sbindir=/usr/lib
259
520697a05dde 7045320 Move trousers from SFW to Userland
Wyllys Ingersoll <Wyllys.Ingersoll@Oracle.COM>
parents:
diff changeset
    50
CONFIGURE_OPTIONS += --with-gui=openssl
520697a05dde 7045320 Move trousers from SFW to Userland
Wyllys Ingersoll <Wyllys.Ingersoll@Oracle.COM>
parents:
diff changeset
    51
CONFIGURE_OPTIONS += CC="$(CC)"
520697a05dde 7045320 Move trousers from SFW to Userland
Wyllys Ingersoll <Wyllys.Ingersoll@Oracle.COM>
parents:
diff changeset
    52
CONFIGURE_OPTIONS += LD="$(CC)"
520697a05dde 7045320 Move trousers from SFW to Userland
Wyllys Ingersoll <Wyllys.Ingersoll@Oracle.COM>
parents:
diff changeset
    53
CONFIGURE_OPTIONS += CFLAGS="$(CFLAGS)"
1186
447cb9b2ff93 16391309 TrouSerS ERROR: max number of connections reached (10), new connection refused
Dan Anderson <dan.anderson@oracle.com>
parents: 1058
diff changeset
    54
CONFIGURE_OPTIONS += LDFLAGS="$(LDFLAGS) -lpthread -lbsm -lscf -lresolv"
259
520697a05dde 7045320 Move trousers from SFW to Userland
Wyllys Ingersoll <Wyllys.Ingersoll@Oracle.COM>
parents:
diff changeset
    55
CONFIGURE_OPTIONS += LIBS="$(LIBS)"
520697a05dde 7045320 Move trousers from SFW to Userland
Wyllys Ingersoll <Wyllys.Ingersoll@Oracle.COM>
parents:
diff changeset
    56
1186
447cb9b2ff93 16391309 TrouSerS ERROR: max number of connections reached (10), new connection refused
Dan Anderson <dan.anderson@oracle.com>
parents: 1058
diff changeset
    57
# Enable ASLR for this component
447cb9b2ff93 16391309 TrouSerS ERROR: max number of connections reached (10), new connection refused
Dan Anderson <dan.anderson@oracle.com>
parents: 1058
diff changeset
    58
ASLR_MODE = $(ASLR_ENABLE)
447cb9b2ff93 16391309 TrouSerS ERROR: max number of connections reached (10), new connection refused
Dan Anderson <dan.anderson@oracle.com>
parents: 1058
diff changeset
    59
259
520697a05dde 7045320 Move trousers from SFW to Userland
Wyllys Ingersoll <Wyllys.Ingersoll@Oracle.COM>
parents:
diff changeset
    60
COMPONENT_POST_CONFIGURE_ACTION = (cd $(COMPONENT_SRC); \
520697a05dde 7045320 Move trousers from SFW to Userland
Wyllys Ingersoll <Wyllys.Ingersoll@Oracle.COM>
parents:
diff changeset
    61
	for f in `ls src/include/tss/*.h` ; do \
520697a05dde 7045320 Move trousers from SFW to Userland
Wyllys Ingersoll <Wyllys.Ingersoll@Oracle.COM>
parents:
diff changeset
    62
		/usr/bin/dos2unix $$f $$f; \
520697a05dde 7045320 Move trousers from SFW to Userland
Wyllys Ingersoll <Wyllys.Ingersoll@Oracle.COM>
parents:
diff changeset
    63
	done; \
520697a05dde 7045320 Move trousers from SFW to Userland
Wyllys Ingersoll <Wyllys.Ingersoll@Oracle.COM>
parents:
diff changeset
    64
	for f in `ls src/include/trousers/*.h` ; do \
520697a05dde 7045320 Move trousers from SFW to Userland
Wyllys Ingersoll <Wyllys.Ingersoll@Oracle.COM>
parents:
diff changeset
    65
		/usr/bin/dos2unix $$f $$f; \
520697a05dde 7045320 Move trousers from SFW to Userland
Wyllys Ingersoll <Wyllys.Ingersoll@Oracle.COM>
parents:
diff changeset
    66
	done; \
520697a05dde 7045320 Move trousers from SFW to Userland
Wyllys Ingersoll <Wyllys.Ingersoll@Oracle.COM>
parents:
diff changeset
    67
	for f in `ls src/include/*.h` ; do \
520697a05dde 7045320 Move trousers from SFW to Userland
Wyllys Ingersoll <Wyllys.Ingersoll@Oracle.COM>
parents:
diff changeset
    68
		/usr/bin/dos2unix $$f $$f; \
520697a05dde 7045320 Move trousers from SFW to Userland
Wyllys Ingersoll <Wyllys.Ingersoll@Oracle.COM>
parents:
diff changeset
    69
	done; \
520697a05dde 7045320 Move trousers from SFW to Userland
Wyllys Ingersoll <Wyllys.Ingersoll@Oracle.COM>
parents:
diff changeset
    70
	/usr/bin/libtoolize -f; \
520697a05dde 7045320 Move trousers from SFW to Userland
Wyllys Ingersoll <Wyllys.Ingersoll@Oracle.COM>
parents:
diff changeset
    71
	$(ACLOCAL); \
520697a05dde 7045320 Move trousers from SFW to Userland
Wyllys Ingersoll <Wyllys.Ingersoll@Oracle.COM>
parents:
diff changeset
    72
	$(AUTOMAKE) src/tspi/Makefile; \
520697a05dde 7045320 Move trousers from SFW to Userland
Wyllys Ingersoll <Wyllys.Ingersoll@Oracle.COM>
parents:
diff changeset
    73
	$(AUTOCONF))	
520697a05dde 7045320 Move trousers from SFW to Userland
Wyllys Ingersoll <Wyllys.Ingersoll@Oracle.COM>
parents:
diff changeset
    74
520697a05dde 7045320 Move trousers from SFW to Userland
Wyllys Ingersoll <Wyllys.Ingersoll@Oracle.COM>
parents:
diff changeset
    75
#
520697a05dde 7045320 Move trousers from SFW to Userland
Wyllys Ingersoll <Wyllys.Ingersoll@Oracle.COM>
parents:
diff changeset
    76
# We had to use cc as the linker (see CONFIGURE_OPTIONS above) so the 
520697a05dde 7045320 Move trousers from SFW to Userland
Wyllys Ingersoll <Wyllys.Ingersoll@Oracle.COM>
parents:
diff changeset
    77
# .init and .fini sections get set correctly.  Because we use cc, we 
520697a05dde 7045320 Move trousers from SFW to Userland
Wyllys Ingersoll <Wyllys.Ingersoll@Oracle.COM>
parents:
diff changeset
    78
# must pass the -m64 flag through cc to the linker when building 64 bit 
520697a05dde 7045320 Move trousers from SFW to Userland
Wyllys Ingersoll <Wyllys.Ingersoll@Oracle.COM>
parents:
diff changeset
    79
# libraries.  We can't just add it to LDFLAGS because then it gets used 
520697a05dde 7045320 Move trousers from SFW to Userland
Wyllys Ingersoll <Wyllys.Ingersoll@Oracle.COM>
parents:
diff changeset
    80
# when creating executables and static libs and generates lots of noise 
520697a05dde 7045320 Move trousers from SFW to Userland
Wyllys Ingersoll <Wyllys.Ingersoll@Oracle.COM>
parents:
diff changeset
    81
# in the build logs.  LDARCHFLAG is only recognized by the Makefile in 
520697a05dde 7045320 Move trousers from SFW to Userland
Wyllys Ingersoll <Wyllys.Ingersoll@Oracle.COM>
parents:
diff changeset
    82
# the src/tspi directory.
520697a05dde 7045320 Move trousers from SFW to Userland
Wyllys Ingersoll <Wyllys.Ingersoll@Oracle.COM>
parents:
diff changeset
    83
#
520697a05dde 7045320 Move trousers from SFW to Userland
Wyllys Ingersoll <Wyllys.Ingersoll@Oracle.COM>
parents:
diff changeset
    84
COMPONENT_BUILD_ENV.64 += LDARCHFLAG="-Wl,$(CC_BITS)"
520697a05dde 7045320 Move trousers from SFW to Userland
Wyllys Ingersoll <Wyllys.Ingersoll@Oracle.COM>
parents:
diff changeset
    85
520697a05dde 7045320 Move trousers from SFW to Userland
Wyllys Ingersoll <Wyllys.Ingersoll@Oracle.COM>
parents:
diff changeset
    86
COMPONENT_TEST_TARGETS = 
520697a05dde 7045320 Move trousers from SFW to Userland
Wyllys Ingersoll <Wyllys.Ingersoll@Oracle.COM>
parents:
diff changeset
    87
520697a05dde 7045320 Move trousers from SFW to Userland
Wyllys Ingersoll <Wyllys.Ingersoll@Oracle.COM>
parents:
diff changeset
    88
COMPONENT_BUILD_TARGETS = all
520697a05dde 7045320 Move trousers from SFW to Userland
Wyllys Ingersoll <Wyllys.Ingersoll@Oracle.COM>
parents:
diff changeset
    89
520697a05dde 7045320 Move trousers from SFW to Userland
Wyllys Ingersoll <Wyllys.Ingersoll@Oracle.COM>
parents:
diff changeset
    90
# common targets
2225
f064d3d3190d 20078677 Userland Makefiles should support a configure: target
John Beck <John.Beck@Oracle.COM>
parents: 1948
diff changeset
    91
configure:	$(CONFIGURE_32_and_64)
f064d3d3190d 20078677 Userland Makefiles should support a configure: target
John Beck <John.Beck@Oracle.COM>
parents: 1948
diff changeset
    92
259
520697a05dde 7045320 Move trousers from SFW to Userland
Wyllys Ingersoll <Wyllys.Ingersoll@Oracle.COM>
parents:
diff changeset
    93
build:		$(BUILD_32_and_64)
520697a05dde 7045320 Move trousers from SFW to Userland
Wyllys Ingersoll <Wyllys.Ingersoll@Oracle.COM>
parents:
diff changeset
    94
520697a05dde 7045320 Move trousers from SFW to Userland
Wyllys Ingersoll <Wyllys.Ingersoll@Oracle.COM>
parents:
diff changeset
    95
install:	$(INSTALL_32_and_64)
520697a05dde 7045320 Move trousers from SFW to Userland
Wyllys Ingersoll <Wyllys.Ingersoll@Oracle.COM>
parents:
diff changeset
    96
520697a05dde 7045320 Move trousers from SFW to Userland
Wyllys Ingersoll <Wyllys.Ingersoll@Oracle.COM>
parents:
diff changeset
    97
test:		$(NO_TESTS)
520697a05dde 7045320 Move trousers from SFW to Userland
Wyllys Ingersoll <Wyllys.Ingersoll@Oracle.COM>
parents:
diff changeset
    98
520697a05dde 7045320 Move trousers from SFW to Userland
Wyllys Ingersoll <Wyllys.Ingersoll@Oracle.COM>
parents:
diff changeset
    99
BUILD_PKG_DEPENDENCIES =	$(BUILD_TOOLS)
520697a05dde 7045320 Move trousers from SFW to Userland
Wyllys Ingersoll <Wyllys.Ingersoll@Oracle.COM>
parents:
diff changeset
   100
520697a05dde 7045320 Move trousers from SFW to Userland
Wyllys Ingersoll <Wyllys.Ingersoll@Oracle.COM>
parents:
diff changeset
   101
include ../../make-rules/depend.mk