Merge commit 'HEAD@{3}'

git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5347 4a71c877-e1ca-e34f-864e-861f7616d084
master
Dennis Schridde 2008-06-28 22:32:44 +00:00
parent fcd1455f44
commit 45f23a4926
27 changed files with 112 additions and 123 deletions

View File

@ -1,4 +1,4 @@
include $(top_srcdir)/makerules/configure.mk
include $(top_srcdir)/makerules/common.mk
# Hacks to build for compiling system, not for target
CC:=g++

View File

@ -1,4 +1,4 @@
include $(top_srcdir)/makerules/configure.mk
include $(top_srcdir)/makerules/common.mk
SUBDIRS=autorevision

View File

@ -1,4 +1,4 @@
include $(top_srcdir)/makerules/configure.mk
include $(top_srcdir)/makerules/common.mk
SUBDIRS=mods

View File

@ -1,4 +1,4 @@
include $(top_srcdir)/makerules/configure.mk
include $(top_srcdir)/makerules/common.mk
AIVOLUTIONLIST=multiplay commands.txt
GRIMLIST=components structs texpages wrf COPYING

View File

@ -1,4 +1,4 @@
include $(top_srcdir)/makerules/configure.mk
include $(top_srcdir)/makerules/common.mk
SUBDIRS=global

View File

@ -1,4 +1,4 @@
include $(top_srcdir)/makerules/configure.mk
include $(top_srcdir)/makerules/common.mk
SRC=dumpinfo.cpp \
exceptionhandler.c \

View File

@ -1,4 +1,4 @@
include $(top_srcdir)/makerules/configure.mk
include $(top_srcdir)/makerules/common.mk
SRC=configfile.c \
cursors.c \

View File

@ -1,4 +1,4 @@
include $(top_srcdir)/makerules/configure.mk
include $(top_srcdir)/makerules/common.mk
SRC=anim.c \
animobj.c \

View File

@ -1,4 +1,4 @@
include $(top_srcdir)/makerules/configure.mk
include $(top_srcdir)/makerules/common.mk
SRC=bitimage.c \
imd.c \

View File

@ -1,4 +1,4 @@
include $(top_srcdir)/makerules/configure.mk
include $(top_srcdir)/makerules/common.mk
SRC=GLee.c \
ivi.c \

View File

@ -1,4 +1,4 @@
include $(top_srcdir)/makerules/configure.mk
include $(top_srcdir)/makerules/common.mk
SUBDIRS=framework \
exceptionhandler \

View File

@ -1,4 +1,4 @@
include $(top_srcdir)/makerules/configure.mk
include $(top_srcdir)/makerules/common.mk
SRC=netjoin_stub.c \
netlog.c \

View File

@ -1,4 +1,4 @@
include $(top_srcdir)/makerules/configure.mk
include $(top_srcdir)/makerules/common.mk
SRC=codeprint.c \
event.c \

View File

@ -1,4 +1,4 @@
include $(top_srcdir)/makerules/configure.mk
include $(top_srcdir)/makerules/common.mk
SRC=sequence.c

View File

@ -1,4 +1,4 @@
include $(top_srcdir)/makerules/configure.mk
include $(top_srcdir)/makerules/common.mk
SRC=audio.c \
audio_id.c \

View File

@ -1,4 +1,4 @@
include $(top_srcdir)/makerules/configure.mk
include $(top_srcdir)/makerules/common.mk
SRC=physfs_vfs.c sqlite3.c

View File

@ -1,4 +1,4 @@
include $(top_srcdir)/makerules/configure.mk
include $(top_srcdir)/makerules/common.mk
SRC=bar.c \
button.c \

View File

@ -3,7 +3,7 @@ SUBDIRS=build_tools po win32 lib src data pkg
top_srcdir=.
top_builddir=.
include $(top_srcdir)/makerules/configure.mk
include $(top_srcdir)/makerules/common.mk
include $(top_srcdir)/makerules/submake.mk
src: build_tools win32 lib

View File

