1159b3361Sopenharmony_ci#****************************************************************************
2159b3361Sopenharmony_ci#
3159b3361Sopenharmony_ci# Makefil for TinyXml test.
4159b3361Sopenharmony_ci# Lee Thomason
5159b3361Sopenharmony_ci# www.grinninglizard.com
6159b3361Sopenharmony_ci#
7159b3361Sopenharmony_ci# This is a GNU make (gmake) makefile
8159b3361Sopenharmony_ci#****************************************************************************
9159b3361Sopenharmony_ci
10159b3361Sopenharmony_ci# DEBUG can be set to YES to include debugging info, or NO otherwise
11159b3361Sopenharmony_ciDEBUG          := YES
12159b3361Sopenharmony_ci
13159b3361Sopenharmony_ci# PROFILE can be set to YES to include profiling info, or NO otherwise
14159b3361Sopenharmony_ciPROFILE        := NO
15159b3361Sopenharmony_ci
16159b3361Sopenharmony_ci#****************************************************************************
17159b3361Sopenharmony_ci
18159b3361Sopenharmony_ciCC     := gcc
19159b3361Sopenharmony_ciCXX    := g++
20159b3361Sopenharmony_ciLD     := g++
21159b3361Sopenharmony_ciAR     := ar rc
22159b3361Sopenharmony_ciRANLIB := ranlib
23159b3361Sopenharmony_ci
24159b3361Sopenharmony_ciDEBUG_CFLAGS     := -Wall -Wno-unknown-pragmas -Wno-format -g -DDEBUG
25159b3361Sopenharmony_ciRELEASE_CFLAGS   := -Wall -Wno-unknown-pragmas -Wno-format -O2
26159b3361Sopenharmony_ci
27159b3361Sopenharmony_ciLIBS		 :=
28159b3361Sopenharmony_ci
29159b3361Sopenharmony_ciDEBUG_CXXFLAGS   := ${DEBUG_CFLAGS} 
30159b3361Sopenharmony_ciRELEASE_CXXFLAGS := ${RELEASE_CFLAGS}
31159b3361Sopenharmony_ci
32159b3361Sopenharmony_ciDEBUG_LDFLAGS    := -g
33159b3361Sopenharmony_ciRELEASE_LDFLAGS  :=
34159b3361Sopenharmony_ci
35159b3361Sopenharmony_ciifeq (YES, ${DEBUG})
36159b3361Sopenharmony_ci   CFLAGS       := ${DEBUG_CFLAGS}
37159b3361Sopenharmony_ci   CXXFLAGS     := ${DEBUG_CXXFLAGS}
38159b3361Sopenharmony_ci   LDFLAGS      := ${DEBUG_LDFLAGS}
39159b3361Sopenharmony_cielse
40159b3361Sopenharmony_ci   CFLAGS       := ${RELEASE_CFLAGS}
41159b3361Sopenharmony_ci   CXXFLAGS     := ${RELEASE_CXXFLAGS}
42159b3361Sopenharmony_ci   LDFLAGS      := ${RELEASE_LDFLAGS}
43159b3361Sopenharmony_ciendif
44159b3361Sopenharmony_ci
45159b3361Sopenharmony_ciifeq (YES, ${PROFILE})
46159b3361Sopenharmony_ci   CFLAGS   := ${CFLAGS} -pg
47159b3361Sopenharmony_ci   CXXFLAGS := ${CXXFLAGS} -pg
48159b3361Sopenharmony_ci   LDFLAGS  := ${LDFLAGS} -pg
49159b3361Sopenharmony_ciendif
50159b3361Sopenharmony_ci
51159b3361Sopenharmony_ci#****************************************************************************
52159b3361Sopenharmony_ci# Preprocessor directives
53159b3361Sopenharmony_ci#****************************************************************************
54159b3361Sopenharmony_ci
55159b3361Sopenharmony_ciifeq (YES, ${PROFILE})
56159b3361Sopenharmony_ci  DEFS :=
57159b3361Sopenharmony_cielse
58159b3361Sopenharmony_ci  DEFS :=
59159b3361Sopenharmony_ciendif
60159b3361Sopenharmony_ci
61159b3361Sopenharmony_ci#****************************************************************************
62159b3361Sopenharmony_ci# Include paths
63159b3361Sopenharmony_ci#****************************************************************************
64159b3361Sopenharmony_ci
65159b3361Sopenharmony_ci#INCS := -I/usr/include/g++-2 -I/usr/local/include
66159b3361Sopenharmony_ciINCS :=
67159b3361Sopenharmony_ci
68159b3361Sopenharmony_ci
69159b3361Sopenharmony_ci#****************************************************************************
70159b3361Sopenharmony_ci# Makefile code common to all platforms
71159b3361Sopenharmony_ci#****************************************************************************
72159b3361Sopenharmony_ci
73159b3361Sopenharmony_ciCFLAGS   := ${CFLAGS}   ${DEFS}
74159b3361Sopenharmony_ciCXXFLAGS := ${CXXFLAGS} ${DEFS}
75159b3361Sopenharmony_ci
76159b3361Sopenharmony_ci#****************************************************************************
77159b3361Sopenharmony_ci# Targets of the build
78159b3361Sopenharmony_ci#****************************************************************************
79159b3361Sopenharmony_ci
80159b3361Sopenharmony_ciOUTPUT := xmltest
81159b3361Sopenharmony_ci
82159b3361Sopenharmony_ciall: ${OUTPUT}
83159b3361Sopenharmony_ci
84159b3361Sopenharmony_ci
85159b3361Sopenharmony_ci#****************************************************************************
86159b3361Sopenharmony_ci# Source files
87159b3361Sopenharmony_ci#****************************************************************************
88159b3361Sopenharmony_ci
89159b3361Sopenharmony_ciSRCS := tinyxml.cpp tinyxmlparser.cpp xmltest.cpp tinyxmlerror.cpp
90159b3361Sopenharmony_ci
91159b3361Sopenharmony_ci# Add on the sources for libraries
92159b3361Sopenharmony_ciSRCS := ${SRCS}
93159b3361Sopenharmony_ci
94159b3361Sopenharmony_ciOBJS := $(addsuffix .o,$(basename ${SRCS}))
95159b3361Sopenharmony_ci
96159b3361Sopenharmony_ci#****************************************************************************
97159b3361Sopenharmony_ci# Output
98159b3361Sopenharmony_ci#****************************************************************************
99159b3361Sopenharmony_ci
100159b3361Sopenharmony_ci${OUTPUT}: ${OBJS}
101159b3361Sopenharmony_ci	${LD} -o $@ ${LDFLAGS} ${OBJS} ${LIBS} ${EXTRA_LIBS}
102159b3361Sopenharmony_ci
103159b3361Sopenharmony_ci#****************************************************************************
104159b3361Sopenharmony_ci# common rules
105159b3361Sopenharmony_ci#****************************************************************************
106159b3361Sopenharmony_ci
107159b3361Sopenharmony_ci# Rules for compiling source files to object files
108159b3361Sopenharmony_ci%.o : %.cpp
109159b3361Sopenharmony_ci	${CXX} -c ${CXXFLAGS} ${INCS} $< -o $@
110159b3361Sopenharmony_ci
111159b3361Sopenharmony_ci%.o : %.c
112159b3361Sopenharmony_ci	${CC} -c ${CFLAGS} ${INCS} $< -o $@
113159b3361Sopenharmony_ci
114159b3361Sopenharmony_ciclean:
115159b3361Sopenharmony_ci	-rm -f core ${OBJS} ${OUTPUT}
116159b3361Sopenharmony_ci
117159b3361Sopenharmony_cidepend:
118159b3361Sopenharmony_ci	makedepend ${INCS} ${SRCS}
119159b3361Sopenharmony_ci# DO NOT DELETE
120159b3361Sopenharmony_ci
121159b3361Sopenharmony_citinyxml.o: tinyxml.h /usr/include/stdio.h /usr/include/features.h
122159b3361Sopenharmony_citinyxml.o: /usr/include/sys/cdefs.h /usr/include/gnu/stubs.h
123159b3361Sopenharmony_citinyxml.o: /usr/include/bits/types.h /usr/include/bits/pthreadtypes.h
124159b3361Sopenharmony_citinyxml.o: /usr/include/bits/sched.h /usr/include/libio.h
125159b3361Sopenharmony_citinyxml.o: /usr/include/_G_config.h /usr/include/wchar.h
126159b3361Sopenharmony_citinyxml.o: /usr/include/bits/wchar.h /usr/include/gconv.h
127159b3361Sopenharmony_citinyxml.o: /usr/include/bits/stdio_lim.h /usr/include/assert.h
128159b3361Sopenharmony_citinyxmlparser.o: tinyxml.h /usr/include/stdio.h /usr/include/features.h
129159b3361Sopenharmony_citinyxmlparser.o: /usr/include/sys/cdefs.h /usr/include/gnu/stubs.h
130159b3361Sopenharmony_citinyxmlparser.o: /usr/include/bits/types.h /usr/include/bits/pthreadtypes.h
131159b3361Sopenharmony_citinyxmlparser.o: /usr/include/bits/sched.h /usr/include/libio.h
132159b3361Sopenharmony_citinyxmlparser.o: /usr/include/_G_config.h /usr/include/wchar.h
133159b3361Sopenharmony_citinyxmlparser.o: /usr/include/bits/wchar.h /usr/include/gconv.h
134159b3361Sopenharmony_citinyxmlparser.o: /usr/include/bits/stdio_lim.h /usr/include/assert.h
135159b3361Sopenharmony_citinyxmlparser.o: /usr/include/ctype.h /usr/include/endian.h
136159b3361Sopenharmony_citinyxmlparser.o: /usr/include/bits/endian.h
137159b3361Sopenharmony_cixmltest.o: tinyxml.h /usr/include/stdio.h /usr/include/features.h
138159b3361Sopenharmony_cixmltest.o: /usr/include/sys/cdefs.h /usr/include/gnu/stubs.h
139159b3361Sopenharmony_cixmltest.o: /usr/include/bits/types.h /usr/include/bits/pthreadtypes.h
140159b3361Sopenharmony_cixmltest.o: /usr/include/bits/sched.h /usr/include/libio.h
141159b3361Sopenharmony_cixmltest.o: /usr/include/_G_config.h /usr/include/wchar.h
142159b3361Sopenharmony_cixmltest.o: /usr/include/bits/wchar.h /usr/include/gconv.h
143159b3361Sopenharmony_cixmltest.o: /usr/include/bits/stdio_lim.h /usr/include/assert.h
144159b3361Sopenharmony_citinyxmlerror.o: tinyxml.h /usr/include/stdio.h /usr/include/features.h
145159b3361Sopenharmony_citinyxmlerror.o: /usr/include/sys/cdefs.h /usr/include/gnu/stubs.h
146159b3361Sopenharmony_citinyxmlerror.o: /usr/include/bits/types.h /usr/include/bits/pthreadtypes.h
147159b3361Sopenharmony_citinyxmlerror.o: /usr/include/bits/sched.h /usr/include/libio.h
148159b3361Sopenharmony_citinyxmlerror.o: /usr/include/_G_config.h /usr/include/wchar.h
149159b3361Sopenharmony_citinyxmlerror.o: /usr/include/bits/wchar.h /usr/include/gconv.h
150159b3361Sopenharmony_citinyxmlerror.o: /usr/include/bits/stdio_lim.h /usr/include/assert.h
151