moved over some changes from cvs
[supertux.git] / Jamrules
1 if ! $(top_builddir)
2 {
3     top_builddir = $(TOP) ;
4 }
5 top_srcdir = $(TOP) ;
6
7 JAMCONFIG ?= $(top_builddir)/Jamconfig ;
8 include $(JAMCONFIG) ;
9 if ! $(JAMCONFIG_READ)
10 {
11   EXIT "Couldn't find config. Please run 'configure' first." ;
12 }
13
14 if $(USE_STLPORT_DEBUG)
15 {
16   CPPFLAGS += -I/usr/include/stlport ;
17   CPPFLAGS += -D_STLP_DEBUG=1 -D_STLP_DEBUG_UNINITIALIZED=1 ;
18   CPPFLAGS += -D_STLP_SHRED_BYTE=0xA3 ;
19   LIBS += -lstlport_gcc_debug ;
20 }
21
22 COMPILER_CFLAGS += -Wall -W ;
23 COMPILER_CFLAGS_optimize += -O3 -g3 ;
24 COMPILER_C++FLAGS_optimize += -O3 -g3 ;
25 COMPILER_LFLAGS_optimize += -O3 -g3 ;
26 COMPILER_CFLAGS_debug += -DDEBUG -Werror -g3 ;
27 COMPILER_CXXFLAGS_debug += -DDEBUG -Werror -g3 ;
28 COMPILER_LFLAGS_debug += -g3 ;
29 COMPILER_CFLAGS_profile += -O2 -g3 -pg ;
30 COMPILER_CXXFLAGS_profile += -O2 -g3 -pg ;
31 COMPILER_LFLAGS_profile += -g3 -pg ;
32
33 LINK = $(CXX) ;
34
35 # Include build rules
36 include $(TOP)/mk/jam/build.jam ;
37
38 # Include Dirs
39 IncludeDir $(top_builddir) ; # for config.h
40 IncludeDir lib src ;
41
42 if $(XGETTEXT) != ""
43 {
44     actions XGetText
45     {
46         $(XGETTEXT) $(XGETTEXT_FLAGS) --keyword='_:1' -o $(<) $(>)
47     }
48     rule MakePot
49     {
50       if $(>) {
51         XGetText $(<) : $(>) ;
52         Depends $(<) : $(>) ;
53         Depends all : $(<) ;
54       }
55     }
56 } else {
57     rule MakePot
58     { }
59 }
60