components/perl512/Makefile
changeset 1283 992606b944e8
parent 1206 8f71b436e7f7
child 2225 f064d3d3190d
--- a/components/perl512/Makefile	Wed Apr 24 11:14:11 2013 -0700
+++ b/components/perl512/Makefile	Thu Apr 25 17:27:57 2013 -0700
@@ -91,6 +91,9 @@
 			    -O \
 			    -de
 
+CONFIGURE_THREAD_OPTIONS =  -Dusethreads \
+			    -Duseithreads
+
 COMPONENT_POST_CONFIGURE_ACTION = \
 	(cd $(@D); \
 	    cp config.sh config.sh_orig ; \
@@ -116,6 +119,22 @@
 #
 COMPONENT_BUILD_ENV	+=	PATH=$(dir $(CC.studio.32)):$(PATH)
 
+# ST=single-thread.  MT=multi-thread.  The only difference in the build is that
+# $(CONFIGURE_THREAD_OPTIONS) gets added to $(CONFIGURE_OPTIONS) in the MT case.
+#
+ST_VARIANT =	$(BUILD_DIR)/$(MACH32)-st
+MT_VARIANT =	$(BUILD_DIR)/$(MACH32)-mt
+
+VARIANTS =	$(MT_VARIANT) $(ST_VARIANT)
+
+$(VARIANTS:%=%/.configured):	BITS=32
+
+$(MT_VARIANT)/.configured:	CONFIGURE_OPTIONS += $(CONFIGURE_THREAD_OPTIONS)
+
+BUILD_32 =	$(VARIANTS:%=%/.built)
+INSTALL_32 =	$(VARIANTS:%=%/.installed)
+TEST_32 =	$(VARIANTS:%=%/.tested)
+
 build:		$(BUILD_32)
 
 install:	$(INSTALL_32)