File: makefile-win

package info (click to toggle)
golly 3.3-1
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 20,220 kB
  • sloc: cpp: 72,638; ansic: 25,919; python: 7,921; sh: 4,245; objc: 3,721; java: 2,781; xml: 1,362; makefile: 530; perl: 69
file content (530 lines) | stat: -rwxr-xr-x 18,694 bytes parent folder | download | duplicates (2)
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
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
# Makefile for Windows version of Golly using wxWidgets.
#
# Use local-win-template.mk to create local-win.mk with paths to your installed libraries.
#
# Compile wxWidgets and Golly as below:
#
# On 32-bit Windows: (from a Visual Studio command prompt)
#
#   Build wxWidgets:
#    cd \wxWidgets\build\msw
#    nmake -f makefile.vc BUILD=release RUNTIME_LIBS=static DEBUG_INFO=0 DEBUG_FLAG=0 UNICODE=1 USE_OPENGL=1
#   Build Golly:
#    cd \golly\gui-wx
#    nmake -f makefile-win BUILD=release RUNTIME_LIBS=static DEBUG_INFO=0 DEBUG_FLAG=0 UNICODE=1 USE_OPENGL=1
#
# On 64-bit Windows: (from a Visual Studio 64-bit command prompt)
#
#   Build wxWidgets:
#    cd \wxWidgets\build\msw
#    nmake -f makefile.vc BUILD=release RUNTIME_LIBS=static DEBUG_INFO=0 DEBUG_FLAG=0 UNICODE=1 USE_OPENGL=1 TARGET_CPU=X64
#   Build Golly:
#    cd \golly\gui-wx
#    nmake -f makefile-win BUILD=release RUNTIME_LIBS=static DEBUG_INFO=0 DEBUG_FLAG=0 UNICODE=1 USE_OPENGL=1 TARGET_CPU=X64
# 
# If you only build one wxWidgets configuration (e.g. a 32-bit release) then you can edit
# \wxWidgets\build\msw\config.vc and set all those options. Then you can build wxWidgets and Golly
# simply with:
#
#   Build wxWidgets:
#    cd \wxWidgets\build\msw
#    nmake -f makefile.vc
#   Build Golly:
#    cd \golly\gui-wx
#    nmake -f makefile-win

#   All system-dependent changes belong in local-win.mk
!include local-win.mk

### Golly-related variables: ###

APP_VERSION = 3.3

# these directory paths are relative to the location of this makefile:
EXEDIR = ..
DOCSDIR = ..\docs
BASEDIR = ..\gollybase
CMDDIR = ..\cmdline
LUADIR = ..\lua

!if "$(ENABLE_SOUND)" == "1"
# sound library
IRRKLANG_INCLUDE = $(IRRKLANGDIR)\include
IRRKLANG_CXXFLAGS = /I$(IRRKLANG_INCLUDE) /DENABLE_SOUND /DIRRKLANG_STATIC
IRRKLANG_LIBS = $(IRRKLANGDIR)\lib\Winx64-visualStudio\irrKlangPro.lib
!endif

# for building binary and source distributions:
RELEASENAME = $(EXEDIR)\golly-$(APP_VERSION)
GUIFILES = makefile-gtk makefile-mac makefile-win local-win-template.mk \
   golly.rc Info.plist.in wx*.h wx*.cpp
GUIDIRS = configure bitmaps icons
LUAFILES = $(LUADIR)\*.h $(LUADIR)\*.c $(LUADIR)\*.hpp $(LUADIR)\Makefile $(LUADIR)\ReadMe.html
BINFILES = $(EXEDIR)\Golly.exe $(EXEDIR)\bgolly.exe $(DOCSDIR)\ReadMe.html $(DOCSDIR)\License.html

!if "$(TARGET_CPU)" == "X64"
LIBDIRNAME = $(WX_DIR)\lib\vc_x64_$(LIBTYPE_SUFFIX)$(CFG)
WX_CPU_DEF = WX_CPU_AMD64   # ensures include/wx/msw/amd64.manifest is included in golly.res
BINNAME = $(RELEASENAME)-win-64bit
!else
LIBDIRNAME = $(WX_DIR)\lib\vc_$(LIBTYPE_SUFFIX)$(CFG)
WX_CPU_DEF = WX_CPU_X86
BINNAME = $(RELEASENAME)-win-32bit
!endif

