improved makefile
git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@4698 e016b1c5-ed68-44aa-a2f7-31cac88cffde
This commit is contained in:
+269
-25
@@ -1,13 +1,28 @@
|
||||
CXXOPTFLAGS=-O3 -fomit-frame-pointer
|
||||
INCLUDES1=-I/usr/X11R6/include -I../enet/include -I../src
|
||||
INCLUDES2=`sdl-config --cflags`
|
||||
#CXXCUSTOMFLAGS=-fsigned-char -Wall -Wextra -Wno-missing-field-initializers -Wno-unused -Wpointer-arith -Wconversion -rdynamic
|
||||
CXXCUSTOMFLAGS=-fsigned-char -Wall -rdynamic
|
||||
CXXFLAGS=$(CXXOPTFLAGS) $(INCLUDES1) $(INCLUDES2) $(CXXCUSTOMFLAGS)
|
||||
CXXFLAGSSERVER=$(CXXOPTFLAGS) $(INCLUDES1) $(CXXCUSTOMFLAGS)
|
||||
CXXFLAGS= -O3 -fomit-frame-pointer
|
||||
override CXXFLAGS+= -Wall -fsigned-char
|
||||
|
||||
PLATFORM= $(shell uname -s)
|
||||
PLATFORM_PREFIX=native
|
||||
CLIENT_LIBS=-L/usr/X11R6/lib -L../enet -lenet `sdl-config --libs` -lSDL_image -lz -lGL -lopenal -lvorbisfile -ljpeg
|
||||
|
||||
INCLUDES= -I. -Ibot -I../enet/include
|
||||
|
||||
STRIP=
|
||||
ifeq (,$(findstring -g,$(CXXFLAGS)))
|
||||
ifeq (,$(findstring -pg,$(CXXFLAGS)))
|
||||
STRIP=strip
|
||||
endif
|
||||
endif
|
||||
|
||||
ifneq (,$(findstring MINGW,$(PLATFORM)))
|
||||
WINDRES= windres
|
||||
CLIENT_INCLUDES= $(INCLUDES) -I../include
|
||||
CLIENT_LIBS= -mwindows -L../lib -lSDL -lSDL_image -lzdll -lopengl32 -lenet -lOpenAL32 -llibvorbisfile -llibjpeg-static-mt -llibintl -lws2_32 -lwinmm
|
||||
else
|
||||
override CXXFLAGS+= -rdynamic
|
||||
CLIENT_INCLUDES= $(INCLUDES) -I/usr/X11R6/include `sdl-config --cflags`
|
||||
CLIENT_LIBS= -L../enet -lenet -L/usr/X11R6/lib `sdl-config --libs` -lSDL_image -lz -lGL -lopenal -lvorbisfile -ljpeg
|
||||
endif
|
||||
|
||||
CLIENT_OBJS= \
|
||||
audiomanager.o \
|
||||
client.o \
|
||||
@@ -59,20 +74,35 @@ CLIENT_OBJS= \
|
||||
bot/bot_waypoint.o \
|
||||
bot/ac_bot.o \
|
||||
bot/ac_bot_ai.o
|
||||
ifneq (,$(findstring MINGW,$(PLATFORM)))
|
||||
CLIENT_OBJS+= ../vcpp/SDL_win32_main.o
|
||||
endif
|
||||
CLIENT_PCH= cube.h.gch
|
||||
|
||||
ifneq (,$(findstring MINGW,$(PLATFORM)))
|
||||
SERVER_INCLUDES= -DSTANDALONE $(INCLUDES) -I../include
|
||||
SERVER_LIBS= -L../lib -lzdll -lenet -llibintl -lws2_32 -lwinmm
|
||||
else
|
||||
SERVER_INCLUDES= -DSTANDALONE $(INCLUDES)
|
||||
SERVER_LIBS= -L../enet -lenet -lz
|
||||
endif
|
||||
|
||||
SERVER_LIBS=-L../enet -lenet -lz
|
||||
SERVER_FILES= \
|
||||
log.cpp \
|
||||
serverms.cpp \
|
||||
server.cpp \
|
||||
protocol.cpp \
|
||||
tools.cpp \
|
||||
wizard.cpp
|
||||
SERVER_OBJS= \
|
||||
log-standalone.o \
|
||||
serverms-standalone.o \
|
||||
server-standalone.o \
|
||||
protocol-standalone.o \
|
||||
tools-standalone.o \
|
||||
wizard-standalone.o
|
||||
|
||||
ifeq ($(PLATFORM),SunOS)
|
||||
CLIENT_LIBS+= -lsocket -lnsl -lX11
|
||||
SERVER_LIBS+= -lsocket -lnsl
|
||||
endif
|
||||
|
||||
default: all
|
||||
|
||||
all: libenet client server
|
||||
all: client server
|
||||
|
||||
../enet/Makefile:
|
||||
cd ../enet; ./configure
|
||||
@@ -80,22 +110,236 @@ all: libenet client server
|
||||
libenet: ../enet/Makefile
|
||||
-$(MAKE) -C ../enet all
|
||||
|
||||
clean-enet: ../enet/Makefile
|
||||
$(MAKE) -C ../enet/ clean
|
||||
|
||||
clean:
|
||||
-$(RM) -f $(SERVER_OBJS) $(CLIENT_OBJS) ac_server ac_client
|
||||
# -$(MAKE) -C ../enet/ clean
|
||||
|
||||
%.h.gch: %.h
|
||||
$(CXX) $(CXXFLAGS) -o $@.tmp $(subst .h.gch,.h,$@)
|
||||
mv $@.tmp $@
|
||||
|
||||
%-standalone.o: %.cpp
|
||||
$(CXX) $(CXXFLAGS) -c -o $@ $(subst -standalone.o,.cpp,$@)
|
||||
|
||||
$(CLIENT_OBJS): CXXFLAGS += $(CLIENT_INCLUDES)
|
||||
$(CLIENT_OBJS): $(CLIENT_PCH)
|
||||
$(SERVER_OBJS): CXXFLAGS += $(SERVER_INCLUDES)
|
||||
|
||||
ifneq (,$(findstring MINGW,$(PLATFORM)))
|
||||
../vcpp/%.o:
|
||||
$(CXX) $(CXXFLAGS) -c -o $@ $(subst .o,.c,$@)
|
||||
|
||||
client: $(CLIENT_OBJS)
|
||||
$(WINDRES) -I ../vcpp -i ../vcpp/cube.rc -J rc -o ../vcpp/cube.res -O coff
|
||||
$(CXX) $(CXXFLAGS) -o ../../bin_win32/ac_client.exe ../vcpp/cube.res $(CLIENT_OBJS) $(CLIENT_LIBS)
|
||||
|
||||
server: $(SERVER_OBJS)
|
||||
$(CXX) $(CXXFLAGS) -o ../../bin_win32/ac_server.exe $(SERVER_OBJS) $(SERVER_LIBS)
|
||||
|
||||
client_install: client
|
||||
server_install: server
|
||||
|
||||
else
|
||||
client: libenet $(CLIENT_OBJS)
|
||||
$(CXX) $(CXXFLAGS) -o ac_client $(CLIENT_OBJS) $(CLIENT_LIBS)
|
||||
|
||||
server: libenet $(SERVER_FILES)
|
||||
$(CXX) $(CXXFLAGSSERVER) -o ac_server -DSTANDALONE $(SERVER_FILES) $(SERVER_LIBS)
|
||||
|
||||
install: all
|
||||
server: libenet $(SERVER_OBJS)
|
||||
$(CXX) $(CXXFLAGS) -o ac_server $(SERVER_OBJS) $(SERVER_LIBS)
|
||||
|
||||
client_install: client
|
||||
cp ac_client ../../bin_unix/$(PLATFORM_PREFIX)_client
|
||||
cp ac_server ../../bin_unix/$(PLATFORM_PREFIX)_server
|
||||
# strip ../../bin_unix/$(PLATFORM_PREFIX)_client
|
||||
# strip ../../bin_unix/$(PLATFORM_PREFIX)_server
|
||||
#ifneq (,$(STRIP))
|
||||
# $(STRIP) ../../bin_unix/$(PLATFORM_PREFIX)_client
|
||||
#endif
|
||||
|
||||
server_install: server
|
||||
cp ac_server ../../bin_unix/$(PLATFORM_PREFIX)_server
|
||||
# strip ../../bin_unix/$(PLATFORM_PREFIX)_server
|
||||
#ifneq (,$(STRIP))
|
||||
# $(STRIP) ../../bin_unix/$(PLATFORM_PREFIX)_server
|
||||
#endif
|
||||
|
||||
endif
|
||||
|
||||
install: client_install server_install
|
||||
|
||||
depend:
|
||||
makedepend -Y -I. -Ibot $(subst .o,.cpp,$(CLIENT_OBJS))
|
||||
makedepend -a -o.h.gch -Y -I. -Ibot $(subst .h.gch,.h,$(CLIENT_PCH))
|
||||
makedepend -a -o-standalone.o -Y -I. -Ibot $(subst -standalone.o,.cpp,$(SERVER_OBJS))
|
||||
|
||||
# DO NOT DELETE
|
||||
|
||||
audiomanager.o: cube.h platform.h tools.h geom.h model.h protocol.h sound.h
|
||||
audiomanager.o: weapon.h entity.h world.h i18n.h command.h vote.h console.h
|
||||
audiomanager.o: protos.h
|
||||
client.o: cube.h platform.h tools.h geom.h model.h protocol.h sound.h
|
||||
client.o: weapon.h entity.h world.h i18n.h command.h vote.h console.h
|
||||
client.o: protos.h bot/bot.h bot/bot_util.h bot/bot_waypoint.h bot/ac_bot.h
|
||||
clientgame.o: cube.h platform.h tools.h geom.h model.h protocol.h sound.h
|
||||
clientgame.o: weapon.h entity.h world.h i18n.h command.h vote.h console.h
|
||||
clientgame.o: protos.h bot/bot.h bot/bot_util.h bot/bot_waypoint.h
|
||||
clientgame.o: bot/ac_bot.h
|
||||
clients2c.o: cube.h platform.h tools.h geom.h model.h protocol.h sound.h
|
||||
clients2c.o: weapon.h entity.h world.h i18n.h command.h vote.h console.h
|
||||
clients2c.o: protos.h bot/bot.h bot/bot_util.h bot/bot_waypoint.h
|
||||
clients2c.o: bot/ac_bot.h
|
||||
command.o: cube.h platform.h tools.h geom.h model.h protocol.h sound.h
|
||||
command.o: weapon.h entity.h world.h i18n.h command.h vote.h console.h
|
||||
command.o: protos.h
|
||||
console.o: cube.h platform.h tools.h geom.h model.h protocol.h sound.h
|
||||
console.o: weapon.h entity.h world.h i18n.h command.h vote.h console.h
|
||||
console.o: protos.h
|
||||
docs.o: cube.h platform.h tools.h geom.h model.h protocol.h sound.h weapon.h
|
||||
docs.o: entity.h world.h i18n.h command.h vote.h console.h protos.h
|
||||
editing.o: cube.h platform.h tools.h geom.h model.h protocol.h sound.h
|
||||
editing.o: weapon.h entity.h world.h i18n.h command.h vote.h console.h
|
||||
editing.o: protos.h
|
||||
entities.o: cube.h platform.h tools.h geom.h model.h protocol.h sound.h
|
||||
entities.o: weapon.h entity.h world.h i18n.h command.h vote.h console.h
|
||||
entities.o: protos.h
|
||||
i18n.o: cube.h platform.h tools.h geom.h model.h protocol.h sound.h weapon.h
|
||||
i18n.o: entity.h world.h i18n.h command.h vote.h console.h protos.h
|
||||
log.o: cube.h platform.h tools.h geom.h model.h protocol.h sound.h weapon.h
|
||||
log.o: entity.h world.h i18n.h command.h vote.h console.h protos.h
|
||||
main.o: cube.h platform.h tools.h geom.h model.h protocol.h sound.h weapon.h
|
||||
main.o: entity.h world.h i18n.h command.h vote.h console.h protos.h
|
||||
menus.o: cube.h platform.h tools.h geom.h model.h protocol.h sound.h weapon.h
|
||||
menus.o: entity.h world.h i18n.h command.h vote.h console.h protos.h
|
||||
oggstream.o: cube.h platform.h tools.h geom.h model.h protocol.h sound.h
|
||||
oggstream.o: weapon.h entity.h world.h i18n.h command.h vote.h console.h
|
||||
oggstream.o: protos.h
|
||||
openal.o: cube.h platform.h tools.h geom.h model.h protocol.h sound.h
|
||||
openal.o: weapon.h entity.h world.h i18n.h command.h vote.h console.h
|
||||
openal.o: protos.h
|
||||
packetqueue.o: cube.h platform.h tools.h geom.h model.h protocol.h sound.h
|
||||
packetqueue.o: weapon.h entity.h world.h i18n.h command.h vote.h console.h
|
||||
packetqueue.o: protos.h
|
||||
physics.o: cube.h platform.h tools.h geom.h model.h protocol.h sound.h
|
||||
physics.o: weapon.h entity.h world.h i18n.h command.h vote.h console.h
|
||||
physics.o: protos.h
|
||||
protocol.o: cube.h platform.h tools.h geom.h model.h protocol.h sound.h
|
||||
protocol.o: weapon.h entity.h world.h i18n.h command.h vote.h console.h
|
||||
protocol.o: protos.h hash.h
|
||||
rendercubes.o: cube.h platform.h tools.h geom.h model.h protocol.h sound.h
|
||||
rendercubes.o: weapon.h entity.h world.h i18n.h command.h vote.h console.h
|
||||
rendercubes.o: protos.h
|
||||
rendergl.o: cube.h platform.h tools.h geom.h model.h protocol.h sound.h
|
||||
rendergl.o: weapon.h entity.h world.h i18n.h command.h vote.h console.h
|
||||
rendergl.o: protos.h bot/bot.h bot/bot_util.h bot/bot_waypoint.h bot/ac_bot.h
|
||||
renderhud.o: cube.h platform.h tools.h geom.h model.h protocol.h sound.h
|
||||
renderhud.o: weapon.h entity.h world.h i18n.h command.h vote.h console.h
|
||||
renderhud.o: protos.h
|
||||
rendermodel.o: cube.h platform.h tools.h geom.h model.h protocol.h sound.h
|
||||
rendermodel.o: weapon.h entity.h world.h i18n.h command.h vote.h console.h
|
||||
rendermodel.o: protos.h tristrip.h modelcache.h vertmodel.h md2.h md3.h
|
||||
renderparticles.o: cube.h platform.h tools.h geom.h model.h protocol.h
|
||||
renderparticles.o: sound.h weapon.h entity.h world.h i18n.h command.h vote.h
|
||||
renderparticles.o: console.h protos.h
|
||||
rendertext.o: cube.h platform.h tools.h geom.h model.h protocol.h sound.h
|
||||
rendertext.o: weapon.h entity.h world.h i18n.h command.h vote.h console.h
|
||||
rendertext.o: protos.h
|
||||
rndmap.o: cube.h platform.h tools.h geom.h model.h protocol.h sound.h
|
||||
rndmap.o: weapon.h entity.h world.h i18n.h command.h vote.h console.h
|
||||
rndmap.o: protos.h
|
||||
scoreboard.o: cube.h platform.h tools.h geom.h model.h protocol.h sound.h
|
||||
scoreboard.o: weapon.h entity.h world.h i18n.h command.h vote.h console.h
|
||||
scoreboard.o: protos.h
|
||||
server.o: cube.h platform.h tools.h geom.h model.h protocol.h sound.h
|
||||
server.o: weapon.h entity.h world.h i18n.h command.h vote.h console.h
|
||||
server.o: protos.h server.h servercontroller.h serverfiles.h serverevents.h
|
||||
server.o: serveractions.h
|
||||
serverbrowser.o: cube.h platform.h tools.h geom.h model.h protocol.h sound.h
|
||||
serverbrowser.o: weapon.h entity.h world.h i18n.h command.h vote.h console.h
|
||||
serverbrowser.o: protos.h
|
||||
serverms.o: cube.h platform.h tools.h geom.h model.h protocol.h sound.h
|
||||
serverms.o: weapon.h entity.h world.h i18n.h command.h vote.h console.h
|
||||
serverms.o: protos.h
|
||||
shadow.o: cube.h platform.h tools.h geom.h model.h protocol.h sound.h
|
||||
shadow.o: weapon.h entity.h world.h i18n.h command.h vote.h console.h
|
||||
shadow.o: protos.h
|
||||
sound.o: cube.h platform.h tools.h geom.h model.h protocol.h sound.h weapon.h
|
||||
sound.o: entity.h world.h i18n.h command.h vote.h console.h protos.h
|
||||
soundlocation.o: cube.h platform.h tools.h geom.h model.h protocol.h sound.h
|
||||
soundlocation.o: weapon.h entity.h world.h i18n.h command.h vote.h console.h
|
||||
soundlocation.o: protos.h
|
||||
soundscheduler.o: cube.h platform.h tools.h geom.h model.h protocol.h sound.h
|
||||
soundscheduler.o: weapon.h entity.h world.h i18n.h command.h vote.h console.h
|
||||
soundscheduler.o: protos.h
|
||||
texture.o: cube.h platform.h tools.h geom.h model.h protocol.h sound.h
|
||||
texture.o: weapon.h entity.h world.h i18n.h command.h vote.h console.h
|
||||
texture.o: protos.h scale.h
|
||||
tools.o: cube.h platform.h tools.h geom.h model.h protocol.h sound.h weapon.h
|
||||
tools.o: entity.h world.h i18n.h command.h vote.h console.h protos.h
|
||||
water.o: cube.h platform.h tools.h geom.h model.h protocol.h sound.h weapon.h
|
||||
water.o: entity.h world.h i18n.h command.h vote.h console.h protos.h
|
||||
weapon.o: cube.h platform.h tools.h geom.h model.h protocol.h sound.h
|
||||
weapon.o: weapon.h entity.h world.h i18n.h command.h vote.h console.h
|
||||
weapon.o: protos.h bot/bot.h bot/bot_util.h bot/bot_waypoint.h bot/ac_bot.h
|
||||
weapon.o: hudgun.h
|
||||
wizard.o: platform.h
|
||||
world.o: cube.h platform.h tools.h geom.h model.h protocol.h sound.h weapon.h
|
||||
world.o: entity.h world.h i18n.h command.h vote.h console.h protos.h
|
||||
world.o: bot/bot.h bot/bot_util.h bot/bot_waypoint.h bot/ac_bot.h
|
||||
worldio.o: cube.h platform.h tools.h geom.h model.h protocol.h sound.h
|
||||
worldio.o: weapon.h entity.h world.h i18n.h command.h vote.h console.h
|
||||
worldio.o: protos.h
|
||||
worldlight.o: cube.h platform.h tools.h geom.h model.h protocol.h sound.h
|
||||
worldlight.o: weapon.h entity.h world.h i18n.h command.h vote.h console.h
|
||||
worldlight.o: protos.h
|
||||
worldocull.o: cube.h platform.h tools.h geom.h model.h protocol.h sound.h
|
||||
worldocull.o: weapon.h entity.h world.h i18n.h command.h vote.h console.h
|
||||
worldocull.o: protos.h
|
||||
worldrender.o: cube.h platform.h tools.h geom.h model.h protocol.h sound.h
|
||||
worldrender.o: weapon.h entity.h world.h i18n.h command.h vote.h console.h
|
||||
worldrender.o: protos.h
|
||||
bot/bot.o: cube.h platform.h tools.h geom.h model.h protocol.h sound.h
|
||||
bot/bot.o: weapon.h entity.h world.h i18n.h command.h vote.h console.h
|
||||
bot/bot.o: protos.h bot/bot.h bot/bot_util.h bot/bot_waypoint.h bot/ac_bot.h
|
||||
bot/botmanager.o: cube.h platform.h tools.h geom.h model.h protocol.h sound.h
|
||||
bot/botmanager.o: weapon.h entity.h world.h i18n.h command.h vote.h console.h
|
||||
bot/botmanager.o: protos.h bot/bot.h bot/bot_util.h bot/bot_waypoint.h
|
||||
bot/botmanager.o: bot/ac_bot.h
|
||||
bot/bot_ai.o: cube.h platform.h tools.h geom.h model.h protocol.h sound.h
|
||||
bot/bot_ai.o: weapon.h entity.h world.h i18n.h command.h vote.h console.h
|
||||
bot/bot_ai.o: protos.h bot/bot.h bot/bot_util.h bot/bot_waypoint.h
|
||||
bot/bot_ai.o: bot/ac_bot.h
|
||||
bot/bot_util.o: cube.h platform.h tools.h geom.h model.h protocol.h sound.h
|
||||
bot/bot_util.o: weapon.h entity.h world.h i18n.h command.h vote.h console.h
|
||||
bot/bot_util.o: protos.h bot/bot.h bot/bot_util.h bot/bot_waypoint.h
|
||||
bot/bot_util.o: bot/ac_bot.h
|
||||
bot/bot_waypoint.o: cube.h platform.h tools.h geom.h model.h protocol.h
|
||||
bot/bot_waypoint.o: sound.h weapon.h entity.h world.h i18n.h command.h vote.h
|
||||
bot/bot_waypoint.o: console.h protos.h bot/bot.h bot/bot_util.h
|
||||
bot/bot_waypoint.o: bot/bot_waypoint.h bot/ac_bot.h
|
||||
bot/ac_bot.o: cube.h platform.h tools.h geom.h model.h protocol.h sound.h
|
||||
bot/ac_bot.o: weapon.h entity.h world.h i18n.h command.h vote.h console.h
|
||||
bot/ac_bot.o: protos.h bot/bot.h bot/bot_util.h bot/bot_waypoint.h
|
||||
bot/ac_bot.o: bot/ac_bot.h
|
||||
bot/ac_bot_ai.o: cube.h platform.h tools.h geom.h model.h protocol.h sound.h
|
||||
bot/ac_bot_ai.o: weapon.h entity.h world.h i18n.h command.h vote.h console.h
|
||||
bot/ac_bot_ai.o: protos.h bot/bot.h bot/bot_util.h bot/bot_waypoint.h
|
||||
bot/ac_bot_ai.o: bot/ac_bot.h
|
||||
|
||||
cube.h.gch: platform.h tools.h geom.h model.h protocol.h sound.h weapon.h
|
||||
cube.h.gch: entity.h world.h i18n.h command.h vote.h console.h protos.h
|
||||
|
||||
log-standalone.o: cube.h platform.h tools.h geom.h model.h protocol.h sound.h
|
||||
log-standalone.o: weapon.h entity.h world.h i18n.h command.h vote.h console.h
|
||||
log-standalone.o: protos.h
|
||||
serverms-standalone.o: cube.h platform.h tools.h geom.h model.h protocol.h
|
||||
serverms-standalone.o: sound.h weapon.h entity.h world.h i18n.h command.h
|
||||
serverms-standalone.o: vote.h console.h protos.h
|
||||
server-standalone.o: cube.h platform.h tools.h geom.h model.h protocol.h
|
||||
server-standalone.o: sound.h weapon.h entity.h world.h i18n.h command.h
|
||||
server-standalone.o: vote.h console.h protos.h server.h servercontroller.h
|
||||
server-standalone.o: serverfiles.h serverevents.h serveractions.h
|
||||
protocol-standalone.o: cube.h platform.h tools.h geom.h model.h protocol.h
|
||||
protocol-standalone.o: sound.h weapon.h entity.h world.h i18n.h command.h
|
||||
protocol-standalone.o: vote.h console.h protos.h hash.h
|
||||
tools-standalone.o: cube.h platform.h tools.h geom.h model.h protocol.h
|
||||
tools-standalone.o: sound.h weapon.h entity.h world.h i18n.h command.h vote.h
|
||||
tools-standalone.o: console.h protos.h
|
||||
wizard-standalone.o: platform.h
|
||||
|
||||
Reference in New Issue
Block a user