From 7482cfcffba0affc2e5721723bdf25d4ed45f62e Mon Sep 17 00:00:00 2001 From: "Alejandro V. Garcia" Date: Sat, 7 Nov 2009 23:04:54 +0000 Subject: [PATCH] Compile AC in Windows with a simple MinGW install TRUNK version using eihrul's libs git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@4715 e016b1c5-ed68-44aa-a2f7-31cac88cffde --- source/mingw/Makefile.mingw | 81 +++++++++++++++++++++++++++++++++++++ source/mingw/makeac.bat | 2 + 2 files changed, 83 insertions(+) create mode 100644 source/mingw/Makefile.mingw create mode 100644 source/mingw/makeac.bat diff --git a/source/mingw/Makefile.mingw b/source/mingw/Makefile.mingw new file mode 100644 index 00000000..3ae43981 --- /dev/null +++ b/source/mingw/Makefile.mingw @@ -0,0 +1,81 @@ +CXX=g++ +CXXOPTFLAGS=-O3 -Wall -fsigned-char -fomit-frame-pointer -mthreads +CXXFLAGS= $(CXXOPTFLAGS) -I../enet/include -I../include -I../src + +CLIENT_LIBS1=-L./lib -L../lib -lenet -llibvorbisfile -ljpeg -llibintl -lzdll -lOpenAL32 -lopengl32 +CLIENT_LIBS2=-lmingw32 -lSDLmain -lSDL -lSDL_image -lws2_32 -lwinmm +CLIENT_OBJS1= \ + ../src/client.o \ + ../src/clientgame.o \ + ../src/clients2c.o \ + ../src/command.o \ + ../src/console.o \ + ../src/docs.o \ + ../src/editing.o \ + ../src/entities.o \ + ../src/i18n.cpp \ + ../src/i18n.h \ + ../src/log.o \ + ../src/main.o \ + ../src/menus.o \ + ../src/packetqueue.o \ + ../src/physics.o \ + ../src/protocol.o \ + ../src/rendercubes.o \ + ../src/rendergl.o \ + ../src/renderhud.o \ + ../src/rendermodel.o \ + ../src/renderparticles.o \ + ../src/rendertext.o \ + ../src/rndmap.o \ + ../src/scoreboard.o \ + ../src/server.o \ + ../src/serverbrowser.o \ + ../src/serverms.o \ + ../src/shadow.o \ + ../src/sound.o \ + ../src/soundlocation.cpp \ + ../src/soundscheduler.cpp \ + ../src/oggstream.cpp \ + ../src/openal.cpp \ + ../src/audiomanager.o \ + ../src/texture.o \ + ../src/tools.o \ + ../src/water.o \ + ../src/weapon.o \ + ../src/wizard.o \ + ../src/world.o \ + ../src/worldio.o \ + ../src/worldlight.o \ + ../src/worldocull.o \ + ../src/worldrender.o \ + ../vcpp/SDL_win32_main.c +CLIENT_OBJS2= \ + ../src/bot/bot.o \ + ../src/bot/botmanager.o \ + ../src/bot/bot_ai.o \ + ../src/bot/bot_util.o \ + ../src/bot/bot_waypoint.o \ + ../src/bot/ac_bot.o \ + ../src/bot/ac_bot_ai.o + +SERVER_LIBS=-L./lib -L../lib -L../enet -lenet -llibintl -lzdll -lmingw32 -lSDLmain -lSDL -lws2_32 -lwinmm +SERVER_OBJS= \ + ../src/log.o \ + ../src/protocol.o \ + ../src/server.cpp \ + ../src/serverms.cpp \ + ../src/tools.cpp \ + ../src/wizard.o + +default: all + +all: client server + +client: $(CLIENT_OBJS1) $(CLIENT_OBJS2) + $(CXX) $(CXXFLAGS) -DWINDRES -o ../../bin_win32/ac_client.exe $(CLIENT_OBJS1) $(CLIENT_OBJS2) $(CLIENT_LIBS1) $(CLIENT_LIBS2) + strip ../../bin_win32/ac_client.exe + +server: $(SERVER_OBJS) + $(CXX) $(CXXFLAGS) -DSTANDALONE -o ../../bin_win32/ac_server.exe $(SERVER_OBJS) $(SERVER_LIBS) + strip ../../bin_win32/ac_server.exe diff --git a/source/mingw/makeac.bat b/source/mingw/makeac.bat new file mode 100644 index 00000000..d24e146d --- /dev/null +++ b/source/mingw/makeac.bat @@ -0,0 +1,2 @@ +mingw32-make client server -fMakefile.mingw +PAUSE