2 # cause the fancy $${@D} directory rules to work out
9 # set this on the command line to get a WIN32 or a FINAL build
12 ifeq (${G_BUILD},${B_DEBUG})
14 ifeq (${G_BUILD},${B_FINAL})
16 ifeq (${G_BUILD},${B_WIN32})
18 $(error 'G_BUILD = ${G_BUILD}' is invalid. Valid types are '${B_DEBUG}', '${B_FINAL}' or '${B_WIN32}')
26 T_PRFFLAGS := ${T_DBGFLAGS} -pg
31 T_WARFLAGS += -pedantic
33 T_WARFLAGS += -Wshadow
34 T_WARFLAGS += -Wswitch-enum
35 T_WARFLAGS += -Wfloat-equal
37 T_WARFLAGS += -Wswitch-enum
39 G_CXXFLAGS := ${T_WARFLAGS}
40 ifeq (${G_BUILD},${B_DEBUG})
41 G_CXXFLAGS += ${T_DBGFLAGS}
43 ifeq (${G_BUILD},${B_FINAL})
44 G_CXXFLAGS += ${T_OPTFLAGS}
46 ifeq (${G_BUILD},${B_WIN32})
47 G_CXXFLAGS += ${T_OPTFLAGS}
49 $(error 'G_BUILD = ${G_BUILD}' is invalid.)
61 ifeq (${G_BUILD},${B_WIN32})
67 ifeq (${G_BUILD},${B_WIN32})
68 G_LIBGL := -lopengl32 -lglu32
69 G_LIBSDL := `/usr/mingw32/bin/sdl-config --libs`
72 G_LIBSDL := `sdl-config --libs`
78 ifeq (${G_BUILD},${B_DEBUG})
82 ifeq (${G_BUILD},${B_FINAL})
86 ifeq (${G_BUILD},${B_WIN32})
87 G_OBJSDIR := objs-mingw32/
88 G_BINDIR := bin-mingw32/
90 $(error 'G_BUILD = ${G_BUILD}' is invalid.)
97 $(shell rm -f ${LOGFILE}) # remove the log file from last run
99 ifeq (${G_BUILD},${B_WIN32})
100 PRNTFMT := printf "%-12s: %s\n"
101 PRNTLOG := printf "\n\#\# %-12s: %s\n"
103 PRNTFMT := printf "%-8s: %s\n"
104 PRNTLOG := printf "\n\#\# %-8s: %s\n"
110 # log the printf command
113 # quiet the printf command
117 Q3s := @echo # NOTE: the space between @echo and the # is VERY important!!
123 # EAT the logging printf command
124 Q1s := @true # NOTE: the space between @true and the # is VERY important!!
126 # EAT the quiet printf command
127 Q2s := @true # NOTE: the space between @true and the # is VERY important!!
129 # EAT the logging command
130 Q3s := @true # NOTE: the space between @true and the # is VERY important!!
132 # do not quiet the command
138 ifeq (${G_BUILD},${B_WIN32})
139 prefix := /usr/mingw32
143 exec_prefix := ${prefix}
144 includedir := ${prefix}/include
145 libdir := ${exec_prefix}/lib