@ -1,11 +1,17 @@
ifeq ($(MAKELEVEL),0)
include $(top_srcdir)/makerules/configure.mk
endif
RM_CPPFLAGS:=-I$(top_srcdir)
%.o: %.rc
$(WINDRES) $(CPPFLAGS) -o $(subst /,$(DIRSEP),$@) $(subst /,$(DIRSEP),$<)
$(WINDRES) $(RM_CPPFLAGS) $(CPPFLAGS) -o $(subst /,$(DIRSEP),$@) $(subst /,$(DIRSEP),$<)
%.o: %.c
$(CC) $(CPPFLAGS) $(CFLAGS) -c -o $(subst /,$(DIRSEP),$@) $(subst /,$(DIRSEP),$<)
$(CC) $(RM_CPPFLAGS) $(CPPFLAGS) $(CFLAGS) -c -o $(subst /,$(DIRSEP),$@) $(subst /,$(DIRSEP),$<)
%.o: %.cpp
$(CXX) $(CPPFLAGS) $(CXXFLAGS) -c -o $(subst /,$(DIRSEP),$@) $(subst /,$(DIRSEP),$<)
$(CXX) $(RM_CPPFLAGS) $(CPPFLAGS) $(CXXFLAGS) -c -o $(subst /,$(DIRSEP),$@) $(subst /,$(DIRSEP),$<)
%.lex.h %.lex.c: %.l
$(FLEX) $(FLEXFLAGS) -o $(subst /,$(DIRSEP),$@) $(subst /,$(DIRSEP),$<)

View File

@ -5,10 +5,13 @@ PACKAGE_VERSION:=TRUNK
PACKAGE_BUGREPORT:=http://wz2100.net/
INSTALLER_VERSION:=9.9.9.9
# Platform you are running
#PLATFORM:=windows
#PLATFORM:=linux
#PLATFORM:=mingw32
# Platform used to build Warzone 2100
#BUILD:=windows
#BUILD:=linux
# Platform Warzone 2100 shall run on
#TARGET:=windows
#TARGET:=linux
# Compilation mode
#MODE:=debug
@ -17,24 +20,12 @@ INSTALLER_VERSION:=9.9.9.9
# Directory where you store your dev stuff (lib and include)
#DEVDIR:=C:/devpkg
# Remind the user to install Flex and Bison
#BISON:=bison
#FLEX:=flex
## This is only needed for people planning to distribute this package and/or
## create installers from it.
# Path to makensis
#MAKENSIS:="wine C:/Program\ Files/NSIS/makensis.exe"
#MAKENSIS:=makensis
# Whether to build data package and installer
#DATA:=yes
#INSTALLER:=yes
#USE_GETTEXT:=yes
#TRANSLATION:=yes
# Gettext stuff
#PACKAGE:=warzone2100
#LOCALEDIR:=""
#XGETTEXT:="xgettext"
#MSGMERGE:="msgmerge"
#MSGFMT:="msgfmt"
# Make config known throughout the whole buildsystem
export PACKAGE PACKAGE_NAME PACKAGE_VERSION PACKAGE_BUGREPORT
export BUILD TARGET MODE DEVDIR
export DATA INSTALLER TRANSLATION

View File

