Debian Codegraph @

src/Makefile

raw symbols ◀ ▶
Source reconstructed at patch state 0 of 3 — not the installed (fully patched) source.
3 Debian patches touch this file
1 # Makefile Para Holotz's Castle. (C) Juan Carlos Seijo Pérez - 2004.
2 # Makefile for Holotz's Castle.
3
4 ifndef SDL_CONFIG
5 SDL_CONFIG = sdl-config
6 endif
7
8 # Uncomment these lines if you don't want to install the game. Then
9 # you'll only be able to execute it from the directory it is in.
10 # Also comment lines bellow.
11 # Descomenta estas l�neas si no quieres instalar el juego. S�lo
12 # podr�s ejecutarlo desde el directorio donde est�.
13 # Comenta las l�neas m�s abajo.
14 ifdef I486_BUILD
15 HC_DATA = res/
16 HCED_DATA = HCedHome/res/
17 endif
18
19 # Edit these lines to change the data and game installation dirs or
20 # comment out these lines to not install the game (also uncomment lines above)
21 # Edita estas l�neas para cambiar el directorio de instalaci�n de datos y del juego o bien
22 # comenta estas l�neas si no quieres instalar el juego (y descomenta las de arriba)
23
24 ifndef I486_BUILD
25 HC_BASE = /usr/share/games/holotz-castle/
26 HC_DATA = $(HC_BASE)game/
27 HCED_DATA = $(HC_BASE)editor/
28 HC_BIN_DIR = /usr/local/bin/
29 endif
30
31 DEFINES = -DHC_DATA_DIR=\"$(HC_DATA)\" -DHCED_DATA_DIR=\"$(HCED_DATA)\"
32
33 all: JLib HC HCed
34
35 HC_OBJ_MAIN=HolotzCastle.o
36 HC_OBJS=HCUtil.o HCTimer.o HCLoadSaveSlot.o HCPlaylist.o HCPreferences.o HCTheme.o HCText.o \
37 HCBreak.o HCRope.o HCContFloor.o HCObject.o HCMap.o HCExit.o HCCharacter.o \
38 HCEnemy.o HCEnemyBall.o HCEnemyChaser.o HCEnemyMaker.o HCEnemyRandom.o \
39 HCEnemyStatic.o HCScriptAction.o HCScriptBlock.o HCScript.o HCLevel.o
40
41 HCED_OBJ_MAIN=HCed.o
42
43 # Definir -D_JLIB_DEBUG para debug con JLib. Ponerlo también en el Makefile de JLib.
44 # Define -D_JLIB_DEBUG for JLib debug mode. Put it also in JLib's Makefile.
45 CFLAGS=-fno-strict-aliasing -I. -I../JLib `$(SDL_CONFIG) --cflags` -I/usr/local/include/ -I/usr/local/include/SDL -O3 -Wall -Werror -Wshadow $(CPU_OPTS) -ffast-math -c
46 LDFLAGS=-L. -ffast-math -lSDL_image -lSDL_ttf -lSDL_mixer `$(SDL_CONFIG) --libs`
47
48
49 JLib:
50 $(MAKE) -C ../JLib;
51
52 %.o: %.cpp %.h
53 g++ $(CFLAGS) $(DEFINES) $< -o $@
54
55 HC: $(HC_OBJS) $(HC_OBJ_MAIN) ../JLib/libJLib.a
56 g++ $(LDFLAGS) $? -o $@;\
57 mv HC ../holotz-castle
58
59 # HCed (Holotz's Castle editor).
60 HCed: $(HC_OBJS) $(HCED_OBJ_MAIN) ../JLib/libJLib.a
61 g++ $(LDFLAGS) $? -o $@;\
62 mv HCed ../holotz-castle-editor
63
64 install:
65 mkdir -p $(HC_DATA);\
66 mkdir -p $(HCED_DATA);\
67 chmod -R a+rx $(HC_DATA) $(HCED_DATA);\
68 mkdir -p $(HC_BIN_DIR);\
69 cp -r ../res/[^H]* $(HC_DATA) && cp -r ../HCedHome/res/* $(HCED_DATA);\
70 chmod -R a+x ../holotz-castle ../holotz-castle-editor;\
71 cp ../holotz-castle ../holotz-castle-editor $(HC_BIN_DIR);\
72 chmod -R a+r $(HC_DATA) $(HCED_DATA);
73
74 uninstall:
75 rm -rf $(HC_BASE);\
76 rm -f $(HC_BIN_DIR)holotz-castle $(HC_BIN_DIR)holotz-castle-editor;\
77
78 .PHONY: clean
79 clean:
80 rm -f ../holotz-castle;\
81 rm -f ../holotz-castle-editor;\
82 rm -f *\.o;\
83 $(MAKE) -C ../JLib clean