SETUPHDIR = $(LIBDIRNAME)\$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)

### note that /wd4100 turns off annoying warnings about "unreferenced formal parameter"
### in wx 2.9 when debugging assertions are disabled
CXXFLAGS = /M$(__RUNTIME_LIBS_8)$(__DEBUGRUNTIME_3) /DWIN32 \
	$(__DEBUGINFO_0) /Fdgolly.pdb $(____DEBUGRUNTIME_2_p) \
	$(__OPTIMIZEFLAG_4) $(__NO_VC_CRTDBG_p) /D__WXMSW__ $(__WXUNIV_DEFINE_p) \
	$(__DEBUG_DEFINE_p) $(__NDEBUG_DEFINE_p) $(__EXCEPTIONS_DEFINE_p) $(__RTTI_DEFINE_p) \
	$(__THREAD_DEFINE_p) $(__UNICODE_DEFINE_p) /I$(WX_DIR)\include /I$(SETUPHDIR) \
	/W4 /wd4100 /I. $(__DLLFLAG_p) /D_WINDOWS /I$(WX_DIR)\samples /DNOPCH $(__RTTIFLAG_9) \
        $(IRRKLANG_CXXFLAGS) \
	$(__EXCEPTIONSFLAG_10) $(CPPFLAGS) \
	/D_CRT_SECURE_NO_WARNINGS /D_CRT_NONSTDC_NO_WARNINGS \
	/EHsc /DVERSION=$(APP_VERSION) /DZLIB /I$(WX_DIR)\src\zlib /I$(BASEDIR) $(EXTRACXXFLAGS) \
	/wd4459 /wd4458 /wd4457 /wd4456

OBJDIR = ObjWin
BASEH = $(BASEDIR)/bigint.h $(BASEDIR)/ghashbase.h $(BASEDIR)/hlifealgo.h $(BASEDIR)/jvnalgo.h \
    $(BASEDIR)/platform.h $(BASEDIR)/lifealgo.h $(BASEDIR)/lifepoll.h $(BASEDIR)/liferender.h $(BASEDIR)/liferules.h \
    $(BASEDIR)/qlifealgo.h $(BASEDIR)/ltlalgo.h $(BASEDIR)/readpattern.h $(BASEDIR)/util.h $(BASEDIR)/viewport.h \
    $(BASEDIR)/writepattern.h $(BASEDIR)/ruletreealgo.h $(BASEDIR)/generationsalgo.h $(BASEDIR)/ruletable_algo.h \
    $(BASEDIR)/ruleloaderalgo.h
BASEO = $(OBJDIR)/bigint.obj $(OBJDIR)/lifealgo.obj $(OBJDIR)/hlifealgo.obj \
    $(OBJDIR)/hlifedraw.obj $(OBJDIR)/qlifealgo.obj $(OBJDIR)/qlifedraw.obj \
    $(OBJDIR)/ltlalgo.obj $(OBJDIR)/ltldraw.obj $(OBJDIR)/jvnalgo.obj $(OBJDIR)/ruletreealgo.obj \
    $(OBJDIR)/ruletable_algo.obj $(OBJDIR)/ghashbase.obj $(OBJDIR)/ruleloaderalgo.obj \
    $(OBJDIR)/ghashdraw.obj $(OBJDIR)/readpattern.obj \
    $(OBJDIR)/writepattern.obj $(OBJDIR)/liferules.obj $(OBJDIR)/util.obj \
    $(OBJDIR)/liferender.obj $(OBJDIR)/viewport.obj $(OBJDIR)/lifepoll.obj \
    $(OBJDIR)/generationsalgo.obj
WXH = wxalgos.h wxedit.h wxgolly.h wxhelp.h wxinfo.h wxlayer.h wxmain.h wxprefs.h \
    wxlua.h wxperl.h wxpython.h wxrender.h wxrule.h wxscript.h wxselect.h wxstatus.h \
    wxtimeline.h wxundo.h wxutils.h wxview.h wxoverlay.h
