summaryrefslogtreecommitdiffstats
path: root/src/plib-2-build-shared-libs.patch
blob: d2893d88f827e4da98c1d4b4f58adf02a45be49c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
This file is part of MXE. See LICENSE.md for licensing information.

Contains ad hoc patches for cross building.

From 65c17852dc3283fcbfa05a807aa61b0e8fe3a958 Mon Sep 17 00:00:00 2001
From: MXE
Date: Mon, 22 Jun 2015 20:13:24 -0700
Subject: [PATCH 1/2] Add option to build shared or static libraries.

This patch was taken from Ubuntu.

diff --git a/configure.in b/configure.in
index f2f7d98..a8c344f 100644
--- a/configure.in
+++ b/configure.in
@@ -36,7 +36,7 @@ AC_PROG_CPP
 AC_PROG_CXX
 AC_PROG_CXXCPP
 AC_PROG_INSTALL
-AC_PROG_RANLIB
+AC_PROG_LIBTOOL
 
 dnl Command line arguments
 
diff --git a/src/Makefile.am b/src/Makefile.am
index ad49fb4..6014707 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -1 +1 @@
-SUBDIRS = util js sl pui puAux sg ssg fnt ssgAux net psl pw
+SUBDIRS = util fnt sg js sl pui puAux ssg ssgAux net psl pw
diff --git a/src/fnt/Makefile.am b/src/fnt/Makefile.am
index d0ef3ca..f88ba1b 100644
--- a/src/fnt/Makefile.am
+++ b/src/fnt/Makefile.am
@@ -1,10 +1,12 @@
 if BUILD_FNT
 
-lib_LIBRARIES = libplibfnt.a
+lib_LTLIBRARIES = libplibfnt.la
 
 include_HEADERS = fnt.h
 
-libplibfnt_a_SOURCES = fnt.cxx fntTXF.cxx fntLocal.h fntBitmap.cxx
+libplibfnt_la_SOURCES = fnt.cxx fntTXF.cxx fntLocal.h fntBitmap.cxx
+libplibfnt_la_LIBADD = ../util/libplibul.la
+libplibfnt_la_LDFLAGS = -version-info 9:5:8
 
 INCLUDES = -I$(top_srcdir)/src/sg -I$(top_srcdir)/src/util
 
diff --git a/src/js/Makefile.am b/src/js/Makefile.am
index df48950..1d857b1 100644
--- a/src/js/Makefile.am
+++ b/src/js/Makefile.am
@@ -1,12 +1,15 @@
 if BUILD_JS
 
-lib_LIBRARIES = libplibjs.a
+lib_LTLIBRARIES = libplibjs.la
 
 include_HEADERS = js.h
 
-libplibjs_a_SOURCES = js.cxx jsLinux.cxx jsLinuxOld.cxx jsMacOS.cxx \
+libplibjs_la_SOURCES = js.cxx jsLinux.cxx jsLinuxOld.cxx jsMacOS.cxx \
                              jsMacOSX.cxx jsWindows.cxx jsBSD.cxx   \
                              jsNone.cxx
+libplibjs_la_LIBADD = ../util/libplibul.la
+libplibjs_la_LDFLAGS = -version-info 9:5:8
+
 
 INCLUDES = -I$(top_srcdir)/src/util
 
diff --git a/src/net/Makefile.am b/src/net/Makefile.am
index 48de5c7..6388f24 100644
--- a/src/net/Makefile.am
+++ b/src/net/Makefile.am
@@ -1,12 +1,14 @@
 if BUILD_NET
 
-lib_LIBRARIES = libplibnet.a
+lib_LTLIBRARIES = libplibnet.la
 
 include_HEADERS = netBuffer.h netChannel.h netChat.h netMessage.h \
 	netMonitor.h netSocket.h net.h
 
-libplibnet_a_SOURCES = netBuffer.cxx netChannel.cxx netChat.cxx \
+libplibnet_la_SOURCES = netBuffer.cxx netChannel.cxx netChat.cxx \
 	netMessage.cxx netMonitor.cxx netSocket.cxx
+libplibnet_la_LIBADD = ../util/libplibul.la
+libplibnet_la_LDFLAGS = -version-info 9:5:8
 
 INCLUDES = -I$(top_srcdir)/src/util
 
