fixed makefile hack to get tests depending on libs
[libbear.git] / vars.mk
CommitLineData
3fc83b9f 1
7bbc50a4
PG
2T_OPTFLAGS := -O2
3T_DBGFLAGS := -ggdb
a98a33a6 4T_PRFFLAGS := ${T_DBGFLAGS} -pg
7bbc50a4 5T_WARFLAGS := -Wall -Wextra -pedantic -ansi
3fc83b9f 6
7bbc50a4 7G_CXXFLAGS := ${T_WARFLAGS}
9cc902bf 8ifeq (${BUILD},WIN32)
7bbc50a4 9 G_CXXFLAGS += ${T_OPTFLAGS}
9cc902bf
PG
10else
11ifeq (${BUILD},FINAL)
7bbc50a4 12 G_CXXFLAGS += ${T_OPTFLAGS}
9cc902bf 13else
7bbc50a4 14 G_CXXFLAGS += ${T_DBGFLAGS}
9cc902bf
PG
15endif
16endif
3fc83b9f 17
7bbc50a4
PG
18T_OPTFLAGS :=
19T_DBGFLAGS :=
20T_PRFFLAGS :=
21T_WARFLAGS :=
22
a98a33a6 23G_LNKFLAGS :=
7bbc50a4 24
3fc83b9f 25ifeq (${BUILD},WIN32)
7bbc50a4 26 G_CXX := mingw32-g++
3fc83b9f 27else
7bbc50a4 28 G_CXX := g++
3fc83b9f
PG
29endif
30
b6a453de
PG
31
32ifeq (${BUILD},WIN32)
33 G_LIBGL := -lopengl32 -lglu32
34 G_LIBSDL := `/usr/mingw32/bin/sdl-config --libs`
35else
36 G_LIBGL := -lGL -lGLU
37 G_LIBSDL := `sdl-config --libs`
38endif
39
40
3fc83b9f
PG
41ifeq (${BUILD},WIN32)
42 PRNTFMT := printf "%-12s: %s\n"
43else
44 PRNTFMT := printf "%-8s: %s\n"
45endif
46
47VERBOSE := 0
48
49ifeq (${VERBOSE},0)
50 # quiet the printf command
51 Q1 := @
52 # quiet the command that is `replaced' by an echo
53 Q2 := @
54else
55 # EAT the printf command as if it was not there
56 Q1 := @true # NOTE: the space between @true and the # is VERY important!!
57 # do not quiet the command output
58 Q2 :=
59endif
60
b6a453de
PG
61
62ifeq (${BUILD},WIN32)
63 prefix := /usr/mingw32
64else
65 prefix := /usr
66endif
67exec_prefix := ${prefix}
68includedir := ${prefix}/include
69libdir := ${exec_prefix}/lib
70INSTALL := install
71