WXO = $(OBJDIR)/wxutils.obj $(OBJDIR)/wxprefs.obj $(OBJDIR)/wxalgos.obj \
    $(OBJDIR)/wxrule.obj $(OBJDIR)/wxinfo.obj $(OBJDIR)/wxhelp.obj \
    $(OBJDIR)/wxstatus.obj $(OBJDIR)/wxview.obj $(OBJDIR)/wxoverlay.obj $(OBJDIR)/wxrender.obj \
    $(OBJDIR)/wxscript.obj $(OBJDIR)/wxlua.obj $(OBJDIR)/wxperl.obj $(OBJDIR)/wxpython.obj \
    $(OBJDIR)/wxfile.obj $(OBJDIR)/wxedit.obj $(OBJDIR)/wxcontrol.obj \
    $(OBJDIR)/wxtimeline.obj $(OBJDIR)/wxundo.obj $(OBJDIR)/wxlayer.obj \
    $(OBJDIR)/wxmain.obj $(OBJDIR)/wxselect.obj $(OBJDIR)/wxgolly.obj
LUAO = $(LUADIR)\lapi.obj \
    $(LUADIR)\lauxlib.obj \
    $(LUADIR)\lbaselib.obj \
    $(LUADIR)\lbitlib.obj \
    $(LUADIR)\lcode.obj \
    $(LUADIR)\lcorolib.obj \
    $(LUADIR)\lctype.obj \
    $(LUADIR)\ldblib.obj \
    $(LUADIR)\ldebug.obj \
    $(LUADIR)\ldo.obj \
    $(LUADIR)\ldump.obj \
    $(LUADIR)\lfunc.obj \
    $(LUADIR)\lgc.obj \
    $(LUADIR)\linit.obj \
    $(LUADIR)\liolib.obj \
    $(LUADIR)\llex.obj \
    $(LUADIR)\lmathlib.obj \
    $(LUADIR)\lmem.obj \
    $(LUADIR)\loadlib.obj \
    $(LUADIR)\lobject.obj \
    $(LUADIR)\lopcodes.obj \
    $(LUADIR)\loslib.obj \
    $(LUADIR)\lparser.obj \
    $(LUADIR)\lstate.obj \
    $(LUADIR)\lstring.obj \
    $(LUADIR)\lstrlib.obj \
    $(LUADIR)\ltable.obj \
    $(LUADIR)\ltablib.obj \
    $(LUADIR)\ltm.obj \
    $(LUADIR)\lundump.obj \
    $(LUADIR)\lutf8lib.obj \
    $(LUADIR)\lvm.obj \
    $(LUADIR)\lzio.obj

### Conditionally set variables: ###

