make: created global directory names
[libbear.git] / vars.mk
1
2 T_OPTFLAGS := -O2
3 T_DBGFLAGS := -ggdb
4 T_PRFFLAGS := ${T_DBGFLAGS} -pg
5 T_WARFLAGS := -Wall -Wextra -pedantic -ansi
6
7 G_CXXFLAGS := ${T_WARFLAGS}
8 ifeq (${BUILD},WIN32)
9     G_CXXFLAGS    += ${T_OPTFLAGS}
10 else
11 ifeq (${BUILD},FINAL)
12     G_CXXFLAGS    += ${T_OPTFLAGS}
13 else
14     G_CXXFLAGS    += ${T_DBGFLAGS}
15 endif
16 endif
17
18 T_OPTFLAGS :=
19 T_DBGFLAGS :=
20 T_PRFFLAGS :=
21 T_WARFLAGS :=
22
23 G_LNKFLAGS :=
24
25 ifeq (${BUILD},WIN32)
26     G_CXX := mingw32-g++
27 else
28     G_CXX := g++
29 endif
30
31
32 ifeq (${BUILD},WIN32)
33     G_LIBGL   := -lopengl32 -lglu32
34     G_LIBSDL  := `/usr/mingw32/bin/sdl-config --libs`
35 else
36     G_LIBGL   := -lGL -lGLU
37     G_LIBSDL  := `sdl-config --libs`
38 endif
39
40 G_SRCSDIR := src/
41 G_DEPSDIR := deps/
42
43 ifeq (${BUILD},WIN32)
44     G_OBJSDIR := objs-mingw32/
45     G_BINDIR  := bin-mingw32/
46 else
47 ifeq (${BUILD},FINAL)
48     G_OBJSDIR := objs/
49     G_BINDIR  := bin/
50 else
51     G_OBJSDIR := objsd/
52     G_BINDIR  := bind/
53 endif
54 endif
55
56
57 ifeq (${BUILD},WIN32)
58     PRNTFMT := printf "%-12s: %s\n"
59 else
60     PRNTFMT := printf "%-8s: %s\n"
61 endif
62
63 VERBOSE := 0
64
65 ifeq (${VERBOSE},0)
66     # quiet the printf command
67     Q1 := @
68     # quiet the command that is `replaced' by an echo
69     Q2 := @
70 else
71     # EAT the printf command as if it was not there
72     Q1 := @true # NOTE: the space between @true and the # is VERY important!!
73     # do not quiet the command output
74     Q2 :=
75 endif
76
77
78 ifeq (${BUILD},WIN32)
79     prefix      := /usr/mingw32
80 else
81     prefix      := /usr
82 endif
83 exec_prefix := ${prefix}
84 includedir  := ${prefix}/include
85 libdir      := ${exec_prefix}/lib
86 INSTALL     := install
87