1 #****************************************************************************
3 # Makefile for TinyXml test.
5 # www.grinninglizard.com
7 # This is a GNU make (gmake) makefile
8 #****************************************************************************
10 # DEBUG can be set to YES to include debugging info, or NO otherwise
13 # PROFILE can be set to YES to include profiling info, or NO otherwise
16 # TINYXML_USE_STL can be used to turn on STL support. NO, then STL
17 # will not be used. YES will include the STL files.
18 TINYXML_USE_STL
:= YES
20 #****************************************************************************
28 DEBUG_CFLAGS
:= -Wall
-Wno-format
-g
-DDEBUG
29 RELEASE_CFLAGS
:= -Wall
-Wno-unknown-pragmas
-Wno-format
-O3
33 DEBUG_CXXFLAGS
:= ${DEBUG_CFLAGS}
34 RELEASE_CXXFLAGS
:= ${RELEASE_CFLAGS}
40 CFLAGS
:= ${DEBUG_CFLAGS}
41 CXXFLAGS
:= ${DEBUG_CXXFLAGS}
42 LDFLAGS
:= ${DEBUG_LDFLAGS}
44 CFLAGS
:= ${RELEASE_CFLAGS}
45 CXXFLAGS
:= ${RELEASE_CXXFLAGS}
46 LDFLAGS
:= ${RELEASE_LDFLAGS}
49 ifeq (YES
, ${PROFILE})
50 CFLAGS
:= ${CFLAGS} -pg
-O3
51 CXXFLAGS
:= ${CXXFLAGS} -pg
-O3
52 LDFLAGS
:= ${LDFLAGS} -pg
55 #****************************************************************************
56 # Preprocessor directives
57 #****************************************************************************
59 ifeq (YES
, ${TINYXML_USE_STL})
60 DEFS
:= -DTIXML_USE_STL
65 #****************************************************************************
67 #****************************************************************************
69 #INCS := -I/usr/include/g++-2 -I/usr/local/include
73 #****************************************************************************
74 # Makefile code common to all platforms
75 #****************************************************************************
77 CFLAGS
:= ${CFLAGS} ${DEFS}
78 CXXFLAGS
:= ${CXXFLAGS} ${DEFS}
80 #****************************************************************************
81 # Targets of the build
82 #****************************************************************************
89 #****************************************************************************
91 #****************************************************************************
93 SRCS
:= tinyxml.
cpp tinyxmlparser.
cpp xmltest.
cpp tinyxmlerror.
cpp tinystr.
cpp
95 # Add on the sources for libraries
98 OBJS
:= $(addsuffix .o
,$(basename ${SRCS}))
100 #****************************************************************************
102 #****************************************************************************
105 ${LD} -o
$@
${LDFLAGS} ${OBJS} ${LIBS} ${EXTRA_LIBS}
107 #****************************************************************************
109 #****************************************************************************
111 # Rules for compiling source files to object files
113 ${CXX} -c
${CXXFLAGS} ${INCS} $< -o
$@
116 ${CC} -c
${CFLAGS} ${INCS} $< -o
$@
122 -rm -f core
${OBJS} ${OUTPUT}
125 #makedepend ${INCS} ${SRCS}
127 tinyxml.o
: tinyxml.h tinystr.h
128 tinyxmlparser.o
: tinyxml.h tinystr.h
129 xmltest.o
: tinyxml.h tinystr.h
130 tinyxmlerror.o
: tinyxml.h tinystr.h