-# set this on the command line to 1 to get a windows 32 build
-WIN32 := 0
+# set this on the command line to get a WIN32 or a FINAL build
+BUILD := DEBUG
-# set this on the command line to 1 to get a final (none debug) build
-FINAL := 0
-
-ifeq (${WIN32},1)
+ifeq (${BUILD},WIN32)
LIBGL := -lopengl32 -lglu32
LIBSDL := `/usr/mingw32/bin/sdl-config --libs`
else
VALFLAGS := --leak-check=full
LNKFLAGS := -Wl,-rpath,${RPATH}
-ifeq (${WIN32},1)
- CXXFLAGS := ${OPTFLAGS}
+ifeq (${BUILD},WIN32)
+ CXXFLAGS := ${MYFLAGS} ${OPTFLAGS}
else
-ifeq (${FINAL},1)
- CXXFLAGS := ${OPTFLAGS}
+ifeq (${BUILD},FINAL)
+ CXXFLAGS := ${MYFLAGS} ${OPTFLAGS}
else
CXXFLAGS := ${MYFLAGS} ${DBGFLAGS}
endif
endif
-ifeq (${WIN32},1)
+ifeq (${BUILD},WIN32)
CXX := mingw32-g++
else
CXX := g++
SRCSDIR := src/
SRCS := # := start
-ifeq (${WIN32},1)
+ifeq (${BUILD},WIN32)
OBJSDIR := objs-mingw32/
else
-ifeq (${FINAL},1)
+ifeq (${BUILD},FINAL)
OBJSDIR := objs/
else
OBJSDIR := objsd/
DIRMK := dir.mk
include ${SRCSDIR}${DIRMK}
-ifeq (${WIN32},1)
+ifeq (${BUILD},WIN32)
WORKINGDIR := bin-mingw32/
else
-ifeq (${FINAL},1)
+ifeq (${BUILD},FINAL)
WORKINGDIR := bin/
else
WORKINGDIR := bind/
LIBSDIRNAME := libs/
SRCLIBSDIR := ${LIBSDIRNAME}
-ifeq (${WIN32},1)
+ifeq (${BUILD},WIN32)
DSTLIBSDIR := ${WORKINGDIR}
else
DSTLIBSDIR := ${WORKINGDIR}${LIBSDIRNAME}
LIBSTXT := $(addprefix ${DSTLIBSDIR},${LIBSTXT})
LIBSCPY := # := start
-ifeq (${WIN32},1)
+ifeq (${BUILD},WIN32)
LIBSCPY += SDL.dll
LIBSCPY += pg.dll
else
TXT += COPYING
TXT := $(addprefix ${DSTTXTDIR},${TXT})
-ifeq (${WIN32},1)
+ifeq (${BUILD},WIN32)
TARGETNAME := run_physics.exe
else
TARGETNAME := run_physics
INCFLAGS := $(addprefix -I, ${INCDIRS})
-ifeq (${WIN32},1)
+ifeq (${BUILD},WIN32)
PRNTFMT := printf "%-12s: %s\n"
else
PRNTFMT := printf "%-8s: %s\n"