2006-07-21 14:48:55 -07:00
|
|
|
include $(MAKERULES)/config.mk
|
|
|
|
|
|
|
|
|
|
|
|
# Check for unset config
|
|
|
|
|
2006-08-25 15:27:26 -07:00
|
|
|
ifeq ($(strip $(VERSION)),)
|
|
|
|
$(error You must set VERSION in $(MAKERULES)/config.mk)
|
|
|
|
else
|
|
|
|
$(info VERSION set to $(VERSION))
|
|
|
|
endif
|
|
|
|
|
2006-07-21 14:48:55 -07:00
|
|
|
ifeq ($(strip $(PLATFORM)),)
|
|
|
|
$(error You must set PLATFORM in $(MAKERULES)/config.mk)
|
|
|
|
else
|
|
|
|
$(info PLATFORM set to $(PLATFORM))
|
|
|
|
endif
|
|
|
|
|
|
|
|
ifeq ($(strip $(COMPILER)),)
|
|
|
|
$(error You must set COMPILER in $(MAKERULES)/config.mk)
|
|
|
|
else
|
|
|
|
$(info COMPILER set to $(COMPILER))
|
|
|
|
endif
|
|
|
|
|
|
|
|
ifeq ($(strip $(MODE)),)
|
|
|
|
$(error You must set MODE in $(MAKERULES)/config.mk)
|
|
|
|
else
|
|
|
|
$(info MODE set to $(MODE))
|
|
|
|
endif
|
|
|
|
|
|
|
|
ifeq ($(strip $(DEVDIR)),)
|
|
|
|
$(error You must set DEVDIR in $(MAKERULES)/config.mk)
|
|
|
|
else
|
|
|
|
$(info DEVDIR set to $(DEVDIR))
|
|
|
|
endif
|
|
|
|
|
|
|
|
ifeq ($(strip $(BISON)),)
|
2006-07-21 14:58:57 -07:00
|
|
|
$(error You must set BISON in $(MAKERULES)/config.mk)
|
2006-07-21 14:48:55 -07:00
|
|
|
else
|
2006-07-21 14:58:57 -07:00
|
|
|
$(info BISON is set to $(BISON))
|
2006-07-21 14:48:55 -07:00
|
|
|
endif
|
|
|
|
|
|
|
|
ifeq ($(strip $(FLEX)),)
|
2006-07-21 14:58:57 -07:00
|
|
|
$(error You must set FLEX in $(MAKERULES)/config.mk)
|
2006-07-21 14:48:55 -07:00
|
|
|
else
|
2006-07-21 14:58:57 -07:00
|
|
|
$(info FLEX is set to $(FLEX))
|
2006-07-21 14:48:55 -07:00
|
|
|
endif
|
|
|
|
|
|
|
|
|
|
|
|
# Setup paths and static values
|
|
|
|
|
2006-08-25 15:27:26 -07:00
|
|
|
CFLAGS+=-m32 -DVERSION=$(VERSION) -DYY_STATIC -I.. -I../.. -I$(DEVDIR)/include
|
2006-07-21 14:48:55 -07:00
|
|
|
LDFLAGS+=-L$(DEVDIR)/lib
|
|
|
|
|
|
|
|
|
|
|
|
# Setup build environment with config values
|
|
|
|
|
|
|
|
ifeq ($(strip $(COMPILER)),g++)
|
|
|
|
CC=g++
|
|
|
|
CFLAGS+=-fpermissive
|
|
|
|
else
|
|
|
|
CC=gcc
|
|
|
|
endif
|
|
|
|
|
|
|
|
ifeq ($(strip $(MODE)),debug)
|
|
|
|
CFLAGS+=-Wall -O0 -g3 -DDEBUG
|
|
|
|
else
|
2006-08-19 15:24:07 -07:00
|
|
|
CFLAGS+=-march=i686 -Os -DNDEBUG
|
2006-08-04 07:59:36 -07:00
|
|
|
LDFLAGS+=-Wl,-S
|
|
|
|
endif
|
|
|
|
|
|
|
|
ifeq ($(strip $(PLATFORM)),windows)
|
|
|
|
DIRSEP=\\
|
|
|
|
RMF=del /F
|
2006-08-29 09:15:11 -07:00
|
|
|
EXEEXT=.exe
|
2006-08-04 07:59:36 -07:00
|
|
|
WINDRES=windres
|
|
|
|
CFLAGS+=-mwindows -DWIN32
|
|
|
|
LDFLAGS+=-lmingw32 -lglu32 -lopengl32 -lopenal32 -ljpeg6b -lpng13
|
|
|
|
else
|
|
|
|
DIRSEP=/
|
|
|
|
RMF=rm -f
|
2006-08-29 09:15:11 -07:00
|
|
|
EXEEXT=
|
|
|
|
WINDRES=
|
2006-08-04 07:59:36 -07:00
|
|
|
LDFLAGS+=-lGLU -lGL -lopenal -ljpeg -lpng
|
2006-07-21 14:48:55 -07:00
|
|
|
endif
|
|
|
|
|
2006-07-31 10:57:06 -07:00
|
|
|
LDFLAGS+=-lmad -lvorbisfile -lvorbis -logg -lphysfs -lSDLmain -lSDL -lSDL_net
|
2006-07-21 14:48:55 -07:00
|
|
|
|
|
|
|
include $(MAKERULES)/common.mk
|