@ -3,8 +3,6 @@ include $(top_builddir)/config.mk
# Check for unset config
ifeq ($(MAKELEVEL),0)
$(info Checking config...)
ifeq ($(strip $(PACKAGE)),)
@ -31,10 +29,16 @@ else
$(info PACKAGE_BUGREPORT := $(PACKAGE_BUGREPORT))
endif
ifeq ($(strip $(PLATFORM)),)
$(error You must set PLATFORM in $(top_srcdir)/makerules/config.mk)
ifeq ($(strip $(BUILD)),)
$(error You must set BUILD in $(top_srcdir)/makerules/config.mk)
else
$(info PLATFORM := $(PLATFORM))
$(info BUILD := $(BUILD))
endif
ifeq ($(strip $(TARGET)),)
$(error You must set TARGET in $(top_srcdir)/makerules/config.mk)
else
$(info TARGET := $(TARGET))
endif
ifeq ($(strip $(MODE)),)
@ -49,119 +53,107 @@ else
$(info DEVDIR := $(DEVDIR))
endif
ifeq ($(strip $(BISON)),)
$(error You must set BISON in $(top_srcdir)/makerules/config.mk)
else
$(info BISON := $(BISON))
endif
ifeq ($(strip $(FLEX)),)
$(error You must set FLEX in $(top_srcdir)/makerules/config.mk)
else
$(info FLEX := $(FLEX))
endif
ifneq ($(strip $(INSTALLER)),)
ifeq ($(strip $(MAKENSIS)),)
$(error You must set MAKENSIS in $(top_srcdir)/makerules/config.mk)
else
$(info MAKENSIS is := $(MAKENSIS))
endif
endif
$(info Config seems valid.)
endif
# Setup paths and static values
CPPFLAGS+=-DPACKAGE=\"$(PACKAGE)\" -DPACKAGE_VERSION=\"$(PACKAGE_VERSION)\" -DYY_STATIC -I$(top_srcdir) -I$(DEVDIR)/include/SDL -I$(DEVDIR)/include/libpng12 -I$(DEVDIR)/include/bfd -I$(DEVDIR)/include
CFLAGS+=-std=gnu99
CXXFLAGS+=
LDFLAGS+=-L$(DEVDIR)/lib
WZ_CPPFLAGS:=-DPACKAGE=\"$(PACKAGE)\" -DPACKAGE_VERSION=\"$(PACKAGE_VERSION)\" -DYY_STATIC -I$(DEVDIR)/include/SDL -I$(DEVDIR)/include/libpng12 -I$(DEVDIR)/include/bfd -I$(DEVDIR)/include
WZ_CFLAGS:=-std=gnu99
WZ_CXXFLAGS:=
WZ_LDFLAGS:=-L$(DEVDIR)/lib
# Setup build environment with config values
ifeq ($(strip $(MODE)),debug)
CPPFLAGS+=-DDEBUG
CFLAGS+=-g -O0 -Wall -Werror-implicit-function-declaration
CXXFLAGS+=-g -O0 -Wall -Werror-implicit-function-declaration
WZ_CPPFLAGS+=-DDEBUG
WZ_CFLAGS+=-g -O0 -Wall -Werror-implicit-function-declaration
WZ_CXXFLAGS+=-g -O0 -Wall -Werror-implicit-function-declaration
else
CPPFLAGS+=-DNDEBUG
WZ_CPPFLAGS+=-DNDEBUG
endif
ifneq ($(strip $(USE_GETTEXT)),)
CPPFLAGS+=-DENABLE_NLS=1
ifneq ($(LOCALEDIR),)
CPPFLAGS+=-DLOCALEDIR=$(LOCALEDIR)
endif
ifneq ($(strip $(TRANSLATION)),)
WZ_CPPFLAGS+=-DENABLE_NLS=1
endif
ifeq ($(strip $(PLATFORM)),windows)
ifeq ($(strip $(BUILD)),windows)
DIRSEP:=\\
MV:=move
RM_F:=del /F
RMDIR:=rmdir
MKDIR_P:=mkdir
EXEEXT:=.exe
AR:=ar
CC:=gcc
CXX:=g++
WINDRES:=windres
CPPFLAGS+=-DWIN32
CFLAGS+=-mwindows
CXXFLAGS+=-mwindows
LDFLAGS+=-lmingw32 -lSDLmain
XGETTEXT:=xgettext
MSGMERGE:=msgmerge
MSGFMT:=msgfmt
FLEX:=flex
BISON:=bison
MAKENSIS:=makensis
else
ifeq ($(strip $(PLATFORM)),mingw32)
DIRSEP:=/
MV:=mv
RM_F:=rm -f
RMDIR:=rmdir
MKDIR_P:=mkdir -p
XGETTEXT:=xgettext
MSGMERGE:=msgmerge
MSGFMT:=msgfmt
FLEX:=flex
BISON:=bison
MAKENSIS:=makensis
endif
ifeq ($(strip $(TARGET)),windows)
EXEEXT:=.exe
AR:=mingw32-ar
CC:=mingw32-gcc
CXX:=mingw32-g++
WINDRES:=mingw32-windres
CPPFLAGS+=-DWIN32
CFLAGS+=-mwindows
CXXFLAGS+=-mwindows
LDFLAGS+=-lmingw32 -lSDLmain
WZ_CPPFLAGS+=-DWIN32
WZ_CFLAGS+=-mwindows
WZ_CXXFLAGS+=-mwindows
WZ_LDFLAGS+=-lmingw32 -lSDLmain
else
DIRSEP:=/
MV:=mv
RM_F:=rm -f
RMDIR:=rmdir
MKDIR_P:=mkdir -p
EXEEXT:=
AR:=ar
CC:=gcc
CXX:=g++
WINDRES:=
endif
endif
# Generic libs
LDFLAGS+=-lSDL -lSDL_net -lpng12 -lphysfs -lz -lvorbisfile -lvorbis -logg -lpopt -lintl
WZ_LDFLAGS+=-lSDL -lSDL_net -lpng12 -lphysfs -lz -lvorbisfile -lvorbis -logg -lpopt -lintl
# Additional platform-dependend libs
ifeq ($(strip $(PLATFORM)),windows)
LDFLAGS+=-lGLC -lglu32 -lopengl32 -lopenal32 -ldbghelp -lshfolder -lwinmm -lwsock32 -lbfd -liberty
# Additional target-platform-dependend libs
ifeq ($(strip $(TARGET)),windows)
WZ_LDFLAGS+=-lGLC -lglu32 -lopengl32 -lopenal32 -ldbghelp -lshfolder -lwinmm -lwsock32 -lbfd -liberty
else
ifeq ($(strip $(PLATFORM)),mingw32)
LDFLAGS+=-lGLC -lglu32 -lopengl32 -lopenal32 -ldbghelp -lshfolder -lwinmm -lwsock32 -lbfd -liberty
else
LDFLAGS+=-lGLC -lGLU -lGL -lopenal
endif
WZ_LDFLAGS+=-lGLC -lGLU -lGL -lopenal
endif
# Additionaly link against the deps of our deps
LDFLAGS+=-liconv -lz -lfreetype -lfontconfig -lexpat
WZ_LDFLAGS+=-liconv -lz -lfreetype -lfontconfig -lexpat
include $(top_srcdir)/makerules/common.mk
# Import environment variables
CPPFLAGS:=$(WZ_CPPFLAGS) $(CPPFLAGS)
CFLAGS:=$(WZ_CFLAGS) $(CFLAGS)
CXXFLAGS:=$(WZ_CXXFLAGS) $(CXXFLAGS)
LDFLAGS:=$(WZ_LDFLAGS) $(LDFLAGS)
# Export to environment
export DIRSEP MV RM_F RMDIR MKDIR_P
export XGETTEXT MSGMERGE MSGFMT
export FLEX BISON MAKENSIS
export EXEEXT AR CC CXX WINDRES
export CPPFLAGS CFLAGS CXXFLAGS LDFLAGS