PORTNAME = msw
!if "$(BUILD)" == "debug" && "$(DEBUG_FLAG)" == "default"
WXDEBUGFLAG = d
!endif
!if "$(DEBUG_FLAG)" == "1"
WXDEBUGFLAG = d
!endif
!if "$(UNICODE)" == "1"
WXUNICODEFLAG = u
!endif
!if "$(WXUNIV)" == "1"
WXUNIVNAME = univ
!endif
!if "$(SHARED)" == "1"
WXDLLFLAG = dll
!endif
!if "$(SHARED)" == "0"
LIBTYPE_SUFFIX = lib
!endif
!if "$(SHARED)" == "1"
LIBTYPE_SUFFIX = dll
!endif
!if "$(BUILD)" == "debug" && "$(DEBUG_INFO)" == "default"
__DEBUGINFO_0 = /Zi
!endif
!if "$(BUILD)" == "release" && "$(DEBUG_INFO)" == "default"
__DEBUGINFO_0 = 
!endif
!if "$(DEBUG_INFO)" == "0"
__DEBUGINFO_0 = 
!endif
!if "$(DEBUG_INFO)" == "1"
__DEBUGINFO_0 = /Zi
!endif
!if "$(BUILD)" == "debug" && "$(DEBUG_INFO)" == "default"
__DEBUGINFO_1 = /DEBUG
!endif
!if "$(BUILD)" == "release" && "$(DEBUG_INFO)" == "default"
__DEBUGINFO_1 = 
!endif
!if "$(DEBUG_INFO)" == "0"
__DEBUGINFO_1 = 
!endif
!if "$(DEBUG_INFO)" == "1"
__DEBUGINFO_1 = /DEBUG
!endif
!if "$(BUILD)" == "debug" && "$(DEBUG_RUNTIME_LIBS)" == "default"
____DEBUGRUNTIME_2_p = /D_DEBUG
!endif
!if "$(BUILD)" == "release" && "$(DEBUG_RUNTIME_LIBS)" == "default"
____DEBUGRUNTIME_2_p = 
!endif
!if "$(DEBUG_RUNTIME_LIBS)" == "0"
____DEBUGRUNTIME_2_p = 
!endif
!if "$(DEBUG_RUNTIME_LIBS)" == "1"
____DEBUGRUNTIME_2_p = /D_DEBUG
!endif
!if "$(BUILD)" == "debug" && "$(DEBUG_RUNTIME_LIBS)" == "default"
____DEBUGRUNTIME_2_p_1 = /d _DEBUG
!endif
!if "$(BUILD)" == "release" && "$(DEBUG_RUNTIME_LIBS)" == "default"
____DEBUGRUNTIME_2_p_1 = 
!endif
!if "$(DEBUG_RUNTIME_LIBS)" == "0"
____DEBUGRUNTIME_2_p_1 = 
!endif
!if "$(DEBUG_RUNTIME_LIBS)" == "1"
____DEBUGRUNTIME_2_p_1 = /d _DEBUG
!endif
!if "$(BUILD)" == "debug" && "$(DEBUG_RUNTIME_LIBS)" == "default"
__DEBUGRUNTIME_3 = d
!endif
!if "$(BUILD)" == "release" && "$(DEBUG_RUNTIME_LIBS)" == "default"
__DEBUGRUNTIME_3 = 
!endif
!if "$(DEBUG_RUNTIME_LIBS)" == "0"
__DEBUGRUNTIME_3 = 
!endif
!if "$(DEBUG_RUNTIME_LIBS)" == "1"
__DEBUGRUNTIME_3 = d
!endif
!if "$(BUILD)" == "debug"
__OPTIMIZEFLAG_4 = /Od
!endif
!if "$(BUILD)" == "release"
__OPTIMIZEFLAG_4 = /O2
!endif
!if "$(USE_THREADS)" == "0"
__THREADSFLAG_7 = L
!endif
!if "$(USE_THREADS)" == "1"
__THREADSFLAG_7 = T
!endif
!if "$(RUNTIME_LIBS)" == "dynamic"
__RUNTIME_LIBS_8 = D
!endif
!if "$(RUNTIME_LIBS)" == "static"
__RUNTIME_LIBS_8 = $(__THREADSFLAG_7)
!endif
!if "$(USE_RTTI)" == "0"
__RTTIFLAG_9 = 
!endif
!if "$(USE_RTTI)" == "1"
__RTTIFLAG_9 = /GR
!endif
!if "$(USE_EXCEPTIONS)" == "0"
__EXCEPTIONSFLAG_10 = 
!endif
!if "$(USE_EXCEPTIONS)" == "1"
__EXCEPTIONSFLAG_10 = /EHsc
!endif
!if "$(BUILD)" == "debug" && "$(DEBUG_RUNTIME_LIBS)" == "0"
__NO_VC_CRTDBG_p = /D__NO_VC_CRTDBG__
!endif
!if "$(BUILD)" == "release" && "$(DEBUG_FLAG)" == "1"
__NO_VC_CRTDBG_p = /D__NO_VC_CRTDBG__
!endif
!if "$(BUILD)" == "debug" && "$(DEBUG_RUNTIME_LIBS)" == "0"
__NO_VC_CRTDBG_p_1 = /d __NO_VC_CRTDBG__
!endif
!if "$(BUILD)" == "release" && "$(DEBUG_FLAG)" == "1"
__NO_VC_CRTDBG_p_1 = /d __NO_VC_CRTDBG__
!endif
!if "$(WXUNIV)" == "1"
__WXUNIV_DEFINE_p = /D__WXUNIVERSAL__
!endif
!if "$(WXUNIV)" == "1"
__WXUNIV_DEFINE_p_1 = /d __WXUNIVERSAL__
!endif
!if "$(BUILD)" == "debug" && "$(DEBUG_FLAG)" == "default"
__DEBUG_DEFINE_p = /D__WXDEBUG__
!endif
!if "$(DEBUG_FLAG)" == "1"
__DEBUG_DEFINE_p = /D__WXDEBUG__
!endif
!if "$(BUILD)" == "debug" && "$(DEBUG_FLAG)" == "default"
__DEBUG_DEFINE_p_1 = /d __WXDEBUG__
!endif
!if "$(DEBUG_FLAG)" == "1"
__DEBUG_DEFINE_p_1 = /d __WXDEBUG__
!endif


