components/smp_utils/Makefile
changeset 1344 48d2ae15d995
child 1948 2d1537e7942d
equal deleted inserted replaced
1343:a66d36656846 1344:48d2ae15d995
       
     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 #
       
    21 
       
    22 #
       
    23 # Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.
       
    24 #
       
    25 
       
    26 include ../../make-rules/shared-macros.mk
       
    27 
       
    28 COMPONENT_NAME=		smp_utils
       
    29 COMPONENT_VERSION=	0.97
       
    30 COMPONENT_PROJECT_URL= http://sg.danny.cz/sg/smp_utils.html
       
    31 COMPONENT_SRC=		$(COMPONENT_NAME)-$(COMPONENT_VERSION)
       
    32 COMPONENT_ARCHIVE=	$(COMPONENT_SRC).tgz
       
    33 COMPONENT_ARCHIVE_HASH= \
       
    34     sha256:0e10d304cfa8789bcf16537e8f72d9afdf8838fca20ae68103c317432d00915b
       
    35 COMPONENT_ARCHIVE_URL=	http://sg.danny.cz/sg/p/$(COMPONENT_ARCHIVE)
       
    36 COMPONENT_BUGDB=    utility/smputils
       
    37 
       
    38 include ../../make-rules/prep.mk
       
    39 include ../../make-rules/configure.mk
       
    40 include ../../make-rules/ips.mk
       
    41 
       
    42 
       
    43 CC += $(CC_BITS)
       
    44 LDFLAGS += $(CC_BITS)
       
    45 COMPONENT_BUILD_ARGS += CC="$(CC)"
       
    46 COMPONENT_BUILD_ARGS += LDFLAGS="$(LDFLAGS)"
       
    47 
       
    48 CPPFLAGS += -I$(COMPONENT_DIR)/$(COMPONENT_SRC)/include
       
    49 CONFIGURE_OPTIONS +=	--disable-static
       
    50 CONFIGURE_OPTIONS += CPPFLAGS="$(CPPFLAGS)"
       
    51 
       
    52 # Don't use rpath!
       
    53 COMPONENT_POST_CONFIGURE_ACTION = \
       
    54 	(cd $(BUILD_DIR_64) ; \
       
    55 	$(GSED) -i 's|^hardcode_libdir_flag_spec=.*|hardcode_libdir_flag_spec=""|g' libtool ; \
       
    56 	$(GSED) -i 's|^runpath_var=LD_RUN_PATH|runpath_var=DIE_RPATH_DIE|g' libtool)
       
    57 
       
    58 # Move the section 8 man pages into section 1m.
       
    59 COMPONENT_POST_INSTALL_ACTION = \
       
    60 	for f in $(PROTOUSRSHAREMANDIR)/man8/*; do \
       
    61 		mv $$f $${f%.8}.1m; \
       
    62 	done ; \
       
    63 	$(MV) $(PROTOUSRSHAREMANDIR)/man8 $(PROTOUSRSHAREMANDIR)/man1m
       
    64 
       
    65 PKG_PROTO_DIRS += $(COMPONENT_DIR)/files
       
    66 
       
    67 COMPONENT_INSTALL_ARGS += INSTALL=$(INSTALL)
       
    68 COMPONENT_INSTALL_ARGS += INSTALL_TOP=$(PROTOUSRDIR) 
       
    69 $(INSTALL_64):  COMPONENT_INSTALL_ARGS += INSTALL_LIB=$(PROTOUSRLIBDIR64)
       
    70 $(INSTALL_64):  COMPONENT_INSTALL_ARGS += INSTALL_SBIN=$(PROTOUSRBINDIR64)
       
    71 
       
    72 ASLR_MODE = $(ASLR_ENABLE)
       
    73 
       
    74 # common targets
       
    75 build:          $(BUILD_64)
       
    76 
       
    77 install:        $(INSTALL_64)
       
    78 
       
    79 test:           install
       
    80 		($(ENV) LD_LIBRARY_PATH=$(PROTOUSRLIBDIR64) \
       
    81 		$(PROTOUSRDIR)/sbin/$(MACH64)/smp_conf_general -V; \
       
    82 		$(PROTOUSRDIR)/sbin/$(MACH64)/smp_conf_phy_event -V; \
       
    83 		$(PROTOUSRDIR)/sbin/$(MACH64)/smp_conf_route_info -V; \
       
    84 		$(PROTOUSRDIR)/sbin/$(MACH64)/smp_conf_zone_man_pass -V; \
       
    85 		$(PROTOUSRDIR)/sbin/$(MACH64)/smp_conf_zone_perm_tbl -V; \
       
    86 		$(PROTOUSRDIR)/sbin/$(MACH64)/smp_conf_zone_phy_info -V; \
       
    87 		$(PROTOUSRDIR)/sbin/$(MACH64)/smp_discover -V; \
       
    88 		$(PROTOUSRDIR)/sbin/$(MACH64)/smp_discover_list -V; \
       
    89 		$(PROTOUSRDIR)/sbin/$(MACH64)/smp_ena_dis_zoning -V; \
       
    90 		$(PROTOUSRDIR)/sbin/$(MACH64)/smp_phy_control -V; \
       
    91 		$(PROTOUSRDIR)/sbin/$(MACH64)/smp_phy_test -V; \
       
    92 		$(PROTOUSRDIR)/sbin/$(MACH64)/smp_read_gpio -V; \
       
    93 		$(PROTOUSRDIR)/sbin/$(MACH64)/smp_rep_broadcast -V; \
       
    94 		$(PROTOUSRDIR)/sbin/$(MACH64)/smp_rep_exp_route_tbl -V; \
       
    95 		$(PROTOUSRDIR)/sbin/$(MACH64)/smp_rep_general -V; \
       
    96 		$(PROTOUSRDIR)/sbin/$(MACH64)/smp_rep_manufacturer -V; \
       
    97 		$(PROTOUSRDIR)/sbin/$(MACH64)/smp_rep_phy_err_log -V; \
       
    98 		$(PROTOUSRDIR)/sbin/$(MACH64)/smp_rep_phy_event -V; \
       
    99 		$(PROTOUSRDIR)/sbin/$(MACH64)/smp_rep_phy_event_list -V; \
       
   100 		$(PROTOUSRDIR)/sbin/$(MACH64)/smp_rep_phy_sata -V; \
       
   101 		$(PROTOUSRDIR)/sbin/$(MACH64)/smp_rep_route_info -V; \
       
   102 		$(PROTOUSRDIR)/sbin/$(MACH64)/smp_rep_self_conf_stat -V; \
       
   103 		$(PROTOUSRDIR)/sbin/$(MACH64)/smp_rep_zone_man_pass -V; \
       
   104 		$(PROTOUSRDIR)/sbin/$(MACH64)/smp_rep_zone_perm_tbl -V; \
       
   105 		$(PROTOUSRDIR)/sbin/$(MACH64)/smp_write_gpio -V; \
       
   106 		$(PROTOUSRDIR)/sbin/$(MACH64)/smp_zone_activate -V; \
       
   107 		$(PROTOUSRDIR)/sbin/$(MACH64)/smp_zone_lock -V; \
       
   108 		$(PROTOUSRDIR)/sbin/$(MACH64)/smp_zone_unlock -V; \
       
   109 		$(PROTOUSRDIR)/sbin/$(MACH64)/smp_zoned_broadcast -V)
       
   110 
       
   111 BUILD_PKG_DEPENDENCIES =        $(BUILD_TOOLS)
       
   112 
       
   113 include ../../make-rules/depend.mk