diff --git a/src/psl/Makefile.am b/src/psl/Makefile.am
index 6ba1169..12ca743 100644
--- a/src/psl/Makefile.am
+++ b/src/psl/Makefile.am
@@ -1,16 +1,18 @@
 
 if BUILD_PSL
 
-lib_LIBRARIES = libplibpsl.a
+lib_LTLIBRARIES = libplibpsl.la
 
 include_HEADERS = psl.h
 
-libplibpsl_a_SOURCES = psl.cxx pslCodeGen.cxx pslContext.cxx \
+libplibpsl_la_SOURCES = psl.cxx pslCodeGen.cxx pslContext.cxx \
                        pslCompiler.cxx pslSymbols.cxx pslToken.cxx \
                        pslExpression.cxx pslProgram.cxx pslDump.cxx \
                        pslError.cxx pslFileIO.cxx pslCompiler.h \
                        pslContext.h pslFileIO.h pslLocal.h \
                        pslOpcodes.h pslSymbol.h
+libplibpsl_la_LIBADD = ../util/libplibul.la
+libplibpsl_la_LDFLAGS = -version-info 9:5:8
 
 INCLUDES = -I$(top_srcdir)/src/util
 
diff --git a/src/puAux/Makefile.am b/src/puAux/Makefile.am
index 3fc6939..55a71b1 100644
--- a/src/puAux/Makefile.am
+++ b/src/puAux/Makefile.am
@@ -1,10 +1,10 @@
 if BUILD_PUAUX
 
-lib_LIBRARIES = libplibpuaux.a
+lib_LTLIBRARIES = libplibpuaux.la
 
 include_HEADERS = puAux.h puAuxLocal.h
 
-libplibpuaux_a_SOURCES = puAux.cxx                  \
+libplibpuaux_la_SOURCES = puAux.cxx                  \
                          puAuxBiSlider.cxx          \
                          puAuxBiSliderWithEnds.cxx  \
                          puAuxComboBox.cxx          \
@@ -19,6 +19,9 @@ libplibpuaux_a_SOURCES = puAux.cxx                  \
                          puAuxTriSlider.cxx         \
                          puAuxVerticalMenu.cxx      \
                          puAuxChooser.cxx
+libplibpuaux_la_LIBADD = ../util/libplibul.la ../pui/libplibpu.la \
+	../fnt/libplibfnt.la ../sg/libplibsg.la
+libplibpuaux_la_LDFLAGS = -version-info 9:5:8
 
 INCLUDES = -I$(top_srcdir)/src/sg  \
            -I$(top_srcdir)/src/pui \
diff --git a/src/pui/Makefile.am b/src/pui/Makefile.am
index d695d81..f524611 100644
--- a/src/pui/Makefile.am
+++ b/src/pui/Makefile.am
@@ -1,10 +1,10 @@
 if BUILD_PUI
 
-lib_LIBRARIES = libplibpu.a
+lib_LTLIBRARIES = libplibpu.la
 
 include_HEADERS = pu.h puGLUT.h puFLTK.h puSDL.h puNative.h puPW.h
 
-libplibpu_a_SOURCES = \
+libplibpu_la_SOURCES = \
         pu.cxx            puBox.cxx       puButton.cxx puButtonBox.cxx    \
         puArrowButton.cxx puDialogBox.cxx puFrame.cxx  puGroup.cxx        \
         puInput.cxx       puInterface.cxx puLocal.h    puMenuBar.cxx      \
@@ -14,6 +14,8 @@ libplibpu_a_SOURCES = \
         puDial.cxx        \
         puRange.cxx	  \
         puInputBase.cxx
+libplibpu_la_LIBADD = ../util/libplibul.la ../fnt/libplibfnt.la
+libplibpu_la_LDFLAGS = -version-info 9:5:8
 
 AM_CPPFLAGS = -I$(top_srcdir)/src/sg -I$(top_srcdir)/src/fnt
 AM_CPPFLAGS += -I$(top_srcdir)/src/util
diff --git a/src/pw/Makefile.am b/src/pw/Makefile.am
index 151fbd3..ffc4b39 100644
--- a/src/pw/Makefile.am
+++ b/src/pw/Makefile.am
@@ -1,10 +1,11 @@
 if BUILD_PW
 
-lib_LIBRARIES = libplibpw.a
+lib_LTLIBRARIES = libplibpw.la
 
 include_HEADERS = pw.h
 