### following is needed for wxMSW 2.9.x
!if "$(DEBUG_FLAG)" == "0"
__DEBUG_DEFINE_p = /DwxDEBUG_LEVEL=0
!endif
!if "$(DEBUG_FLAG)" == "0"
__DEBUG_DEFINE_p_1 = /d wxDEBUG_LEVEL=0
!endif
!if "$(BUILD)" == "release" && "$(DEBUG_RUNTIME_LIBS)" == "default"
__NDEBUG_DEFINE_p = /DNDEBUG
!endif
!if "$(DEBUG_RUNTIME_LIBS)" == "0"
__NDEBUG_DEFINE_p = /DNDEBUG
!endif
!if "$(BUILD)" == "release" && "$(DEBUG_RUNTIME_LIBS)" == "default"
__NDEBUG_DEFINE_p_1 = /d NDEBUG
!endif
!if "$(DEBUG_RUNTIME_LIBS)" == "0"
__NDEBUG_DEFINE_p_1 = /d NDEBUG
!endif


!if "$(USE_EXCEPTIONS)" == "0"
__EXCEPTIONS_DEFINE_p = /DwxNO_EXCEPTIONS
!endif
!if "$(USE_EXCEPTIONS)" == "0"
__EXCEPTIONS_DEFINE_p_1 = /d wxNO_EXCEPTIONS
!endif
!if "$(USE_RTTI)" == "0"
__RTTI_DEFINE_p = /DwxNO_RTTI
!endif
!if "$(USE_RTTI)" == "0"
__RTTI_DEFINE_p_1 = /d wxNO_RTTI
!endif
!if "$(USE_THREADS)" == "0"
__THREAD_DEFINE_p = /DwxNO_THREADS
!endif
!if "$(USE_THREADS)" == "0"
__THREAD_DEFINE_p_1 = /d wxNO_THREADS
!endif
!if "$(UNICODE)" == "1"
__UNICODE_DEFINE_p = /D_UNICODE
!endif
!if "$(UNICODE)" == "1"
__UNICODE_DEFINE_p_1 = /d _UNICODE
!endif
!if "$(SHARED)" == "1"
__DLLFLAG_p = /DWXUSINGDLL
!endif
!if "$(SHARED)" == "1"
__DLLFLAG_p_1 = /d WXUSINGDLL
!endif
!if "$(MONOLITHIC)" == "0"
__WXLIB_HTML_p = \
	wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_html.lib
!endif
!if "$(MONOLITHIC)" == "0"
__WXLIB_ADV_p = \
	wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_adv.lib
!endif
!if "$(MONOLITHIC)" == "0"
__WXLIB_CORE_p = \
	wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_core.lib
!endif
!if "$(MONOLITHIC)" == "0"
__WXLIB_BASE_p = \
	wxbase$(WX_RELEASE)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR).lib
!endif
!if "$(MONOLITHIC)" == "0"
__WXLIB_NET_p = \
	wxbase$(WX_RELEASE)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_net.lib
!endif
!if "$(MONOLITHIC)" == "1"
__WXLIB_MONO_p = \
	wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR).lib
!endif
!if "$(MSLU)" == "1"
__UNICOWS_LIB_p = unicows.lib
!endif

__LIB_TIFF_p = wxtiff$(WXDEBUGFLAG).lib
__LIB_JPEG_p = wxjpeg$(WXDEBUGFLAG).lib
__LIB_PNG_p = wxpng$(WXDEBUGFLAG).lib

