Use cc -bundle to build loadable modules on Rhapsody. Thanks to
authorwtc
Fri, 08 May 1998 18:52:44 +0000
changeset 112 b720c8244ce62cd97758c3ef5f5b0e8a6b854845
parent 111 ac0b29f5fb65e715407b34f81b5ddb260ea37d96
child 113 d3fcb11168db042ba3307dfe50b86932efc44c9f
push idunknown
push userunknown
push dateunknown
Use cc -bundle to build loadable modules on Rhapsody. Thanks to Matt Watson <mwatson@apple.com> for the patch.
pr/tests/dll/Makefile
--- a/pr/tests/dll/Makefile
+++ b/pr/tests/dll/Makefile
@@ -25,17 +25,16 @@ include $(MOD_DEPTH)/config/config.mk
 ifeq ($(OS_ARCH),SunOS)
 ifeq ($(OS_RELEASE),4.1.3_U1)
 OPTIMIZER =
 endif
 endif
 
 INCLUDES = -I$(DIST)/include
 
-
 OBJS = $(OBJDIR)/mygetval.$(OBJ_SUFFIX) \
 	$(OBJDIR)/mysetval.$(OBJ_SUFFIX)
 
 ifeq ($(OS_TARGET), WIN16)
 W16OBJS = $(subst $(space),$(comma)$(space),$(OBJS))
 endif
 
 ifeq ($(OS_ARCH), WINNT)
@@ -58,16 +57,24 @@ TARGETS		= $(LIBRARY) $(SHARED_LIBRARY) 
 else
 TARGETS		= $(SHARED_LIBRARY) $(IMPORT_LIBRARY)
 endif
 else
 SHARED_LIBRARY	= $(OBJDIR)/libmy.$(DLL_SUFFIX)
 TARGETS		= $(SHARED_LIBRARY)
 endif
 
+#
+# To create a loadable module on Rhapsody, we must override
+# -dynamiclib with -bundle.
+#
+ifeq ($(OS_ARCH),Rhapsody)
+DSO_LDOPTS = -bundle
+endif
+
 include $(MOD_DEPTH)/config/rules.mk
 
 ifeq ($(OS_TARGET), WIN16)
 # Note: The Win16 target: my.dll requires these macros
 # to be overridden to build the test .dll
 # default values in win16...mk are for release targets.
 #
 OS_DLL_OPTION = NOCASEEXACT