components/isc-dhcp/Makefile
branchs11u3-sru
changeset 7574 fb557863edc8
parent 6168 b3cd649419fe
--- a/components/isc-dhcp/Makefile	Wed Jan 11 11:03:56 2017 -0800
+++ b/components/isc-dhcp/Makefile	Fri Jan 13 13:04:10 2017 -0800
@@ -18,7 +18,7 @@
 #
 # CDDL HEADER END
 #
-# Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2011, 2017, Oracle and/or its affiliates. All rights reserved.
 #
 include ../../make-rules/shared-macros.mk
 
@@ -41,30 +41,48 @@
 include $(WS_MAKE_RULES)/prep.mk
 include $(WS_MAKE_RULES)/configure.mk
 include $(WS_MAKE_RULES)/ips.mk
+include $(WS_MAKE_RULES)/lint-libraries.mk
+
+# Enable ASLR for this component
+ASLR_MODE =	$(ASLR_ENABLE)
+
+LINT_FLAGS +=   -I$(BUILD_DIR_32)/includes \
+	-I$(BUILD_DIR_64)/includes -I$(SOURCE_DIR)/includes -I.
 
 COMPONENT_PRE_CONFIGURE_ACTION = \
 	($(CLONEY) $(SOURCE_DIR) $(@D))
 
+# Some patches need configure script re-creation.
+COMPONENT_PREP_ACTION +=(cd $(@D); autoreconf -vfi);
+
 CONFIGURE_OPTIONS  +=	--sysconfdir=$(ETCDIR)/inet
-CONFIGURE_OPTIONS  +=	--sbindir=$(USRLIBDIR)/inet
-CONFIGURE_OPTIONS  +=	--bindir=$(USRSBINDIR)
+CONFIGURE_OPTIONS.32  +=	--sbindir=$(USRLIBDIR)/inet
+CONFIGURE_OPTIONS.32  +=	--bindir=$(USRSBINDIR)
+CONFIGURE_OPTIONS.64  +=	--sbindir=$(USRLIBDIR)/inet/$(MACH64)
+CONFIGURE_OPTIONS.64  +=	--bindir=$(USRSBINDIR)/$(MACH64)
 CONFIGURE_OPTIONS  +=	--enable-use-sockets
 CONFIGURE_OPTIONS  +=	--enable-ipv4-pktinfo
+CONFIGURE_OPTIONS  +=	--with-pic
 
 
 # Disable message in omapip/errwarn.c.
 CPPFLAGS  +=	        -DNOMINUM
 CONFIGURE_OPTIONS  +=   CPPFLAGS="$(CPPFLAGS)"
 
-build:		$(BUILD_32)
+CFLAGS += -g -fPIC
+CONFIGURE_OPTIONS += CFLAGS="$(CFLAGS)"
 
-install:	build $(INSTALL_32) $(PROTO_DIR)/dhcpd.leases
+configure:	$(CONFIGURE_32_and_64)
 
+build:		$(BUILD_32_and_64)
 
-test:	build
+install:	$(INSTALL_32_and_64) $(PROTO_DIR)/dhcpd.leases
+
+test:	$(TEST_32_and_64) #build
 	@cd $(BUILD_DIR_32); $(MAKE) check
+	@cd $(BUILD_DIR_64); $(MAKE) check
 
-$(PROTO_DIR)/dhcpd.leases:	$(INSTALL_32)
+$(PROTO_DIR)/dhcpd.leases:	#$(INSTALL_32_and_64)
 	$(TOUCH) $@
 
 REQUIRED_PACKAGES += shell/ksh93