### Targets: ###

all: $(OBJDIR) $(EXEDIR)\Golly.exe $(EXEDIR)\bgolly.exe

$(BASEO): $(BASEH)

$(WXO): $(BASEH) $(WXH) icons\*.ico bitmaps\*.xpm

$(LUAO):
	cd "$(LUADIR)"
	cl /MP8 /MT /O2 /c /nologo $(LUA_DEFS) *.c
	cd "$(MAKEDIR)"

$(OBJDIR):
	mkdir $(OBJDIR)

clean: 
	-if exist $(OBJDIR)\*.obj del $(OBJDIR)\*.obj
	-if exist *.res del *.res
	-if exist $(EXEDIR)\Golly.exe del $(EXEDIR)\Golly.exe
	-if exist $(EXEDIR)\bgolly.exe del $(EXEDIR)\bgolly.exe
	-if exist $(EXEDIR)\RuleTableToTree.exe del $(EXEDIR)\RuleTableToTree.exe
	-if exist golly.pdb del golly.pdb
	-if exist $(LUADIR)\*.obj del $(LUADIR)\*.obj

$(EXEDIR)\Golly.exe: $(BASEO) $(WXO) $(LUAO) golly.res
	link /LARGEADDRESSAWARE /NOLOGO /OUT:$(EXEDIR)\Golly.exe $(LDFLAGS) $(__DEBUGINFO_1) /pdb:"golly.pdb" \
	/MANIFEST:NO /LIBPATH:$(LIBDIRNAME) /SUBSYSTEM:WINDOWS $(BASEO) $(WXO) $(LUAO) golly.res \
	$(__WXLIB_HTML_p) $(__WXLIB_ADV_p) $(__WXLIB_CORE_p) $(__WXLIB_BASE_p) $(__WXLIB_NET_p) \
	$(__WXLIB_MONO_p) $(__LIB_TIFF_p) $(__LIB_JPEG_p) $(__LIB_PNG_p) wxzlib$(WXDEBUGFLAG).lib \
	wxregex$(WXUNICODEFLAG)$(WXDEBUGFLAG).lib wxexpat$(WXDEBUGFLAG).lib \
	wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_gl.lib \
	$(__UNICOWS_LIB_p) kernel32.lib user32.lib gdi32.lib comdlg32.lib \
	winspool.lib winmm.lib shell32.lib comctl32.lib ole32.lib oleaut32.lib uuid.lib \
	rpcrt4.lib advapi32.lib wsock32.lib wininet.lib opengl32.lib $(IRRKLANG_LIBS)

golly.res: golly.rc
	rc /fo$@ /d $(WX_CPU_DEF) /d WIN32 $(____DEBUGRUNTIME_2_p_1) $(__NO_VC_CRTDBG_p_1)  /d __WXMSW__ $(__WXUNIV_DEFINE_p_1) \
	$(__DEBUG_DEFINE_p_1) $(__NDEBUG_DEFINE_p_1) $(__EXCEPTIONS_DEFINE_p_1) $(__RTTI_DEFINE_p_1) $(__THREAD_DEFINE_p_1) \
	$(__UNICODE_DEFINE_p_1) /i $(WX_DIR)\include /i $(SETUPHDIR) /i . $(__DLLFLAG_p_1) /d _WINDOWS \
	/i $(WX_DIR)\samples /d NOPCH golly.rc

$(EXEDIR)\bgolly.exe: $(BASEO) $(OBJDIR)/bgolly.obj
	link /LARGEADDRESSAWARE /NOLOGO /OUT:$(EXEDIR)\bgolly.exe $(LDFLAGS) /LIBPATH:$(LIBDIRNAME) \
	$(OBJDIR)/bgolly.obj $(BASEO) wxzlib$(WXDEBUGFLAG).lib

$(EXEDIR)\RuleTableToTree.exe: $(BASEO) $(OBJDIR)/RuleTableToTree.obj
	link /LARGEADDRESSAWARE /NOLOGO /OUT:$(EXEDIR)\RuleTableToTree.exe $(LDFLAGS) /LIBPATH:$(LIBDIRNAME) \
	$(OBJDIR)/RuleTableToTree.obj $(BASEO) wxzlib$(WXDEBUGFLAG).lib

