hasufell-repository/packages/games-strategy/zod-engine/files/zod-engine-20110906-build.patch

594 lines
24 KiB
Diff
Raw Normal View History

From: Julian Ospald <hasufell@gentoo.org>
Date: Sun Aug 12 09:26:49 UTC 2012
Subject: build system
respect CXX and CXXFLAGS
--- zod_engine/zod_src/makefile
+++ zod_engine/zod_src/makefile
@@ -1,6 +1,6 @@
-CC=g++
-CFLAGS=-c -g `sdl-config --cflags` -D DISABLE_OPENGL -D DISABLE_REGCHECK
-LDFLAGS=`sdl-config --libs` -lSDL_image -lSDL_mixer -lSDL_ttf -lm -lmysqlclient
+CXX ?= g++
+CXXFLAGS += $(shell sdl-config --cflags) -D DISABLE_OPENGL -D DISABLE_REGCHECK
+LIBS += $(shell sdl-config --libs) -lSDL_image -lSDL_mixer -lSDL_ttf -lm -lmysqlclient
INCLUDES=
BASEFILES = common.cpp zsdl.cpp event_handler.cpp socket_handler.cpp server_socket.cpp client_socket.cpp zhud.cpp zfont_engine.cpp zfont.cpp zmini_map.cpp cursor.cpp zgui_window.cpp zbuildlist.cpp zsound_engine.cpp zmusic_engine.cpp zcomp_message_engine.cpp zpath_finding.cpp zpath_finding_astar.cpp zsettings.cpp zsdl_opengl.cpp zportrait.cpp zteam.cpp ztray.cpp zmysql.cpp zpsettings.cpp ztime.cpp zvote.cpp zunitrating.cpp zencrypt_aes.cpp zolists.cpp zgui_main_menu_base.cpp zgui_main_menu_widget.cpp
COREFILES = zcore.cpp zserver.cpp zserver_events.cpp zserver_commands.cpp zclient.cpp zplayer.cpp zplayer_events.cpp zbot.cpp zbot_events.cpp SDL_rotozoom.cpp
@@ -18,423 +18,426 @@
MAPEDITOR_OFILES = map_editor.o $(CPPFILES:.cpp=.o)
DATE = `date +%m-%d-%y`
+ifdef DATA_PATH
+ CXXFLAGS += -D DATA_PATH=\"$(DATA_PATH)\"
+endif
main: $(OFILES)
- $(CC) -o $(EXENAME) $(OFILES) $(LDFLAGS)
+ $(CXX) $(CXXFLAGS) -o $(EXENAME) $(OFILES) $(LDFLAGS) $(LIBS)
map_editor: $(MAPEDITOR_OFILES)
- $(CC) -o $(MAPEDITOR_NAME) $(MAPEDITOR_OFILES) $(LDFLAGS)
+ $(CXX) $(CXXFLAGS) -o $(MAPEDITOR_NAME) $(MAPEDITOR_OFILES) $(LDFLAGS) $(LIBS)
#base files -----------------------------------
map_editor.o: map_editor.cpp
- $(CC) $(CFLAGS) $(INCLUDES) map_editor.cpp
+ $(CXX) -c $(CXXFLAGS) $(INCLUDES) map_editor.cpp
main.o: main.cpp main.h
- $(CC) $(CFLAGS) $(INCLUDES) main.cpp
+ $(CXX) -c $(CXXFLAGS) $(INCLUDES) main.cpp
common.o: common.cpp common.h
- $(CC) $(CFLAGS) $(INCLUDES) common.cpp
+ $(CXX) -c $(CXXFLAGS) $(INCLUDES) common.cpp
zsdl.o: zsdl.cpp zsdl.h
- $(CC) $(CFLAGS) $(INCLUDES) zsdl.cpp
+ $(CXX) -c $(CXXFLAGS) $(INCLUDES) zsdl.cpp
zsdl_opengl.o: zsdl_opengl.cpp zsdl_opengl.h zsdl.h
- $(CC) $(CFLAGS) $(INCLUDES) zsdl_opengl.cpp
+ $(CXX) -c $(CXXFLAGS) $(INCLUDES) zsdl_opengl.cpp
event_handler.o: event_handler.cpp event_handler.h
- $(CC) $(CFLAGS) $(INCLUDES) event_handler.cpp
+ $(CXX) -c $(CXXFLAGS) $(INCLUDES) event_handler.cpp
socket_handler.o: socket_handler.cpp socket_handler.h constants.h
- $(CC) $(CFLAGS) $(INCLUDES) socket_handler.cpp
+ $(CXX) -c $(CXXFLAGS) $(INCLUDES) socket_handler.cpp
server_socket.o: server_socket.cpp server_socket.h socket_handler.h constants.h
- $(CC) $(CFLAGS) $(INCLUDES) server_socket.cpp
+ $(CXX) -c $(CXXFLAGS) $(INCLUDES) server_socket.cpp
client_socket.o: client_socket.cpp client_socket.h socket_handler.h constants.h
- $(CC) $(CFLAGS) $(INCLUDES) client_socket.cpp
+ $(CXX) -c $(CXXFLAGS) $(INCLUDES) client_socket.cpp
zhud.o: zhud.cpp zhud.h zsdl.h zobject.h zmini_map.h zfont_engine.h
- $(CC) $(CFLAGS) $(INCLUDES) zhud.cpp
+ $(CXX) -c $(CXXFLAGS) $(INCLUDES) zhud.cpp
zfont_engine.o: zfont_engine.cpp zfont_engine.h zfont.h zsdl.h
- $(CC) $(CFLAGS) $(INCLUDES) zfont_engine.cpp
+ $(CXX) -c $(CXXFLAGS) $(INCLUDES) zfont_engine.cpp
zfont.o: zfont.cpp zfont.h zfont.h zsdl.h
- $(CC) $(CFLAGS) $(INCLUDES) zfont.cpp
+ $(CXX) -c $(CXXFLAGS) $(INCLUDES) zfont.cpp
zmini_map.o: zmini_map.cpp zmini_map.h zmap.h zsdl.h zobject.h
- $(CC) $(CFLAGS) $(INCLUDES) zmini_map.cpp
+ $(CXX) -c $(CXXFLAGS) $(INCLUDES) zmini_map.cpp
cursor.o: cursor.cpp cursor.h constants.h zsdl.h
- $(CC) $(CFLAGS) $(INCLUDES) cursor.cpp
+ $(CXX) -c $(CXXFLAGS) $(INCLUDES) cursor.cpp
zgui_window.o: zgui_window.cpp zgui_window.h constants.h zsdl.h
- $(CC) $(CFLAGS) $(INCLUDES) zgui_window.cpp
+ $(CXX) -c $(CXXFLAGS) $(INCLUDES) zgui_window.cpp
zbuildlist.o: zbuildlist.cpp zbuildlist.h constants.h zsdl.h
- $(CC) $(CFLAGS) $(INCLUDES) zbuildlist.cpp
+ $(CXX) -c $(CXXFLAGS) $(INCLUDES) zbuildlist.cpp
zsound_engine.o: zsound_engine.cpp zsound_engine.h constants.h zsdl.h zmap.h
- $(CC) $(CFLAGS) $(INCLUDES) zsound_engine.cpp
+ $(CXX) -c $(CXXFLAGS) $(INCLUDES) zsound_engine.cpp
zmusic_engine.o: zmusic_engine.cpp zmusic_engine.h constants.h zsdl.h zmap.h
- $(CC) $(CFLAGS) $(INCLUDES) zmusic_engine.cpp
+ $(CXX) -c $(CXXFLAGS) $(INCLUDES) zmusic_engine.cpp
zcomp_message_engine.o: zcomp_message_engine.cpp zcomp_message_engine.h constants.h zsdl.h
- $(CC) $(CFLAGS) $(INCLUDES) zcomp_message_engine.cpp
+ $(CXX) -c $(CXXFLAGS) $(INCLUDES) zcomp_message_engine.cpp
zpath_finding.o: zpath_finding.cpp zpath_finding.h constants.h zsdl.h
- $(CC) $(CFLAGS) $(INCLUDES) zpath_finding.cpp
+ $(CXX) -c $(CXXFLAGS) $(INCLUDES) zpath_finding.cpp
zpath_finding_astar.o: zpath_finding_astar.cpp zpath_finding_astar.h constants.h zsdl.h
- $(CC) $(CFLAGS) $(INCLUDES) zpath_finding_astar.cpp
+ $(CXX) -c $(CXXFLAGS) $(INCLUDES) zpath_finding_astar.cpp
zsettings.o: zsettings.cpp zsettings.h constants.h zsdl.h
- $(CC) $(CFLAGS) $(INCLUDES) zsettings.cpp
+ $(CXX) -c $(CXXFLAGS) $(INCLUDES) zsettings.cpp
zportrait.o: zportrait.cpp zportrait.h constants.h zsdl.h zsdl_opengl.h
- $(CC) $(CFLAGS) $(INCLUDES) zportrait.cpp
+ $(CXX) -c $(CXXFLAGS) $(INCLUDES) zportrait.cpp
zteam.o: zteam.cpp zteam.h constants.h zsdl.h zsdl_opengl.h
- $(CC) $(CFLAGS) $(INCLUDES) zteam.cpp
+ $(CXX) -c $(CXXFLAGS) $(INCLUDES) zteam.cpp
zmysql.o: zmysql.cpp zmysql.h constants.h common.h zpsettings.h
- $(CC) $(CFLAGS) $(INCLUDES) zmysql.cpp
+ $(CXX) -c $(CXXFLAGS) $(INCLUDES) zmysql.cpp
zpsettings.o: zpsettings.cpp zpsettings.h
- $(CC) $(CFLAGS) $(INCLUDES) zpsettings.cpp
+ $(CXX) -c $(CXXFLAGS) $(INCLUDES) zpsettings.cpp
ztime.o: ztime.cpp ztime.h common.h
- $(CC) $(CFLAGS) $(INCLUDES) ztime.cpp
+ $(CXX) -c $(CXXFLAGS) $(INCLUDES) ztime.cpp
zvote.o: zvote.cpp zvote.h zmap.h zfont_engine.h
- $(CC) $(CFLAGS) $(INCLUDES) zvote.cpp
+ $(CXX) -c $(CXXFLAGS) $(INCLUDES) zvote.cpp
zunitrating.o: zunitrating.cpp zunitrating.h zmap.h constants.h
- $(CC) $(CFLAGS) $(INCLUDES) zunitrating.cpp
+ $(CXX) -c $(CXXFLAGS) $(INCLUDES) zunitrating.cpp
zencrypt_aes.o: zencrypt_aes.cpp zencrypt_aes.h
- $(CC) $(CFLAGS) $(INCLUDES) zencrypt_aes.cpp
+ $(CXX) -c $(CXXFLAGS) $(INCLUDES) zencrypt_aes.cpp
zolists.o: zolists.cpp zolists.h
- $(CC) $(CFLAGS) $(INCLUDES) zolists.cpp
+ $(CXX) -c $(CXXFLAGS) $(INCLUDES) zolists.cpp
zgui_main_menu_base.o: zgui_main_menu_base.cpp zgui_main_menu_base.h
- $(CC) $(CFLAGS) $(INCLUDES) zgui_main_menu_base.cpp
+ $(CXX) -c $(CXXFLAGS) $(INCLUDES) zgui_main_menu_base.cpp
zgui_main_menu_widget.o: zgui_main_menu_widget.cpp zgui_main_menu_widgets.h
- $(CC) $(CFLAGS) $(INCLUDES) zgui_main_menu_widget.cpp
+ $(CXX) -c $(CXXFLAGS) $(INCLUDES) zgui_main_menu_widget.cpp
#core files -----------------------------------
zcore.o: zcore.cpp zcore.h event_handler.h
- $(CC) $(CFLAGS) $(INCLUDES) zcore.cpp
+ $(CXX) -c $(CXXFLAGS) $(INCLUDES) zcore.cpp
zserver.o: zserver.cpp zserver.h zcore.h event_handler.h
- $(CC) $(CFLAGS) $(INCLUDES) zserver.cpp
+ $(CXX) -c $(CXXFLAGS) $(INCLUDES) zserver.cpp
zserver_events.o: zserver_events.cpp zserver.h zcore.h event_handler.h
- $(CC) $(CFLAGS) $(INCLUDES) zserver_events.cpp
+ $(CXX) -c $(CXXFLAGS) $(INCLUDES) zserver_events.cpp
zserver_commands.o: zserver_commands.cpp zserver.h zcore.h event_handler.h
- $(CC) $(CFLAGS) $(INCLUDES) zserver_commands.cpp
+ $(CXX) -c $(CXXFLAGS) $(INCLUDES) zserver_commands.cpp
zclient.o: zclient.cpp zclient.h zcore.h event_handler.h
- $(CC) $(CFLAGS) $(INCLUDES) zclient.cpp
+ $(CXX) -c $(CXXFLAGS) $(INCLUDES) zclient.cpp
zplayer.o: zplayer.cpp zplayer.h zclient.h zcore.h event_handler.h
- $(CC) $(CFLAGS) $(INCLUDES) zplayer.cpp
+ $(CXX) -c $(CXXFLAGS) $(INCLUDES) zplayer.cpp
zplayer_events.o: zplayer_events.cpp zplayer.h zclient.h zcore.h event_handler.h
- $(CC) $(CFLAGS) $(INCLUDES) zplayer_events.cpp
+ $(CXX) -c $(CXXFLAGS) $(INCLUDES) zplayer_events.cpp
zbot.o: zbot.cpp zbot.h zclient.h zcore.h event_handler.h
- $(CC) $(CFLAGS) $(INCLUDES) zbot.cpp
+ $(CXX) -c $(CXXFLAGS) $(INCLUDES) zbot.cpp
zbot_events.o: zbot_events.cpp zbot.h zclient.h zcore.h event_handler.h
- $(CC) $(CFLAGS) $(INCLUDES) zbot_events.cpp
+ $(CXX) -c $(CXXFLAGS) $(INCLUDES) zbot_events.cpp
ztray.o: ztray.cpp ztray.h zclient.h zcore.h event_handler.h
- $(CC) $(CFLAGS) $(INCLUDES) ztray.cpp
+ $(CXX) -c $(CXXFLAGS) $(INCLUDES) ztray.cpp
SDL_rotozoom.o: SDL_rotozoom.cpp SDL_rotozoom.h
- $(CC) $(CFLAGS) $(INCLUDES) SDL_rotozoom.cpp
+ $(CXX) -c $(CXXFLAGS) $(INCLUDES) SDL_rotozoom.cpp
#effect files ---------------------------------
ebullet.o: ebullet.cpp ebullet.h zsdl.h zeffect.h
- $(CC) $(CFLAGS) $(INCLUDES) ebullet.cpp
+ $(CXX) -c $(CXXFLAGS) $(INCLUDES) ebullet.cpp
elaser.o: elaser.cpp elaser.h zsdl.h zeffect.h
- $(CC) $(CFLAGS) $(INCLUDES) elaser.cpp
+ $(CXX) -c $(CXXFLAGS) $(INCLUDES) elaser.cpp
eflame.o: eflame.cpp eflame.h zsdl.h zeffect.h
- $(CC) $(CFLAGS) $(INCLUDES) eflame.cpp
+ $(CXX) -c $(CXXFLAGS) $(INCLUDES) eflame.cpp
epyrofire.o: epyrofire.cpp epyrofire.h zsdl.h zeffect.h
- $(CC) $(CFLAGS) $(INCLUDES) epyrofire.cpp
+ $(CXX) -c $(CXXFLAGS) $(INCLUDES) epyrofire.cpp
etoughrocket.o: etoughrocket.cpp etoughrocket.h zsdl.h zeffect.h
- $(CC) $(CFLAGS) $(INCLUDES) etoughrocket.cpp
+ $(CXX) -c $(CXXFLAGS) $(INCLUDES) etoughrocket.cpp
etoughmushroom.o: etoughmushroom.cpp etoughmushroom.h zsdl.h zeffect.h
- $(CC) $(CFLAGS) $(INCLUDES) etoughmushroom.cpp
+ $(CXX) -c $(CXXFLAGS) $(INCLUDES) etoughmushroom.cpp
etoughsmoke.o: etoughsmoke.cpp etoughsmoke.h zsdl.h zeffect.h
- $(CC) $(CFLAGS) $(INCLUDES) etoughsmoke.cpp
+ $(CXX) -c $(CXXFLAGS) $(INCLUDES) etoughsmoke.cpp
elightrocket.o: elightrocket.cpp elightrocket.h zsdl.h zeffect.h
- $(CC) $(CFLAGS) $(INCLUDES) elightrocket.cpp
+ $(CXX) -c $(CXXFLAGS) $(INCLUDES) elightrocket.cpp
elightinitfire.o: elightinitfire.cpp elightinitfire.h zsdl.h zeffect.h
- $(CC) $(CFLAGS) $(INCLUDES) elightinitfire.cpp
+ $(CXX) -c $(CXXFLAGS) $(INCLUDES) elightinitfire.cpp
emomissilerockets.o: emomissilerockets.cpp emomissilerockets.h zsdl.h zeffect.h
- $(CC) $(CFLAGS) $(INCLUDES) emomissilerockets.cpp
+ $(CXX) -c $(CXXFLAGS) $(INCLUDES) emomissilerockets.cpp
emissilecrockets.o: emissilecrockets.cpp emissilecrockets.h zsdl.h zeffect.h
- $(CC) $(CFLAGS) $(INCLUDES) emissilecrockets.cpp
+ $(CXX) -c $(CXXFLAGS) $(INCLUDES) emissilecrockets.cpp
erobotdeath.o: erobotdeath.cpp erobotdeath.h zsdl.h zeffect.h
- $(CC) $(CFLAGS) $(INCLUDES) erobotdeath.cpp
+ $(CXX) -c $(CXXFLAGS) $(INCLUDES) erobotdeath.cpp
eunitparticle.o: eunitparticle.cpp eunitparticle.h zsdl.h zeffect.h
- $(CC) $(CFLAGS) $(INCLUDES) eunitparticle.cpp
+ $(CXX) -c $(CXXFLAGS) $(INCLUDES) eunitparticle.cpp
edeath.o: edeath.cpp edeath.h zsdl.h zeffect.h
- $(CC) $(CFLAGS) $(INCLUDES) edeath.cpp
+ $(CXX) -c $(CXXFLAGS) $(INCLUDES) edeath.cpp
estandard.o: estandard.cpp estandard.h zsdl.h zeffect.h
- $(CC) $(CFLAGS) $(INCLUDES) estandard.cpp
+ $(CXX) -c $(CXXFLAGS) $(INCLUDES) estandard.cpp
edeathsparks.o: edeathsparks.cpp edeathsparks.h zsdl.h zeffect.h
- $(CC) $(CFLAGS) $(INCLUDES) edeathsparks.cpp
+ $(CXX) -c $(CXXFLAGS) $(INCLUDES) edeathsparks.cpp
eturrentmissile.o: eturrentmissile.cpp eturrentmissile.h zsdl.h zeffect.h
- $(CC) $(CFLAGS) $(INCLUDES) eturrentmissile.cpp
+ $(CXX) -c $(CXXFLAGS) $(INCLUDES) eturrentmissile.cpp
esideexplosion.o: esideexplosion.cpp esideexplosion.h zsdl.h zeffect.h
- $(CC) $(CFLAGS) $(INCLUDES) esideexplosion.cpp
+ $(CXX) -c $(CXXFLAGS) $(INCLUDES) esideexplosion.cpp
ecannondeath.o: ecannondeath.cpp ecannondeath.h zsdl.h zeffect.h
- $(CC) $(CFLAGS) $(INCLUDES) ecannondeath.cpp
+ $(CXX) -c $(CXXFLAGS) $(INCLUDES) ecannondeath.cpp
erockparticle.o: erockparticle.cpp erockparticle.h zsdl.h zeffect.h
- $(CC) $(CFLAGS) $(INCLUDES) erockparticle.cpp
+ $(CXX) -c $(CXXFLAGS) $(INCLUDES) erockparticle.cpp
erockturrent.o: erockturrent.cpp erockturrent.h zsdl.h zeffect.h
- $(CC) $(CFLAGS) $(INCLUDES) erockturrent.cpp
+ $(CXX) -c $(CXXFLAGS) $(INCLUDES) erockturrent.cpp
emapobjectturrent.o: emapobjectturrent.cpp emapobjectturrent.h zsdl.h zeffect.h
- $(CC) $(CFLAGS) $(INCLUDES) emapobjectturrent.cpp
+ $(CXX) -c $(CXXFLAGS) $(INCLUDES) emapobjectturrent.cpp
ebridgeturrent.o: ebridgeturrent.cpp ebridgeturrent.h zsdl.h zeffect.h
- $(CC) $(CFLAGS) $(INCLUDES) ebridgeturrent.cpp
+ $(CXX) -c $(CXXFLAGS) $(INCLUDES) ebridgeturrent.cpp
ecraneconco.o: ecraneconco.cpp ecraneconco.h zsdl.h zeffect.h
- $(CC) $(CFLAGS) $(INCLUDES) ecraneconco.cpp
+ $(CXX) -c $(CXXFLAGS) $(INCLUDES) ecraneconco.cpp
erobotturrent.o: erobotturrent.cpp erobotturrent.h zsdl.h zeffect.h
- $(CC) $(CFLAGS) $(INCLUDES) erobotturrent.cpp
+ $(CXX) -c $(CXXFLAGS) $(INCLUDES) erobotturrent.cpp
etrack.o: etrack.cpp etrack.h zsdl.h zeffect.h
- $(CC) $(CFLAGS) $(INCLUDES) etrack.cpp
+ $(CXX) -c $(CXXFLAGS) $(INCLUDES) etrack.cpp
etankdirt.o: etankdirt.cpp etankdirt.h zsdl.h zeffect.h
- $(CC) $(CFLAGS) $(INCLUDES) etankdirt.cpp
+ $(CXX) -c $(CXXFLAGS) $(INCLUDES) etankdirt.cpp
etanksmoke.o: etanksmoke.cpp etanksmoke.h zsdl.h zeffect.h
- $(CC) $(CFLAGS) $(INCLUDES) etanksmoke.cpp
+ $(CXX) -c $(CXXFLAGS) $(INCLUDES) etanksmoke.cpp
etankoil.o: etankoil.cpp etankoil.h zsdl.h zeffect.h
- $(CC) $(CFLAGS) $(INCLUDES) etankoil.cpp
+ $(CXX) -c $(CXXFLAGS) $(INCLUDES) etankoil.cpp
etankspark.o: etankspark.cpp etankspark.h zsdl.h zeffect.h
- $(CC) $(CFLAGS) $(INCLUDES) etankspark.cpp
+ $(CXX) -c $(CXXFLAGS) $(INCLUDES) etankspark.cpp
#robot files ----------------------------------
rgrunt.o: rgrunt.cpp rgrunt.h zrobot.h zobject.h constants.h zsdl.h zmap.h common.h
- $(CC) $(CFLAGS) $(INCLUDES) rgrunt.cpp
+ $(CXX) -c $(CXXFLAGS) $(INCLUDES) rgrunt.cpp
rpsycho.o: rpsycho.cpp rpsycho.h zrobot.h zobject.h constants.h zsdl.h zmap.h common.h
- $(CC) $(CFLAGS) $(INCLUDES) rpsycho.cpp
+ $(CXX) -c $(CXXFLAGS) $(INCLUDES) rpsycho.cpp
rtough.o: rtough.cpp rtough.h zrobot.h zobject.h constants.h zsdl.h zmap.h common.h
- $(CC) $(CFLAGS) $(INCLUDES) rtough.cpp
+ $(CXX) -c $(CXXFLAGS) $(INCLUDES) rtough.cpp
rsniper.o: rsniper.cpp rsniper.h zrobot.h zobject.h constants.h zsdl.h zmap.h common.h
- $(CC) $(CFLAGS) $(INCLUDES) rsniper.cpp
+ $(CXX) -c $(CXXFLAGS) $(INCLUDES) rsniper.cpp
rpyro.o: rpyro.cpp rpyro.h zrobot.h zobject.h constants.h zsdl.h zmap.h common.h
- $(CC) $(CFLAGS) $(INCLUDES) rpyro.cpp
+ $(CXX) -c $(CXXFLAGS) $(INCLUDES) rpyro.cpp
rlaser.o: rlaser.cpp rlaser.h zrobot.h zobject.h constants.h zsdl.h zmap.h common.h
- $(CC) $(CFLAGS) $(INCLUDES) rlaser.cpp
+ $(CXX) -c $(CXXFLAGS) $(INCLUDES) rlaser.cpp
#vehicle files --------------------------------
vjeep.o: vjeep.cpp vjeep.h zvehicle.h zobject.h constants.h zsdl.h zmap.h common.h
- $(CC) $(CFLAGS) $(INCLUDES) vjeep.cpp
+ $(CXX) -c $(CXXFLAGS) $(INCLUDES) vjeep.cpp
vlight.o: vlight.cpp vlight.h zvehicle.h zobject.h constants.h zsdl.h zmap.h common.h
- $(CC) $(CFLAGS) $(INCLUDES) vlight.cpp
+ $(CXX) -c $(CXXFLAGS) $(INCLUDES) vlight.cpp
vmedium.o: vmedium.cpp vmedium.h zvehicle.h zobject.h constants.h zsdl.h zmap.h common.h
- $(CC) $(CFLAGS) $(INCLUDES) vmedium.cpp
+ $(CXX) -c $(CXXFLAGS) $(INCLUDES) vmedium.cpp
vheavy.o: vheavy.cpp vheavy.h zvehicle.h zobject.h constants.h zsdl.h zmap.h common.h
- $(CC) $(CFLAGS) $(INCLUDES) vheavy.cpp
+ $(CXX) -c $(CXXFLAGS) $(INCLUDES) vheavy.cpp
vmissilelauncher.o: vmissilelauncher.cpp vmissilelauncher.h zvehicle.h zobject.h constants.h zsdl.h zmap.h common.h
- $(CC) $(CFLAGS) $(INCLUDES) vmissilelauncher.cpp
+ $(CXX) -c $(CXXFLAGS) $(INCLUDES) vmissilelauncher.cpp
vapc.o: vapc.cpp vapc.h zvehicle.h zobject.h constants.h zsdl.h zmap.h common.h
- $(CC) $(CFLAGS) $(INCLUDES) vapc.cpp
+ $(CXX) -c $(CXXFLAGS) $(INCLUDES) vapc.cpp
vcrane.o: vcrane.cpp vcrane.h zvehicle.h zobject.h constants.h zsdl.h zmap.h common.h
- $(CC) $(CFLAGS) $(INCLUDES) vcrane.cpp
+ $(CXX) -c $(CXXFLAGS) $(INCLUDES) vcrane.cpp
#cannon files ---------------------------------
cgatling.o: cgatling.cpp cgatling.h zcannon.h zobject.h constants.h zsdl.h zmap.h common.h
- $(CC) $(CFLAGS) $(INCLUDES) cgatling.cpp
+ $(CXX) -c $(CXXFLAGS) $(INCLUDES) cgatling.cpp
cgun.o: cgun.cpp cgun.h zcannon.h zobject.h constants.h zsdl.h zmap.h common.h
- $(CC) $(CFLAGS) $(INCLUDES) cgun.cpp
+ $(CXX) -c $(CXXFLAGS) $(INCLUDES) cgun.cpp
chowitzer.o: chowitzer.cpp chowitzer.h zcannon.h zobject.h constants.h zsdl.h zmap.h common.h
- $(CC) $(CFLAGS) $(INCLUDES) chowitzer.cpp
+ $(CXX) -c $(CXXFLAGS) $(INCLUDES) chowitzer.cpp
cmissilecannon.o: cmissilecannon.cpp cmissilecannon.h zcannon.h zobject.h constants.h zsdl.h zmap.h common.h
- $(CC) $(CFLAGS) $(INCLUDES) cmissilecannon.cpp
+ $(CXX) -c $(CXXFLAGS) $(INCLUDES) cmissilecannon.cpp
#building files -------------------------------
bfort.o: bfort.cpp bfort.h zbuilding.h zobject.h constants.h zsdl.h zmap.h common.h
- $(CC) $(CFLAGS) $(INCLUDES) bfort.cpp
+ $(CXX) -c $(CXXFLAGS) $(INCLUDES) bfort.cpp
brobot.o: brobot.cpp brobot.h zbuilding.h zobject.h constants.h zsdl.h zmap.h common.h
- $(CC) $(CFLAGS) $(INCLUDES) brobot.cpp
+ $(CXX) -c $(CXXFLAGS) $(INCLUDES) brobot.cpp
bvehicle.o: bvehicle.cpp bvehicle.h zbuilding.h zobject.h constants.h zsdl.h zmap.h common.h
- $(CC) $(CFLAGS) $(INCLUDES) bvehicle.cpp
+ $(CXX) -c $(CXXFLAGS) $(INCLUDES) bvehicle.cpp
bradar.o: bradar.cpp bradar.h zbuilding.h zobject.h constants.h zsdl.h zmap.h common.h
- $(CC) $(CFLAGS) $(INCLUDES) bradar.cpp
+ $(CXX) -c $(CXXFLAGS) $(INCLUDES) bradar.cpp
brepair.o: brepair.cpp brepair.h zbuilding.h zobject.h constants.h zsdl.h zmap.h common.h
- $(CC) $(CFLAGS) $(INCLUDES) brepair.cpp
+ $(CXX) -c $(CXXFLAGS) $(INCLUDES) brepair.cpp
bbridge.o: bbridge.cpp bbridge.h zbuilding.h zobject.h constants.h zsdl.h zmap.h common.h
- $(CC) $(CFLAGS) $(INCLUDES) bbridge.cpp
+ $(CXX) -c $(CXXFLAGS) $(INCLUDES) bbridge.cpp
#object files ---------------------------------
zmap.o: zmap.cpp zmap.h constants.h zsdl.h
- $(CC) $(CFLAGS) $(INCLUDES) zmap.cpp
+ $(CXX) -c $(CXXFLAGS) $(INCLUDES) zmap.cpp
zmap_crater_graphics.o: zmap_crater_graphics.cpp constants.h zsdl.h
- $(CC) $(CFLAGS) $(INCLUDES) zmap_crater_graphics.cpp
+ $(CXX) -c $(CXXFLAGS) $(INCLUDES) zmap_crater_graphics.cpp
zeffect.o: zeffect.cpp zeffect.h
- $(CC) $(CFLAGS) $(INCLUDES) zeffect.cpp
+ $(CXX) -c $(CXXFLAGS) $(INCLUDES) zeffect.cpp
zobject.o: zobject.cpp zobject.h constants.h zsdl.h zmap.h common.h
- $(CC) $(CFLAGS) $(INCLUDES) zobject.cpp
+ $(CXX) -c $(CXXFLAGS) $(INCLUDES) zobject.cpp
zrobot.o: zrobot.cpp zrobot.h zobject.h constants.h zsdl.h zmap.h common.h
- $(CC) $(CFLAGS) $(INCLUDES) zrobot.cpp
+ $(CXX) -c $(CXXFLAGS) $(INCLUDES) zrobot.cpp
zbuilding.o: zbuilding.cpp zbuilding.h zobject.h constants.h zsdl.h zmap.h common.h
- $(CC) $(CFLAGS) $(INCLUDES) zbuilding.cpp
+ $(CXX) -c $(CXXFLAGS) $(INCLUDES) zbuilding.cpp
zcannon.o: zcannon.cpp zcannon.h zobject.h constants.h zsdl.h zmap.h common.h
- $(CC) $(CFLAGS) $(INCLUDES) zcannon.cpp
+ $(CXX) -c $(CXXFLAGS) $(INCLUDES) zcannon.cpp
zvehicle.o: zvehicle.cpp zvehicle.h zobject.h constants.h zsdl.h zmap.h common.h
- $(CC) $(CFLAGS) $(INCLUDES) zvehicle.cpp
+ $(CXX) -c $(CXXFLAGS) $(INCLUDES) zvehicle.cpp
oflag.o: oflag.cpp oflag.h zobject.h constants.h zsdl.h zmap.h common.h
- $(CC) $(CFLAGS) $(INCLUDES) oflag.cpp
+ $(CXX) -c $(CXXFLAGS) $(INCLUDES) oflag.cpp
orock.o: orock.cpp orock.h zobject.h constants.h zsdl.h zmap.h common.h
- $(CC) $(CFLAGS) $(INCLUDES) orock.cpp
+ $(CXX) -c $(CXXFLAGS) $(INCLUDES) orock.cpp
ogrenades.o: ogrenades.cpp ogrenades.h zobject.h constants.h zsdl.h zmap.h common.h
- $(CC) $(CFLAGS) $(INCLUDES) ogrenades.cpp
+ $(CXX) -c $(CXXFLAGS) $(INCLUDES) ogrenades.cpp
orockets.o: orockets.cpp orockets.h zobject.h constants.h zsdl.h zmap.h common.h
- $(CC) $(CFLAGS) $(INCLUDES) orockets.cpp
+ $(CXX) -c $(CXXFLAGS) $(INCLUDES) orockets.cpp
ohut.o: ohut.cpp ohut.h zobject.h constants.h zsdl.h zmap.h common.h
- $(CC) $(CFLAGS) $(INCLUDES) ohut.cpp
+ $(CXX) -c $(CXXFLAGS) $(INCLUDES) ohut.cpp
omapobject.o: omapobject.cpp omapobject.h zobject.h constants.h zsdl.h zmap.h common.h
- $(CC) $(CFLAGS) $(INCLUDES) omapobject.cpp
+ $(CXX) -c $(CXXFLAGS) $(INCLUDES) omapobject.cpp
abird.o: abird.cpp abird.h zobject.h constants.h zsdl.h zmap.h common.h
- $(CC) $(CFLAGS) $(INCLUDES) abird.cpp
+ $(CXX) -c $(CXXFLAGS) $(INCLUDES) abird.cpp
ahutanimal.o: ahutanimal.cpp ahutanimal.h zobject.h constants.h zsdl.h zmap.h common.h
- $(CC) $(CFLAGS) $(INCLUDES) ahutanimal.cpp
+ $(CXX) -c $(CXXFLAGS) $(INCLUDES) ahutanimal.cpp
#gui files ---------------------------------
gwproduction.o: gwproduction.cpp gwproduction.h zgui_window.h constants.h zsdl.h zmap.h common.h
- $(CC) $(CFLAGS) $(INCLUDES) gwproduction.cpp
+ $(CXX) -c $(CXXFLAGS) $(INCLUDES) gwproduction.cpp
gwproduction_us.o: gwproduction_us.cpp gwproduction.h zgui_window.h constants.h zsdl.h zmap.h common.h
- $(CC) $(CFLAGS) $(INCLUDES) gwproduction_us.cpp
+ $(CXX) -c $(CXXFLAGS) $(INCLUDES) gwproduction_us.cpp
gwproduction_fus.o: gwproduction_fus.cpp gwproduction.h zgui_window.h constants.h zsdl.h zmap.h common.h
- $(CC) $(CFLAGS) $(INCLUDES) gwproduction_fus.cpp
+ $(CXX) -c $(CXXFLAGS) $(INCLUDES) gwproduction_fus.cpp
gwlogin.o: gwlogin.cpp gwlogin.h zgui_window.h constants.h zsdl.h zmap.h common.h
- $(CC) $(CFLAGS) $(INCLUDES) gwlogin.cpp
+ $(CXX) -c $(CXXFLAGS) $(INCLUDES) gwlogin.cpp
gwcreateuser.o: gwcreateuser.cpp gwcreateuser.h zgui_window.h constants.h zsdl.h zmap.h common.h
- $(CC) $(CFLAGS) $(INCLUDES) gwcreateuser.cpp
+ $(CXX) -c $(CXXFLAGS) $(INCLUDES) gwcreateuser.cpp
gwfactory_list.o: gwfactory_list.cpp gwfactory_list.h zgui_window.h constants.h zsdl.h zmap.h common.h
- $(CC) $(CFLAGS) $(INCLUDES) gwfactory_list.cpp
+ $(CXX) -c $(CXXFLAGS) $(INCLUDES) gwfactory_list.cpp
gmm_change_teams.o: gmm_change_teams.cpp zgui_main_menu_base.h
- $(CC) $(CFLAGS) $(INCLUDES) gmm_change_teams.cpp
+ $(CXX) -c $(CXXFLAGS) $(INCLUDES) gmm_change_teams.cpp
gmm_main_menu.o: gmm_main_menu.cpp zgui_main_menu_base.h
- $(CC) $(CFLAGS) $(INCLUDES) gmm_main_menu.cpp
+ $(CXX) -c $(CXXFLAGS) $(INCLUDES) gmm_main_menu.cpp
gmm_manage_bots.o: gmm_manage_bots.cpp zgui_main_menu_base.h
- $(CC) $(CFLAGS) $(INCLUDES) gmm_manage_bots.cpp
+ $(CXX) -c $(CXXFLAGS) $(INCLUDES) gmm_manage_bots.cpp
gmm_player_list.o: gmm_player_list.cpp zgui_main_menu_base.h
- $(CC) $(CFLAGS) $(INCLUDES) gmm_player_list.cpp
+ $(CXX) -c $(CXXFLAGS) $(INCLUDES) gmm_player_list.cpp
gmm_select_map.o: gmm_select_map.cpp zgui_main_menu_base.h
- $(CC) $(CFLAGS) $(INCLUDES) gmm_select_map.cpp
+ $(CXX) -c $(CXXFLAGS) $(INCLUDES) gmm_select_map.cpp
gmm_options.o: gmm_options.cpp zgui_main_menu_base.h
- $(CC) $(CFLAGS) $(INCLUDES) gmm_options.cpp
+ $(CXX) -c $(CXXFLAGS) $(INCLUDES) gmm_options.cpp
gmm_warning.o: gmm_warning.cpp zgui_main_menu_base.h
- $(CC) $(CFLAGS) $(INCLUDES) gmm_warning.cpp
+ $(CXX) -c $(CXXFLAGS) $(INCLUDES) gmm_warning.cpp
gmmw_button.o: gmmw_button.cpp zgui_main_menu_widgets.h
- $(CC) $(CFLAGS) $(INCLUDES) gmmw_button.cpp
+ $(CXX) -c $(CXXFLAGS) $(INCLUDES) gmmw_button.cpp
gmmw_label.o: gmmw_label.cpp zgui_main_menu_widgets.h
- $(CC) $(CFLAGS) $(INCLUDES) gmmw_label.cpp
+ $(CXX) -c $(CXXFLAGS) $(INCLUDES) gmmw_label.cpp
gmmw_list.o: gmmw_list.cpp zgui_main_menu_widgets.h
- $(CC) $(CFLAGS) $(INCLUDES) gmmw_list.cpp
+ $(CXX) -c $(CXXFLAGS) $(INCLUDES) gmmw_list.cpp
gmmw_radio.o: gmmw_radio.cpp zgui_main_menu_widgets.h
- $(CC) $(CFLAGS) $(INCLUDES) gmmw_radio.cpp
+ $(CXX) -c $(CXXFLAGS) $(INCLUDES) gmmw_radio.cpp
gmmw_team_color.o: gmmw_team_color.cpp zgui_main_menu_widgets.h
- $(CC) $(CFLAGS) $(INCLUDES) gmmw_team_color.cpp
+ $(CXX) -c $(CXXFLAGS) $(INCLUDES) gmmw_team_color.cpp
zip:
zip zod_src_${DATE}.zip *.cpp *.h makefile
--- zod_engine/zod_launcher_src/makefile
+++ zod_engine/zod_launcher_src/makefile
@@ -1,2 +1,11 @@
+CXX ?= g++
+CXXFLAGS += `wx-config --cppflags`
+LIBS += `wx-config --libs`
+EXENAME = zod_launcher
+
+ifdef DATA_PATH
+ CXXFLAGS += -DDATA_PATH=\"$(DATA_PATH)\"
+endif
+
default:
- g++ -g -o zod_launcher *.cpp `wx-config --cppflags` `wx-config --libs`
+ $(CXX) $(CXXFLAGS) -o $(EXENAME) *.cpp $(LDFLAGS) $(LIBS)