2
# Makefile prototype for Enigma.
12
CXXFLAGS = @CXXFLAGS@\
13
-DSYSTEM_DATA_DIR=\"$(datadir)/enigma\" \
14
-DDOCDIR=\"$(docdir)\" \
15
-DLOCALEDIR=\"$(localedir_enigma)\" \
16
-I$(top_srcdir)/lib-src/zipios++ \
17
-I$(top_builddir)/lib-src/zipios++ \
18
-I$(top_srcdir)/lib-src/lua \
19
-I$(top_srcdir)/lib-src/enigma-core \
20
-I$(top_srcdir)/lib-src/enet/include \
21
-I$(top_srcdir)/lib-src \
22
-I$(top_builddir)/intl @SDL_CFLAGS@
29
AttributeDescriptor.cc \
30
AttributeDescriptor.hh \
36
DOMSchemaResolver.cc \
37
DOMSchemaResolver.hh \
80
MessageDescriptor.cc \
81
MessageDescriptor.hh \
103
PreferenceManager.cc \
104
PreferenceManager.hh \
110
SoundEffectManager.cc \
111
SoundEffectManager.hh \
146
actors/HorseActor.cc \
147
actors/HorseActor.hh \
148
actors/KillerActor.cc \
149
actors/KillerActor.hh \
152
floors/BridgeFloor.cc \
153
floors/BridgeFloor.hh \
154
floors/FloodStream.cc \
155
floors/FloodStream.hh \
156
floors/ScalesFloor.cc \
157
floors/ScalesFloor.hh \
158
floors/SimpleFloors.cc \
159
floors/SimpleFloors.hh \
160
floors/SlopeFloor.cc \
161
floors/SlopeFloor.hh \
162
floors/StandardFloors.cc \
163
floors/StandardFloors.hh \
164
floors/ThiefFloor.cc \
165
floors/ThiefFloor.hh \
174
gui/LevelInspector.cc \
175
gui/LevelInspector.hh \
178
gui/LevelPackComposer.cc \
179
gui/LevelPackComposer.hh \
180
gui/LevelPackConfig.cc \
181
gui/LevelPackConfig.hh \
182
gui/LevelPackMenu.cc \
183
gui/LevelPackMenu.hh \
184
gui/LevelPreviewCache.cc \
185
gui/LevelPreviewCache.hh \
188
gui/LPGroupConfig.cc \
189
gui/LPGroupConfig.hh \
194
gui/MonospacedLabel.cc \
195
gui/MonospacedLabel.hh \
198
gui/ScreenshotViewer.cc \
199
gui/ScreenshotViewer.hh \
210
items/BlockerItem.cc \
211
items/BlockerItem.hh \
216
items/BurnableItem.cc \
217
items/BurnableItem.hh \
220
items/CompatibilityItems.cc \
221
items/CompatibilityItems.hh \
226
items/DocumentItem.cc \
227
items/DocumentItem.hh \
232
items/Extinguisher.cc \
233
items/Extinguisher.hh \
236
items/GlassesItem.cc \
237
items/GlassesItem.hh \
244
items/Meditation.cc \
245
items/Meditation.hh \
248
items/PullerItem.cc \
249
items/PullerItem.hh \
250
items/RubberbandItem.cc \
251
items/RubberbandItem.hh \
258
items/SimpleItems.cc \
259
items/SimpleItems.hh \
262
items/SurpriseItem.cc \
263
items/SurpriseItem.hh \
278
lev/RatingManager.cc \
279
lev/RatingManager.hh \
280
lev/PersistentIndex.cc \
281
lev/PersistentIndex.hh \
284
lev/ScoreManager.cc \
285
lev/ScoreManager.hh \
288
lev/VolatileIndex.cc \
289
lev/VolatileIndex.hh \
290
others/CannonBall.cc \
291
others/CannonBall.hh \
292
others/CounterGadget.cc \
293
others/CounterGadget.hh \
296
others/Rubberband.cc \
297
others/Rubberband.hh \
298
others/TimerGadget.cc \
299
others/TimerGadget.hh \
302
stones/ActorImpulseStone.cc \
303
stones/ActorImpulseStone.hh \
304
stones/BarrierStone.cc \
305
stones/BarrierStone.hh \
306
stones/BlockerStone.cc \
307
stones/BlockerStone.hh \
308
stones/BoulderStone.cc \
309
stones/BoulderStone.hh \
310
stones/BrakeStone.cc \
311
stones/BrakeStone.hh \
312
stones/BreakStone.cc \
313
stones/BreakStone.hh \
314
stones/ChameleonStone.cc \
315
stones/ChameleonStone.hh \
316
stones/ChessStone.cc \
317
stones/ChessStone.hh \
318
stones/ClusterStone.cc \
319
stones/ClusterStone.hh \
322
stones/CompatibilityStones.cc \
323
stones/CompatibilityStones.hh \
324
stones/DeathStone.cc \
325
stones/DeathStone.hh \
326
stones/DiscoStone.cc \
327
stones/DiscoStone.hh \
328
stones/DispenserStone.cc \
329
stones/DispenserStone.hh \
332
stones/FakeStone.cc \
333
stones/FakeStone.hh \
334
stones/FlatStone.cc \
335
stones/FlatStone.hh \
338
stones/FloppySwitch.cc \
339
stones/FloppySwitch.hh \
340
stones/FourSwitch.cc \
341
stones/FourSwitch.hh \
342
stones/GhostStone.cc \
343
stones/GhostStone.hh \
344
stones/GlassStones.cc \
345
stones/GlassStones.hh \
346
stones/GreenBrownStone.cc \
347
stones/GreenBrownStone.hh \
350
stones/JambStone.cc \
351
stones/JambStone.hh \
352
stones/KeySwitch.cc \
353
stones/KeySwitch.hh \
354
stones/KnightStone.cc \
355
stones/KnightStone.hh \
356
stones/LaserStone.cc \
357
stones/LaserStone.hh \
358
stones/LaserSwitch.cc \
359
stones/LaserSwitch.hh \
360
stones/LightPassengerStone.cc \
361
stones/LightPassengerStone.hh \
362
stones/MagicStone.cc \
363
stones/MagicStone.hh \
364
stones/MailStone.cc \
365
stones/MailStone.hh \
366
stones/MirrorStone.cc \
367
stones/MirrorStone.hh \
368
stones/MonoFlopStone.cc \
369
stones/MonoFlopStone.hh \
370
stones/OneWayStone.cc \
371
stones/OneWayStone.hh \
372
stones/OxydStone.cc \
373
stones/OxydStone.hh \
374
stones/PassageStone.cc \
375
stones/PassageStone.hh \
376
stones/PlasterStone.cc \
377
stones/PlasterStone.hh \
378
stones/PolarSwitchStone.cc \
379
stones/PolarSwitchStone.hh \
380
stones/PortalStone.cc \
381
stones/PortalStone.hh \
382
stones/PullStone.cc \
383
stones/PullStone.hh \
384
stones/PuzzleStone.cc \
385
stones/PuzzleStone.hh \
386
stones/QuakeStone.cc \
387
stones/QuakeStone.hh \
388
stones/RotatorStone.cc \
389
stones/RotatorStone.hh \
390
stones/RubberbandStone.cc \
391
stones/RubberbandStone.hh \
392
stones/ScissorsStone.cc \
393
stones/ScissorsStone.hh \
394
stones/ShogunStone.cc \
395
stones/ShogunStone.hh \
396
stones/SimpleStones.cc \
397
stones/SimpleStones.hh \
398
stones/SpitterStone.cc \
399
stones/SpitterStone.hh \
400
stones/StandardStones.cc \
401
stones/StandardStones.hh \
402
stones/StoneImpulse.cc \
403
stones/StoneImpulse.hh \
404
stones/SurpriseStone.cc \
405
stones/SurpriseStone.hh \
406
stones/SwapStone.cc \
407
stones/SwapStone.hh \
410
stones/ThiefStone.cc \
411
stones/ThiefStone.hh \
412
stones/TimerStone.cc \
413
stones/TimerStone.hh \
414
stones/Turnstile.cc \
415
stones/Turnstile.hh \
416
stones/VolcanoStone.cc \
417
stones/VolcanoStone.hh \
418
stones/WindowStone.cc \
419
stones/WindowStone.hh \
420
stones/YieldingStone.cc \
421
stones/YieldingStone.hh
427
localedir_enigma := data/locale
428
mingw_ldadd := enigma_ico.o -lws2_32
429
enigma_ico.o: enigma.rc enigma.ico
430
$(WINDRES) $(srcdir)/enigma.rc --include-dir=$(srcdir) -O coff -o enigma_ico.o
434
localedir_enigma := $(datadir)/locale
441
$(top_builddir)/lib-src/enigma-core/libecl.a \
442
$(top_builddir)/lib-src/lua/liblua.a \
443
$(top_builddir)/lib-src/enet/libenet.a \
444
$(top_builddir)/lib-src/oxydlib/liboxyd.a \
445
$(top_builddir)/lib-src/zipios++/src/libzipios.a \
450
# Rule for creating Lua interfaces from package descriptions using 'tolua'
454
@if [ "x${TOLUA}" != "x" ]; then \
455
echo "Running ${TOLUA}..."; \
456
${TOLUA} -H lua-display.hh -n display -o lua-display.cc display-lua.pkg; \
457
${TOLUA} -H lua-enigma.hh -n enigma -o lua-enigma.cc enigma-lua.pkg; \
458
${TOLUA} -H lua-global.hh -n global -o lua-global.cc global-lua.pkg; \
459
${TOLUA} -H lua-ecl.hh -n px -o lua-ecl.cc ecl-lua.pkg; \
461
echo "$<:0: Warning: Can't update lua interface - tolua not installed "; \
465
#------------------ Packaging rules for Mac OSX ------------------------
467
bundle_root := $(top_builddir)/etc/macfiles
468
bundle_name := $(bundle_root)/Enigma.app
469
# Special target to copy all needed game files to Enigma.app/Contents/Resources.
470
# For Mac OS X bundle.
473
-rm -rf $(bundle_root)
474
mkdir -p $(bundle_name)/Contents/MacOS
475
mkdir -p $(bundle_name)/Contents/Resources/data/
476
echo "APPL????" > $(bundle_name)/Contents/PkgInfo
477
cp $(top_builddir)/etc/Info.plist $(bundle_name)/Contents/
478
cp $(top_builddir)/etc/enigma.icns $(bundle_name)/Contents/Resources/
479
tar --exclude .svn -c -f - -C $(top_builddir)/data levels | tar xpf - -C $(bundle_name)/Contents/Resources/data
480
cp $(top_builddir)/data/*.lua $(bundle_name)/Contents/Resources/data/
481
cp $(top_builddir)/data/*.xml $(bundle_name)/Contents/Resources/data/
482
mkdir -p $(bundle_name)/Contents/Resources/data/gfx
483
cp $(top_builddir)/data/gfx/*.png $(bundle_name)/Contents/Resources/data/gfx
484
mkdir -p $(bundle_name)/Contents/Resources/data/gfx/flags25x15
485
cp $(top_builddir)/data/gfx/flags25x15/*.png $(bundle_name)/Contents/Resources/data/gfx/flags25x15
486
mkdir -p $(bundle_name)/Contents/Resources/data/gfx32
487
cp $(top_builddir)/data/gfx32/*.png $(bundle_name)/Contents/Resources/data/gfx32
488
cp $(top_builddir)/data/gfx32/*.jpg $(bundle_name)/Contents/Resources/data/gfx32
489
mkdir -p $(bundle_name)/Contents/Resources/data/gfx40
490
cp $(top_builddir)/data/gfx40/*.png $(bundle_name)/Contents/Resources/data/gfx40
491
cp $(top_builddir)/data/gfx40/*.jpg $(bundle_name)/Contents/Resources/data/gfx40
492
mkdir -p $(bundle_name)/Contents/Resources/data/gfx48
493
cp $(top_builddir)/data/gfx48/*.png $(bundle_name)/Contents/Resources/data/gfx48
494
cp $(top_builddir)/data/gfx48/*.jpg $(bundle_name)/Contents/Resources/data/gfx48
495
mkdir -p $(bundle_name)/Contents/Resources/data/schemas
496
cp $(top_builddir)/data/schemas/*.xml $(bundle_name)/Contents/Resources/data/schemas
497
cp $(top_builddir)/data/schemas/*.xsd $(bundle_name)/Contents/Resources/data/schemas
498
mkdir -p $(bundle_name)/Contents/Resources/data/music
499
mkdir -p $(bundle_name)/Contents/Resources/data/music/menu
500
cp $(top_builddir)/data/music/menu/*.s3m $(bundle_name)/Contents/Resources/data/music/menu
501
cp $(top_builddir)/data/music/menu/*.ogg $(bundle_name)/Contents/Resources/data/music/menu
502
mkdir -p $(bundle_name)/Contents/Resources/data/soundsets
503
mkdir -p $(bundle_name)/Contents/Resources/data/soundsets/enigma
504
cp $(top_builddir)/data/soundsets/enigma/*.wav $(bundle_name)/Contents/Resources/data/soundsets/enigma
505
mkdir -p $(bundle_name)/Contents/Resources/data/fonts
506
cp $(top_builddir)/data/fonts/*.png $(bundle_name)/Contents/Resources/data/fonts
507
cp $(top_builddir)/data/fonts/*.bmf $(bundle_name)/Contents/Resources/data/fonts
508
cp $(top_builddir)/data/fonts/*.ttf $(bundle_name)/Contents/Resources/data/fonts
509
mkdir -p $(bundle_name)/Contents/Frameworks
510
cp -R /Library/Frameworks/SDL.framework $(bundle_name)/Contents/Frameworks/
511
cp -R /Library/Frameworks/SDL_image.framework $(bundle_name)/Contents/Frameworks/
512
cp -R /Library/Frameworks/SDL_mixer.framework $(bundle_name)/Contents/Frameworks/
513
cp -R /Library/Frameworks/SDL_ttf.framework $(bundle_name)/Contents/Frameworks/
514
for cat in $(ALL_LINGUAS); do \
515
dir=$(bundle_name)/Contents/Resources/locale/$$cat/LC_MESSAGES; \
517
echo "installing $$cat as $$dir/enigma.mo"; \
518
cp $(top_builddir)/po/$$cat.gmo $$dir/enigma.mo; \
521
# Special target to copy the binary to Enigma.app/Contents/MacOS.
523
bundle-fw: enigma-fw-mosx
524
cp enigma-fw $(bundle_name)/Contents/MacOS/enigma
525
strip $(bundle_name)/Contents/MacOS/enigma
527
# Special target to copy the doc files to the MacOS dmg staging area
528
bundle_doc := $(bundle_name)/Contents/Resources/doc
531
-rm -rf $(bundle_doc)
532
mkdir -p $(bundle_doc)/images/flags25x15
533
mkdir -p $(bundle_doc)/reference/images
534
mkdir -p $(bundle_doc)/manual/images
535
cp $(top_builddir)/README $(bundle_doc)/
536
cp $(top_builddir)/COPYING $(bundle_doc)/
537
cp $(top_builddir)/CHANGES $(bundle_doc)/
538
cp $(top_builddir)/ACKNOWLEDGEMENTS $(bundle_doc)/
539
cp $(top_builddir)/etc/README-SDL.txt $(bundle_doc)/
540
cp $(top_builddir)/doc/index.html $(bundle_doc)/
541
mkalias -r $(bundle_doc)/index.html $(bundle_root)/EnigmaDocs.html
542
cp $(top_builddir)/doc/gpl.txt $(bundle_doc)/
543
cp $(top_builddir)/doc/lgpl.txt $(bundle_doc)/
544
cp $(top_builddir)/doc/images/enigma.css $(bundle_doc)/images/
545
cp $(top_builddir)/doc/images/nav_enigma.gif $(bundle_doc)/images/
546
cp $(top_builddir)/doc/images/nav_cornerul.gif $(bundle_doc)/images/
547
cp $(top_builddir)/doc/images/nav_cornerur.gif $(bundle_doc)/images/
548
cp $(top_builddir)/doc/images/favicon.png $(bundle_doc)/images/
549
cp $(top_builddir)/doc/images/menu_bg.jpg $(bundle_doc)/images/
550
cp $(top_builddir)/doc/images/flags25x15/*.png $(bundle_doc)/images/flags25x15/
551
cp $(top_builddir)/doc/reference/ant_lua.txt $(bundle_doc)/reference/
552
cp $(top_builddir)/doc/reference/sounds.txt $(bundle_doc)/reference/
553
cp $(top_builddir)/doc/reference/soundset.lua $(bundle_doc)/reference/
554
cp $(top_builddir)/doc/reference/lua2xml $(bundle_doc)/reference/
555
cp $(top_builddir)/doc/reference/xml2lua $(bundle_doc)/reference/
556
cp $(top_builddir)/doc/manual/images/*.png $(bundle_doc)/manual/images/
557
cp $(top_builddir)/doc/manual/*.html $(bundle_doc)/manual/
558
cp $(top_builddir)/doc/reference/images/*.png $(bundle_doc)/reference/images/
559
cp $(top_builddir)/doc/reference/*.html $(bundle_doc)/reference/
561
# Special target to create a binary linked with Mac OS X frameworks
562
# note this assumes that xercesc and libpng are installed in same directory as the SDL libraries.
563
static_prefix := `$(SDL_CONFIG) --prefix`
564
.PHONY: enigma-fw-mosx
565
enigma-fw-mosx: $(enigma_OBJECTS) $(enigma_DEPENDENCIES)
566
$(CXX) $(LDFLAGS) -o enigma-fw $(enigma_OBJECTS) $(enigma_DEPENDENCIES) $(static_prefix)/lib/libintl.a /usr/lib/libiconv.dylib /usr/lib/libcurl.dylib $(static_prefix)/lib/libxerces-c.a -L$(static_prefix)/lib -lsdlmain -lz -framework SDL -framework SDL_image -framework SDL_mixer -framework Cocoa -framework OpenGL -framework SDL_ttf $(static_prefix)/lib/libpng.a
568
# Special target to make a disk image of the bundled app
571
hdiutil create -ov -srcfolder $(bundle_root) -volname Enigma -imagekey zlib-level=6 $(top_builddir)/etc/enigma.dmg