$(OBJDIR)/bgolly.obj: $(CMDDIR)/bgolly.cpp
	$(CXX) /c /nologo /Fo$@ $(CXXFLAGS) $(CMDDIR)/bgolly.cpp

$(OBJDIR)/RuleTableToTree.obj: $(CMDDIR)/RuleTableToTree.cpp
	$(CXX) /c /nologo /Fo$@ $(CXXFLAGS) $(CMDDIR)/RuleTableToTree.cpp

MBASEO = $(OBJDIR)/bigint.obj $(OBJDIR)/lifealgo.obj $(OBJDIR)/hlifealgo.obj \
    $(OBJDIR)/hlifedraw.obj $(OBJDIR)/qlifealgo.obj $(OBJDIR)/qlifedraw.obj \
    $(OBJDIR)/ltlalgo.obj $(OBJDIR)/ltldraw.obj $(OBJDIR)/jvnalgo.obj $(OBJDIR)/ruletreealgo.obj \
    $(OBJDIR)/ruletable_algo.obj $(OBJDIR)/ghashbase.obj $(OBJDIR)/ruleloaderalgo.obj \
    $(OBJDIR)/ghashdraw.obj $(OBJDIR)/readpattern.obj \
    $(OBJDIR)/writepattern.obj $(OBJDIR)/liferules.obj $(OBJDIR)/util.obj \
    $(OBJDIR)/liferender.obj $(OBJDIR)/viewport.obj $(OBJDIR)/lifepoll.obj \
    $(OBJDIR)/generationsalgo.obj

MBASES = $(BASEDIR)/bigint.cpp $(BASEDIR)/lifealgo.cpp $(BASEDIR)/hlifealgo.cpp \
    $(BASEDIR)/hlifedraw.cpp $(BASEDIR)/qlifealgo.cpp $(BASEDIR)/qlifedraw.cpp \
    $(BASEDIR)/ltlalgo.cpp $(BASEDIR)/ltldraw.cpp $(BASEDIR)/jvnalgo.cpp $(BASEDIR)/ruletreealgo.cpp \
    $(BASEDIR)/ruletable_algo.cpp $(BASEDIR)/ghashbase.cpp $(BASEDIR)/ruleloaderalgo.cpp \
    $(BASEDIR)/ghashdraw.cpp $(BASEDIR)/readpattern.cpp \
    $(BASEDIR)/writepattern.cpp $(BASEDIR)/liferules.cpp $(BASEDIR)/util.cpp \
    $(BASEDIR)/liferender.cpp $(BASEDIR)/viewport.cpp $(BASEDIR)/lifepoll.cpp \
    $(BASEDIR)/generationsalgo.cpp

$(MBASEO): $(MBASES)
	-$(CXX) /MP8 /Fo$(OBJDIR)/ /c /nologo $(CXXFLAGS) $(MBASES)

MWXO = $(OBJDIR)/wxutils.obj $(OBJDIR)/wxprefs.obj $(OBJDIR)/wxalgos.obj \
    $(OBJDIR)/wxrule.obj $(OBJDIR)/wxinfo.obj $(OBJDIR)/wxhelp.obj \
    $(OBJDIR)/wxstatus.obj \
    $(OBJDIR)/wxedit.obj $(OBJDIR)/wxcontrol.obj \
    $(OBJDIR)/wxtimeline.obj $(OBJDIR)/wxundo.obj $(OBJDIR)/wxlayer.obj \
    $(OBJDIR)/wxselect.obj

MWXS = wxutils.cpp wxprefs.cpp wxalgos.cpp \
    wxrule.cpp wxinfo.cpp wxhelp.cpp \
    wxstatus.cpp \
    wxedit.cpp wxcontrol.cpp \
    wxtimeline.cpp wxundo.cpp wxlayer.cpp \
    wxselect.cpp

$(MWXO): $(MWXS)
	-$(CXX) /MP8 /Fo$(OBJDIR)/ /c /nologo $(CXXFLAGS) $(MWXS)

