Win / x86_64 build fix: do not link to ws2_32.lib when comiling using mingw(64)
In MinGW, the library is on link path.
--- a/Make.proto Wed May 13 06:32:03 2015 +0100
+++ b/Make.proto Wed May 13 06:22:44 2015 +0100
@@ -1,4 +1,4 @@
-# $Header: /cvs/stx/stx/libbasic2/Make.proto,v 1.217 2015-02-21 10:04:30 vrany Exp $
+# $Header$
#
# DO NOT EDIT
# automagically generated from the projectDefinition: stx_libbasic2.
@@ -76,6 +76,13 @@
+# Enforce recompilation of package definition class if Mercurial working
+# copy state changes. Together with --guessVersion it ensures that package
+# definition class always contains correct binary revision string.
+ifneq (**NOHG**, $(shell hg root 2> /dev/null || echo -n '**NOHG**'))
+stx_libbasic2.$(O): $(shell hg root)/.hg/dirstate
+endif
+
--- a/Make.spec Wed May 13 06:32:03 2015 +0100
+++ b/Make.spec Wed May 13 06:22:44 2015 +0100
@@ -1,4 +1,4 @@
-# $Header: /cvs/stx/stx/libbasic2/Make.spec,v 1.116 2015-02-21 10:04:23 vrany Exp $
+# $Header$
#
# DO NOT EDIT
# automagically generated from the projectDefinition: stx_libbasic2.
--- a/bc.mak Wed May 13 06:32:03 2015 +0100
+++ b/bc.mak Wed May 13 06:22:44 2015 +0100
@@ -1,4 +1,4 @@
-# $Header: /cvs/stx/stx/libbasic2/bc.mak,v 1.164 2015-02-21 10:04:41 vrany Exp $
+# $Header$
#
# DO NOT EDIT
# automagically generated from the projectDefinition: stx_libbasic2.
@@ -37,12 +37,18 @@
RESFILES=libbasic2.$(RES)
+!ifdef USEBC
+WS2_32_LIB=ws2_32.lib
+!else
+WS2_32_LIB=
+!endif
+
LOCALINCLUDES=-I$(ZLIB_DIR) -I$(INCLUDE_TOP)\stx\libbasic
LOCALDEFINES=
STCLOCALOPT=-package=$(PACKAGE) -I. $(LOCALINCLUDES) -headerDir=. $(STCLOCALOPTIMIZATIONS) $(STCWARNINGS) $(LOCALDEFINES) $(COMMONSYMBOLS) -varPrefix=$(LIBNAME)
-LOCALLIBS=$(ZLIB_DIR)\$(ZLIB)
+LOCALLIBS=$(ZLIB_DIR)\$(ZLIB) $(WS2_32_LIB)
OBJS= $(COMMON_OBJS) $(WIN32_OBJS)
@@ -61,7 +67,7 @@
$(ZLIB):
cd $(ZLIB_DIR)
- $(MAKE) $(MAKE_ZLIB_ARG) $(ZLIB)
+ $(MAKE_BAT)
cd ..\..\libbasic2
$(BZ2LIB):
@@ -75,7 +81,7 @@
test: $(TOP)\goodies\builder\reports\NUL
pushd $(TOP)\goodies\builder\reports & $(MAKE_BAT)
$(TOP)\goodies\builder\reports\report-runner.bat -D . -r Builder::TestReport -p $(PACKAGE)
-
+
clean::
del *.$(CSUFFIX)
@@ -206,3 +212,12 @@
$(OUTDIR)extensions.$(O): extensions.st $(INCLUDE_TOP)\stx\libbasic\ArithmeticValue.$(H) $(INCLUDE_TOP)\stx\libbasic\ArrayedCollection.$(H) $(INCLUDE_TOP)\stx\libbasic\CharacterArray.$(H) $(INCLUDE_TOP)\stx\libbasic\Collection.$(H) $(INCLUDE_TOP)\stx\libbasic\Float.$(H) $(INCLUDE_TOP)\stx\libbasic\LimitedPrecisionReal.$(H) $(INCLUDE_TOP)\stx\libbasic\Magnitude.$(H) $(INCLUDE_TOP)\stx\libbasic\Number.$(H) $(INCLUDE_TOP)\stx\libbasic\Object.$(H) $(INCLUDE_TOP)\stx\libbasic\SequenceableCollection.$(H) $(INCLUDE_TOP)\stx\libbasic\Stream.$(H) $(INCLUDE_TOP)\stx\libbasic\UninterpretedBytes.$(H) $(STCHDR)
# ENDMAKEDEPEND --- do not remove this line
+
+# **Must be at end**
+
+# Enforce recompilation of package definition class if Mercurial working
+# copy state changes. Together with --guessVersion it ensures that package
+# definition class always contains correct binary revision string.
+!IFDEF HGROOT
+$(OUTDIR)stx_libbasic2.$(O): $(HGROOT)\.hg\dirstate
+!ENDIF
--- a/libInit.cc Wed May 13 06:32:03 2015 +0100
+++ b/libInit.cc Wed May 13 06:22:44 2015 +0100
@@ -1,5 +1,5 @@
/*
- * $Header: /cvs/stx/stx/libbasic2/libInit.cc,v 1.140 2015-02-21 10:05:18 vrany Exp $
+ * $Header$
*
* DO NOT EDIT
* automagically generated from the projectDefinition: stx_libbasic2.
--- a/stx_libbasic2.st Wed May 13 06:32:03 2015 +0100
+++ b/stx_libbasic2.st Wed May 13 06:22:44 2015 +0100
@@ -113,9 +113,26 @@
'
!
+additionalDefinitions_bc_dot_mak
+ "allows for additional definitions/rules to be added to the bc.mak file.
+ Subclasses may redefine this."
+
+ ^'
+!!ifdef USEBC
+WS2_32_LIB=ws2_32.lib
+!!else
+WS2_32_LIB=ws2_32.lib
+!!endif
+'
+
+ "Created: / 12-05-2015 / 19:01:29 / jv"
+!
+
additionalLinkLibraries_bc_dot_mak
"/ ^ '$(ZLIB) $(BZ2LIB)'
- ^ '$(ZLIB_DIR)\$(ZLIB) ws2_32.lib'
+ ^ '$(ZLIB_DIR)\$(ZLIB) $(WS2_32_LIB)'
+
+ "Modified: / 12-05-2015 / 19:00:25 / jv"
!
additionalLinkLibraries_make_dot_proto
@@ -125,15 +142,17 @@
additionalRules_bc_dot_mak
^ '
$(ZLIB):
- cd $(ZLIB_DIR)
- $(MAKE) $(MAKE_ZLIB_ARG) $(ZLIB)
- cd ..\..\libbasic2
+ cd $(ZLIB_DIR)
+ $(MAKE_BAT)
+ cd ..\..\libbasic2
$(BZ2LIB):
- cd $(BZ2LIB_DIR)
- $(MAKE) $(MAKE_BZ2LIB_ARG) bz2.lib
- cd ..\..\libbasic2
+ cd $(BZ2LIB_DIR)
+ $(MAKE) $(MAKE_BZ2LIB_ARG) bz2.lib
+ cd ..\..\libbasic2
'
+
+ "Modified: / 12-05-2015 / 18:53:34 / jv"
!
additionalRules_make_dot_proto
@@ -440,5 +459,9 @@
version_CVS
^ '$Header: /cvs/stx/stx/libbasic2/stx_libbasic2.st,v 1.120 2015-02-21 11:13:35 cg Exp $'
+!
+
+version_HG
+ ^ '$Changeset: <not expanded> $'
! !