-libplibpw_a_SOURCES = pw.cxx pwX11.cxx pwWindows.cxx pwMacOSX.cxx
+libplibpw_la_SOURCES = pw.cxx pwX11.cxx pwWindows.cxx pwMacOSX.cxx
+libplibpw_la_LDFLAGS = -version-info 9:5:8
 
 INCLUDES = -I$(top_srcdir)/src/util
 
diff --git a/src/sg/Makefile.am b/src/sg/Makefile.am
index e3e4825..825cce6 100644
--- a/src/sg/Makefile.am
+++ b/src/sg/Makefile.am
@@ -1,12 +1,14 @@
 if BUILD_SG
 
-lib_LIBRARIES = libplibsg.a
+lib_LTLIBRARIES = libplibsg.la
 
 include_HEADERS = sg.h
 
-libplibsg_a_SOURCES = sg.cxx sgd.cxx \
+libplibsg_la_SOURCES = sg.cxx sgd.cxx \
                       sgIsect.cxx sgdIsect.cxx \
                       sgPerlinNoise.cxx
+libplibsg_la_LIBADD = ../util/libplibul.la
+libplibsg_la_LDFLAGS = -version-info 9:5:8
 
 INCLUDES = -I$(top_srcdir)/src/util
 
diff --git a/src/sl/Makefile.am b/src/sl/Makefile.am
index 97b3fb3..e7b2799 100644
--- a/src/sl/Makefile.am
+++ b/src/sl/Makefile.am
@@ -1,16 +1,19 @@
 if BUILD_SL
 
-lib_LIBRARIES = libplibsl.a libplibsm.a
+lib_LTLIBRARIES = libplibsl.la libplibsm.la
 
 include_HEADERS = sl.h slPortability.h sm.h
 
-libplibsl_a_SOURCES = \
+libplibsl_la_SOURCES = \
 	slDSP.cxx slSample.cxx slEnvelope.cxx \
 	slPlayer.cxx slMODPlayer.cxx slSamplePlayer.cxx \
         slScheduler.cxx slMODdacio.cxx slMODfile.cxx \
         slMODinst.cxx slMODnote.cxx slMODPrivate.h slMODfile.h
+libplibsl_la_LIBADD = ../util/libplibul.la
+libplibsl_la_LDFLAGS = -version-info 9:5:8
 
-libplibsm_a_SOURCES = slPortability.h smMixer.cxx
+libplibsm_la_SOURCES = slPortability.h smMixer.cxx
+libplibsm_la_LDFLAGS = -version-info 9:5:8
 
 INCLUDES = -I$(top_srcdir)/src/util
 
diff --git a/src/ssg/Makefile.am b/src/ssg/Makefile.am
index bdfeac8..3e8977a 100644
--- a/src/ssg/Makefile.am
+++ b/src/ssg/Makefile.am
@@ -1,10 +1,10 @@
 if BUILD_SSG
 
-lib_LIBRARIES = libplibssg.a
+lib_LTLIBRARIES = libplibssg.la
 
 include_HEADERS = ssg.h ssgconf.h ssgMSFSPalette.h ssgKeyFlier.h pcx.h
 
-libplibssg_a_SOURCES = ssg.cxx ssgAnimation.cxx ssgBase.cxx \
+libplibssg_la_SOURCES = ssg.cxx ssgAnimation.cxx ssgBase.cxx \
 	ssgBaseTransform.cxx ssgBranch.cxx ssgContext.cxx ssgCutout.cxx \
 	ssgDList.cxx ssgEntity.cxx ssgIsect.cxx ssgLeaf.cxx ssgList.cxx \
 	ssgLoadDOF.cxx ssgLoadAC.cxx \
@@ -28,6 +28,8 @@ libplibssg_a_SOURCES = ssg.cxx ssgAnimation.cxx ssgBase.cxx \
 	ssgLoadMDL_BGLTexture.cxx ssgLoadXPlaneObj.cxx ssgLoadASC.cxx ssgSaveASC.cxx \
 	ssgSaveIV.cxx ssgAnimTransform.cxx\
 	ssgVertSplitter.h ssgVertSplitter.cxx ssgStatistics.cxx