View File

@ -1,4 +1,4 @@
include $(top_srcdir)/makerules/configure.mk
include $(top_srcdir)/makerules/common.mk
SUBDIRS=nsis

View File

@ -1,4 +1,4 @@
include $(top_srcdir)/makerules/configure.mk
include $(top_srcdir)/makerules/common.mk
SETUPFILE=$(PACKAGE)-$(PACKAGE_VERSION).exe

View File

@ -1,4 +1,4 @@
include $(top_srcdir)/makerules/configure.mk
include $(top_srcdir)/makerules/common.mk
include Makevars
@ -17,7 +17,7 @@ mo-files: $(MO_FILES)
update-po: clean all
$(DOMAIN).pot: POTFILES.in
$(XGETTEXT) $(XGETTEXT_OPTIONS) --default-domain=$(DOMAIN) --copyright-holder=$(COPYRIGHT_HOLDER) --msgid-bugs-address=$(MSGID_BUGS_ADDRESS) --directory=$(top_builddir) --add-comments=TRANSLATORS: --files-from=$<
$(XGETTEXT) $(XGETTEXT_OPTIONS) --default-domain="$(DOMAIN)" --copyright-holder="$(COPYRIGHT_HOLDER)" --msgid-bugs-address="$(MSGID_BUGS_ADDRESS)" --directory="$(top_builddir)" --add-comments=TRANSLATORS: --files-from=$<
mv $(DOMAIN).po $@
%.po: $(DOMAIN).pot

View File

@ -1,4 +1,4 @@
include $(top_srcdir)/makerules/configure.mk
include $(top_srcdir)/makerules/common.mk
SRC=ai.c \
aiexperience.c \
@ -118,7 +118,7 @@ LIBS=$(top_builddir)/lib/libgamelib.a \
$(top_builddir)/lib/libexceptionhandler.a \
$(top_builddir)/lib/libsqlite3.a
ifeq ($(strip $(PLATFORM)),windows)
ifeq ($(strip $(TARGET)),windows)
LIBS += $(top_builddir)/win32/warzone2100.o
endif

View File

@ -14,7 +14,7 @@
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
include $(top_srcdir)/makerules/configure.mk
include $(top_srcdir)/makerules/common.mk
OBJS=main.o lobby/read_write_mutex.o networking/tcp_server.o lobby/lobby.o lobby/game.o lobby/raii_counter.o lobby/lobby_iterator.o lobby/lobby_gamelock.o requesthandler.o networking/nattester.o

View File

@ -1,6 +1,6 @@
include $(top_srcdir)/makerules/configure.mk
include $(top_srcdir)/makerules/common.mk
ifeq ($(strip $(PLATFORM)),windows)
ifeq ($(strip $(TARGET)),windows)
all: warzone2100.o
endif