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
38 G_CXXFLAGS := ${T_WARFLAGS}
39 ifeq (${G_BUILD},${B_DEBUG})
40 G_CXXFLAGS += ${T_DBGFLAGS}
42 ifeq (${G_BUILD},${B_FINAL})
43 G_CXXFLAGS += ${T_OPTFLAGS}
45 ifeq (${G_BUILD},${B_WIN32})
46 G_CXXFLAGS += ${T_OPTFLAGS}
48 $(error 'G_BUILD = ${G_BUILD}' is invalid.)
60 ifeq (${G_BUILD},${B_WIN32})
66 ifeq (${G_BUILD},${B_WIN32})
67 G_LIBGL := -lopengl32 -lglu32
68 G_LIBSDL := `/usr/mingw32/bin/sdl-config --libs`
71 G_LIBSDL := `sdl-config --libs`
77 ifeq (${G_BUILD},${B_DEBUG})
81 ifeq (${G_BUILD},${B_FINAL})
85 ifeq (${G_BUILD},${B_WIN32})
86 G_OBJSDIR := objs-mingw32/
87 G_BINDIR := bin-mingw32/
89 $(error 'G_BUILD = ${G_BUILD}' is invalid.)
96 $(shell rm -f ${LOGFILE}) # remove the log file from last run
98 ifeq (${G_BUILD},${B_WIN32})
99 PRNTFMT := printf "%-12s: %s\n"
100 PRNTLOG := printf "\n\#\# %-12s: %s\n"
102 PRNTFMT := printf "%-8s: %s\n"
103 PRNTLOG := printf "\n\#\# %-8s: %s\n"
109 # log the printf command
112 # quiet the printf command
116 Q3s := @echo # NOTE: the space between @echo and the # is VERY important!!
122 # EAT the logging printf command
123 Q1s := @true # NOTE: the space between @true and the # is VERY important!!
125 # EAT the quiet printf command
126 Q2s := @true # NOTE: the space between @true and the # is VERY important!!
128 # EAT the logging command
129 Q3s := @true # NOTE: the space between @true and the # is VERY important!!
131 # do not quiet the command
137 ifeq (${G_BUILD},${B_WIN32})
138 prefix := /usr/mingw32
142 exec_prefix := ${prefix}
143 includedir := ${prefix}/include
144 libdir := ${exec_prefix}/lib