+libplibssg_la_LIBADD = ../util/libplibul.la ../sg/libplibsg.la
+libplibssg_la_LDFLAGS = -version-info 9:5:8
 
 INCLUDES = -I$(top_srcdir)/src/sg -I$(top_srcdir)/src/util
 
diff --git a/src/ssgAux/Makefile.am b/src/ssgAux/Makefile.am
index 0d42cac..9bb9b3d 100644
--- a/src/ssgAux/Makefile.am
+++ b/src/ssgAux/Makefile.am
@@ -1,6 +1,6 @@
 if BUILD_SSGAUX
 
-lib_LIBRARIES = libplibssgaux.a
+lib_LTLIBRARIES = libplibssgaux.la
 
 include_HEADERS = ssgAux.h             \
                   ssgaShapes.h         \
@@ -13,7 +13,7 @@ include_HEADERS = ssgAux.h             \
                   ssgaFire.h           \
                   ssgaBillboards.h
 
-libplibssgaux_a_SOURCES = ssgAux.cxx               \
+libplibssgaux_la_SOURCES = ssgAux.cxx               \
                           ssgaShapes.cxx           \
                           ssgaPatch.cxx            \
                           ssgaParticleSystem.cxx   \
@@ -30,6 +30,9 @@ libplibssgaux_a_SOURCES = ssgAux.cxx               \
                           ssgaSky.cxx              \
                           ssgaTeapot.cxx           \
                           ssgaBillboards.cxx
+libplibssgaux_la_LIBADD = ../util/libplibul.la ../ssg/libplibssg.la \
+	../sg/libplibsg.la
+libplibssgaux_la_LDFLAGS = -version-info 9:5:8
 
 INCLUDES = -I$(top_srcdir)/src/sg -I$(top_srcdir)/src/ssg
 INCLUDES += -I$(top_srcdir)/src/util
diff --git a/src/util/Makefile.am b/src/util/Makefile.am
index 4000358..373f676 100644
--- a/src/util/Makefile.am
+++ b/src/util/Makefile.am
@@ -1,11 +1,12 @@
 if BUILD_UL
 
-lib_LIBRARIES = libplibul.a
+lib_LTLIBRARIES = libplibul.la
 
 include_HEADERS = ul.h ulRTTI.h
 
-libplibul_a_SOURCES = ul.cxx ulClock.cxx ulError.cxx ulLinkedList.cxx \
+libplibul_la_SOURCES = ul.cxx ulClock.cxx ulError.cxx ulLinkedList.cxx \
         ulList.cxx ulLocal.h ulRTTI.cxx
+libplibul_la_LDFLAGS = -version-info 9:5:8
 
 endif
 
-- 
2.1.4


From 03c36916119d994d7776934e3213334300bbe9e9 Mon Sep 17 00:00:00 2001
From: MXE
Date: Mon, 22 Jun 2015 22:02:32 -0700
Subject: [PATCH 2/2] Add in missing libraries.


diff --git a/src/net/Makefile.am b/src/net/Makefile.am
index 6388f24..f841150 100644
--- a/src/net/Makefile.am
+++ b/src/net/Makefile.am
@@ -8,7 +8,7 @@ include_HEADERS = netBuffer.h netChannel.h netChat.h netMessage.h \
 libplibnet_la_SOURCES = netBuffer.cxx netChannel.cxx netChat.cxx \
 	netMessage.cxx netMonitor.cxx netSocket.cxx
 libplibnet_la_LIBADD = ../util/libplibul.la
-libplibnet_la_LDFLAGS = -version-info 9:5:8
+libplibnet_la_LDFLAGS = -version-info 9:5:8 -lws2_32
 
 INCLUDES = -I$(top_srcdir)/src/util
 
diff --git a/src/pw/Makefile.am b/src/pw/Makefile.am
index ffc4b39..afef87b 100644
--- a/src/pw/Makefile.am
+++ b/src/pw/Makefile.am
@@ -5,7 +5,7 @@ lib_LTLIBRARIES = libplibpw.la
 include_HEADERS = pw.h
 
 libplibpw_la_SOURCES = pw.cxx pwX11.cxx pwWindows.cxx pwMacOSX.cxx
-libplibpw_la_LDFLAGS = -version-info 9:5:8
+libplibpw_la_LDFLAGS = -version-info 9:5:8 -lgdi32
 
 INCLUDES = -I$(top_srcdir)/src/util
 
-- 
2.1.4