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
27 T_WARFLAGS := -Wall -Wextra -pedantic -ansi
29 G_CXXFLAGS := ${T_WARFLAGS}
30 ifeq (${G_BUILD},${B_DEBUG})
31 G_CXXFLAGS += ${T_DBGFLAGS}
33 ifeq (${G_BUILD},${B_FINAL})
34 G_CXXFLAGS += ${T_OPTFLAGS}
36 ifeq (${G_BUILD},${B_WIN32})
37 G_CXXFLAGS += ${T_OPTFLAGS}
39 $(error 'G_BUILD = ${G_BUILD}' is invalid.)
51 ifeq (${G_BUILD},${B_WIN32})
57 ifeq (${G_BUILD},${B_WIN32})
58 G_LIBGL := -lopengl32 -lglu32
59 G_LIBSDL := `/usr/mingw32/bin/sdl-config --libs`
62 G_LIBSDL := `sdl-config --libs`
68 ifeq (${G_BUILD},${B_DEBUG})
72 ifeq (${G_BUILD},${B_FINAL})
76 ifeq (${G_BUILD},${B_WIN32})
77 G_OBJSDIR := objs-mingw32/
78 G_BINDIR := bin-mingw32/
80 $(error 'G_BUILD = ${G_BUILD}' is invalid.)
87 $(shell rm -f ${LOGFILE}) # remove the log file from last run
89 ifeq (${G_BUILD},${B_WIN32})
90 PRNTFMT := printf "%-12s: %s\n"
91 PRNTLOG := printf "\n\#\# %-12s: %s\n"
93 PRNTFMT := printf "%-8s: %s\n"
94 PRNTLOG := printf "\n\#\# %-8s: %s\n"
100 # log the printf command
103 # quiet the printf command
107 Q3s := @echo # NOTE: the space between @echo and the # is VERY important!!
113 # EAT the logging printf command
114 Q1s := @true # NOTE: the space between @true and the # is VERY important!!
116 # EAT the quiet printf command
117 Q2s := @true # NOTE: the space between @true and the # is VERY important!!
119 # EAT the logging command
120 Q3s := @true # NOTE: the space between @true and the # is VERY important!!
122 # do not quiet the command
128 ifeq (${G_BUILD},${B_WIN32})
129 prefix := /usr/mingw32
133 exec_prefix := ${prefix}
134 includedir := ${prefix}/include
135 libdir := ${exec_prefix}/lib