1 |
# |
SUBDIRS = data doc lib-src src |
2 |
# Makefile prototype for Enigma. |
EXTRADIST = autogen.sh COPYING acconfig.h |
|
# |
|
|
SUBDIRS = fonts sound px gfx levels libtolua |
|
|
bin_PROGRAMS = enigma |
|
3 |
|
|
4 |
# Build font converter only if SDL_ttf library is present |
all: enigma |
|
if BUILDTTF2BMF |
|
|
noinst_PROGRAMS = ttf2bmf |
|
|
ttf2bmf_SOURCES = ttf2bmf.cc getopt.c getopt1.c getopt.h |
|
|
ttf2bmf_LDADD = -lSDL_ttf |
|
|
endif |
|
5 |
|
|
6 |
pkgdata_DATA = enigma_conf.lua models-2d.lua init.lua |
enigma: src/enigma |
7 |
|
cp src/enigma ./ |
|
man_MANS = enigma.6 |
|
|
|
|
|
EXTRA_DIST = $(man_MANS) $(pkgdata_DATA) autogen.sh \ |
|
|
COPYING.GPL ttf2bmf.cc HACKING enigma.spec CREATING-LEVELS \ |
|
|
enigma.rc enigma.ico |
|
|
|
|
|
# Source files created by 'tolua'. |
|
|
LUA_IF_SOURCES = \ |
|
|
enigma-lua.cc enigma-lua.hh \ |
|
|
px-lua.cc px-lua.hh |
|
|
|
|
|
|
|
|
enigma_SOURCES = \ |
|
|
$(LUA_IF_SOURCES) \ |
|
|
actors.hh actors.cc \ |
|
|
display.hh display.cc display_impl.hh \ |
|
|
editor.cc editor.hh \ |
|
|
enigma.cc enigma.hh \ |
|
|
fwd.hh \ |
|
|
getopt.c getopt.h getopt1.c \ |
|
|
gui.cc gui.hh \ |
|
|
items.cc items.hh \ |
|
|
laser.cc laser.hh \ |
|
|
lua.cc lua.hh \ |
|
|
menus.cc menus.hh \ |
|
|
network.cc network.hh \ |
|
|
object_mixins.hh \ |
|
|
objects.cc objects.hh \ |
|
|
options.cc options.hh \ |
|
|
player.cc player.hh \ |
|
|
sound.cc sound.hh \ |
|
|
system_unix.cc system.hh \ |
|
|
tools.cc tools.hh \ |
|
|
video.cc video.hh \ |
|
|
world.cc world.hh |
|
|
|
|
|
if MINGW32 |
|
|
enigma_LDADD = px/libpx.a enigma_ico.o -llua -llualib libtolua/libtolua.a |
|
|
|
|
|
enigma_ico.o: enigma.rc enigma.ico |
|
|
$(WINDRES) enigma.rc -O coff -o enigma_ico.o |
|
|
else |
|
|
enigma_LDADD = px/libpx.a -llua -llualib libtolua/libtolua.a |
|
|
endif |
|
|
|
|
|
bundle_name = Enigma.app |
|
|
# Special target to copy all needed game files to Enigma.app/Contents/Resources. |
|
|
# For Mac OS X bundle. |
|
|
bundle: |
|
|
mkdir -p $(bundle_name)/Contents/MacOS |
|
|
mkdir -p $(bundle_name)/Contents/Resources |
|
|
echo "APPL????" > $(bundle_name)/Contents/PkgInfo |
|
|
cp Info.plist $(bundle_name)/Contents/ |
|
|
cp enigma.icns $(bundle_name)/Contents/Resources/ |
|
|
cp -R levels $(bundle_name)/Contents/Resources/ |
|
|
cp *.lua $(bundle_name)/Contents/Resources/ |
|
|
cp -R gfx $(bundle_name)/Contents/Resources/ |
|
|
cp -R sound $(bundle_name)/Contents/Resources/ |
|
|
mkdir -p $(bundle_name)/Contents/Resources/fonts |
|
|
cp -R fonts/*.png $(bundle_name)/Contents/Resources/fonts |
|
|
|
|
|
# Special target to copy the binary to Enigma.app/Contents/MacOS. |
|
|
bundle-static: enigma-static-mosx bundle |
|
|
cp enigma-static $(bundle_name)/Contents/MacOS/enigma |
|
|
strip $(bundle_name)/Contents/MacOS/enigma |
|
|
|
|
|
# Special target to copy the binary to Enigma.app/Contents/MacOS. |
|
|
bundle-fw: enigma-fw-mosx bundle |
|
|
cp enigma-fw $(bundle_name)/Contents/MacOS/enigma |
|
|
strip $(bundle_name)/Contents/MacOS/enigma |
|
|
|
|
|
# Special target to create a static linked binary for Mac OS X |
|
|
# FIXME: hardcoded library paths because of braindamaged linker |
|
|
enigma-static-mosx: $(enigma_OBJECTS) $(enigma_DEPENDENCIES) |
|
|
$(CXX) $(LDFLAGS) -o enigma-static $(enigma_OBJECTS) $(enigma_DEPENDENCIES) /usr/fink/lib/libSDLmain.a /usr/fink/lib/libSDL.a /usr/fink/lib/libSDL_image.a /usr/fink/lib/libSDL_mixer.a /usr/fink/lib/liblua.a /usr/fink/lib/liblualib.a /usr/fink/lib/libsmpeg.a /usr/fink/lib/libpng.a /usr/fink/lib/libjpeg.a /usr/fink/lib/libvorbisfile.a /usr/fink/lib/libvorbis.a /usr/fink/lib/libogg.a -lz -framework IOKit -framework Cocoa -framework OpenGL -framework Carbon -framework QuickTime |
|
|
|
|
|
# Special target to create a binary linked with Mac OS X frameworks |
|
|
enigma-fw-mosx: $(enigma_OBJECTS) $(enigma_DEPENDENCIES) |
|
|
$(CXX) $(LDFLAGS) -o enigma-fw $(enigma_OBJECTS) $(enigma_DEPENDENCIES) -lsdlmain -lz -framework SDL -framework SDL_image -framework SDL_mixer -framework IOKit -framework Cocoa -framework OpenGL -framework Carbon -framework QuickTime |
|
|
|
|
|
# Rule for creating Lua interfaces from package descriptions with 'tolua' |
|
|
%-lua.cc %-lua.hh: %-lua.pkg |
|
|
$(TOLUA) -H $*-lua.hh -n $* -o $@ $< |
|