MWXLUAO = $(OBJDIR)/wxoverlay.obj $(OBJDIR)/wxlua.obj $(OBJDIR)/wxfile.obj \
	$(OBJDIR)/wxmain.obj $(OBJDIR)/wxrender.obj $(OBJDIR)/wxscript.obj \
	$(OBJDIR)/wxview.obj

MWXLUAS = wxoverlay.cpp wxlua.cpp wxfile.cpp wxmain.cpp \
	wxrender.cpp wxscript.cpp wxview.cpp

$(MWXLUAO): $(MWXLUAS)
	-$(CXX) /MP8 /Fo$(OBJDIR)/ /c /nologo $(CXXFLAGS) $(LUA_DEFS) /I$(LUADIR) $(MWXLUAS)

$(OBJDIR)/wxperl.obj: wxperl.cpp
	$(CXX) /c /nologo /Fo$@ $(CXXFLAGS) $(PERL_INCLUDE) wxperl.cpp

$(OBJDIR)/wxpython.obj: wxpython.cpp
	$(CXX) /c /nologo /Fo$@ $(CXXFLAGS) $(PYTHON_INCLUDE) wxpython.cpp

$(OBJDIR)/wxgolly.obj: wxgolly.cpp
	$(CXX) /c /TP /nologo /Fo$@ $(CXXFLAGS) wxgolly.cpp

srcdist:
	-rmdir /s /q $(RELEASENAME)-src
	mkdir $(RELEASENAME)-src
	mkdir $(RELEASENAME)-src\Help
	mkdir $(RELEASENAME)-src\Patterns
	mkdir $(RELEASENAME)-src\Rules
	mkdir $(RELEASENAME)-src\Scripts
	mkdir $(RELEASENAME)-src\docs
	mkdir $(RELEASENAME)-src\gollybase
	mkdir $(RELEASENAME)-src\cmdline
	xcopy /S /I $(EXEDIR)\Help $(RELEASENAME)-src\Help
	xcopy /S /I $(EXEDIR)\Patterns $(RELEASENAME)-src\Patterns
	xcopy /S /I $(EXEDIR)\Rules $(RELEASENAME)-src\Rules
	xcopy /S /I $(EXEDIR)\Scripts $(RELEASENAME)-src\Scripts
	xcopy /S /I $(EXEDIR)\docs $(RELEASENAME)-src\docs
	xcopy /S /I $(EXEDIR)\gollybase $(RELEASENAME)-src\gollybase
	xcopy /S /I $(EXEDIR)\cmdline $(RELEASENAME)-src\cmdline	
	mkdir $(RELEASENAME)-src\lua
	mkdir $(RELEASENAME)-src\gui-wx
	mkdir $(RELEASENAME)-src\gui-wx\configure
	mkdir $(RELEASENAME)-src\gui-wx\bitmaps
	mkdir $(RELEASENAME)-src\gui-wx\icons
	for %%F IN ($(LUAFILES)) do xcopy %F $(RELEASENAME)-src\lua
	for %%F IN ($(GUIFILES)) do xcopy %F $(RELEASENAME)-src\gui-wx
	for %%F IN ($(GUIDIRS)) do xcopy /S /I %F $(RELEASENAME)-src\gui-wx\%F
	echo Now zip $(RELEASENAME)-src into $(RELEASENAME)-src.zip

bindist: all
	-rmdir /s /q $(BINNAME)
	mkdir $(BINNAME)
	mkdir $(BINNAME)\Help
	mkdir $(BINNAME)\Patterns
	mkdir $(BINNAME)\Rules
	mkdir $(BINNAME)\Scripts
	xcopy /S /I $(EXEDIR)\Help $(BINNAME)\Help
	xcopy /S /I $(EXEDIR)\Patterns $(BINNAME)\Patterns
	xcopy /S /I $(EXEDIR)\Rules $(BINNAME)\Rules
	xcopy /S /I $(EXEDIR)\Scripts $(BINNAME)\Scripts	
	for %%F IN ($(BINFILES)) do xcopy %F $(BINNAME)
	echo Now zip $(BINNAME) into $(BINNAME).zip