Makefile (2388B)
- #****************************************************************************
- #
- # Makefil for TinyXml test.
- # Lee Thomason
- # www.grinninglizard.com
- #
- # This is a GNU make (gmake) makefile
- #****************************************************************************
- # DEBUG can be set to YES to include debugging info, or NO otherwise
- DEBUG := NO
- # PROFILE can be set to YES to include profiling info, or NO otherwise
- PROFILE := NO
- #****************************************************************************
- # Preprocessor directives
- #****************************************************************************
- ifeq (YES, ${PROFILE})
- DEFS :=
- else
- DEFS :=
- endif
- #****************************************************************************
- # Include paths
- #****************************************************************************
- #INCS := -I/usr/include/g++-2 -I/usr/local/include
- INCS :=
- #****************************************************************************
- # Makefile code common to all platforms
- #****************************************************************************
- CFLAGS += ${DEFS}
- CXXFLAGS += ${DEFS}
- #****************************************************************************
- # Targets of the build
- #****************************************************************************
- OUTPUT := xmltest
- all: ${OUTPUT}
- #****************************************************************************
- # Source files
- #****************************************************************************
- SRCS := tinyxml.cpp tinyxmlparser.cpp xmltest.cpp tinyxmlerror.cpp
- # Add on the sources for libraries
- SRCS := ${SRCS}
- OBJS := $(addsuffix .o,$(basename ${SRCS}))
- #****************************************************************************
- # Output
- #****************************************************************************
- ${OUTPUT}: ${OBJS}
- ${CXX} ${LDFLAGS} -o $@ ${OBJS} ${LIBS} ${EXTRA_LIBS}
- #****************************************************************************
- # common rules
- #****************************************************************************
- # Rules for compiling source files to object files
- %.o : %.cpp
- ${CXX} ${CXXFLAGS} ${CPPFLAGS} ${INCS} -c $< -o $@
- %.o : %.c
- ${CC} ${CFLAGS} ${CPPFLAGS} ${INCS} -c $< -o $@
- clean:
- -rm -f core ${OBJS} ${OUTPUT}
- depend:
- makedepend ${INCS} ${SRCS}
- distdir: