2002-06-21 13:16:28 +02:00
|
|
|
#/////////////////////////////////////////////////////////////////////////
|
|
|
|
#//////////////////////////////////////////////
|
|
|
|
|
|
|
|
# Utilities
|
|
|
|
|
|
|
|
REMOVE = rm -rf
|
|
|
|
LINK = ln -sf
|
|
|
|
|
2002-11-23 20:53:46 +01:00
|
|
|
# For GNU make:
|
|
|
|
OS_VER := $(shell uname -s | sed -e s/\[\.\ \]/_/g)
|
|
|
|
# For other make (like Sun's) you can try:
|
|
|
|
# OS_VER:sh =uname -sr | sed -e s/\[\.\ \]/_/g
|
2002-06-21 13:16:28 +02:00
|
|
|
|
|
|
|
# C/C++ shortcuts
|
2002-11-23 20:53:46 +01:00
|
|
|
CXX = c++
|
2002-06-21 13:16:28 +02:00
|
|
|
|
|
|
|
#/////////////////////////////////////////////////////////////////////////
|
|
|
|
#//////////////////////////////////////////////
|
|
|
|
# Compile and link flags...
|
|
|
|
#
|
|
|
|
# -c Produce object code.
|
|
|
|
# -Wall Max warning level.
|
|
|
|
# -Werror Treat warnings as errors.
|
|
|
|
# -O2 Turn on medium optimisations.
|
|
|
|
# -g Add debug information.
|
|
|
|
# -D Define symbolic constant.
|
|
|
|
# -fPIC Generate position independent code.
|
|
|
|
# -shared Produce a sharable object.
|
|
|
|
#/////////////////////////////////////////////////////////////////////////
|
|
|
|
#//////////////////////////////////////////////
|
|
|
|
|
2002-11-23 20:53:46 +01:00
|
|
|
ifeq ($(OS_VER),SunOS)
|
|
|
|
CXXFLAGS = -Wall -pthreads -fpic
|
|
|
|
else
|
2003-09-08 18:03:57 +02:00
|
|
|
CXXFLAGS = -Wall
|
2002-11-23 20:53:46 +01:00
|
|
|
endif
|
2002-06-21 13:16:28 +02:00
|
|
|
|
2002-11-23 20:53:46 +01:00
|
|
|
LDFLAGS =
|
|
|
|
CCDEPFLAGS = -E -M
|
2002-06-21 13:16:28 +02:00
|
|
|
|
|
|
|
# Uncomment for optimisations
|
2002-11-23 20:53:46 +01:00
|
|
|
CXXFLAGS += -O2
|
2003-09-09 15:09:48 +02:00
|
|
|
LDFLAGS += -O2 -L../../bin
|
2002-06-21 13:16:28 +02:00
|
|
|
|
|
|
|
# Uncomment for debug version
|
2003-09-09 11:25:42 +02:00
|
|
|
CXXFLAGS += -g
|
2002-06-21 13:16:28 +02:00
|
|
|
|
|
|
|
|
|
|
|
# Includes and library directories
|
2003-04-04 11:26:23 +02:00
|
|
|
INCS_DIRS = -I../..
|
2002-11-23 20:53:46 +01:00
|
|
|
#INCS_DIRS = -I..
|
2002-06-21 13:16:28 +02:00
|
|
|
|
2003-09-09 13:14:48 +02:00
|
|
|
LIBS_DIRS = -L../../bin
|
2002-06-21 13:16:28 +02:00
|
|
|
|
2002-11-23 20:53:46 +01:00
|
|
|
STATIC_LIBS =
|
2003-09-09 15:09:48 +02:00
|
|
|
DYNAMIC_LIBS = -lArabica -lstdc++
|
2002-06-21 13:16:28 +02:00
|
|
|
|
2002-11-23 20:53:46 +01:00
|
|
|
CXXFLAGS += ${INCS_DIRS}
|
2003-09-09 13:14:48 +02:00
|
|
|
LDFLAGS += ${LIBS_DIRS}
|
2002-11-23 20:53:46 +01:00
|
|
|
LDFLAGS += ${DYNAMIC_LIBS}
|
2002-06-21 13:16:28 +02:00
|
|
|
|
|
|
|
#/////////////////////////////////////////////////////////////////////////
|
|
|
|
#//////////////////////////////////////////////
|
|
|
|
|
2003-04-04 11:26:23 +02:00
|
|
|
# Source files
|
2002-11-23 20:53:46 +01:00
|
|
|
SAXDOM_SRCS = main.cpp test_Attribute.cpp test_Document.cpp test_DocumentFragment.cpp test_DocumentType.cpp test_DOMImplementation.cpp test_Element.cpp test_ProcessingInstruction.cpp test_Siblings.cpp test_SAX.cpp
|
2002-06-21 13:16:28 +02:00
|
|
|
SAXDOM_HDRS = $(patsubst %.cpp,%.h,$(SAXDOM_SRCS))
|
|
|
|
SAXDOM_OBJS = $(patsubst %.cpp,%.o,$(SAXDOM_SRCS))
|
|
|
|
|
|
|
|
CPPUNITFW_FILES = TestCase.cpp TestFailure.cpp TestResult.cpp TestSuite.cpp
|
|
|
|
CPPUNITFW_SRCS = $(patsubst Test%,CppUnit/framework/Test%,$(CPPUNITFW_FILES))
|
|
|
|
CPPUNITFW_OBJS = $(patsubst %.cpp,%.o,$(CPPUNITFW_SRCS))
|
|
|
|
|
|
|
|
CPPUNITUI_FILES = TextTestResult.cpp
|
|
|
|
CPPUNITUI_SRCS = $(patsubst Text%,CppUnit/textui/Text%,$(CPPUNITUI_FILES))
|
|
|
|
CPPUNITUI_OBJS = $(patsubst %.cpp,%.o,$(CPPUNITUI_SRCS))
|
|
|
|
|
2003-09-08 18:03:57 +02:00
|
|
|
DOMWRITER_SRCS = DOMWriter.cpp
|
|
|
|
DOMWRITER_HDRS = $(patsubst %.c,%.h,$(patsubst %.cpp,%.h,$(DOMWRITER_SRCS)))
|
|
|
|
DOMWRITER_OBJS = $(patsubst %.c,%.o,$(patsubst %.cpp,%.o,$(DOMWRITER_SRCS)))
|
|
|
|
|
2002-06-21 13:16:28 +02:00
|
|
|
#/////////////////////////////////////////////////////////////////////////
|
|
|
|
#//////////////////////////////////////////////
|
|
|
|
|
|
|
|
# High level rules
|
|
|
|
|
2003-09-08 18:03:57 +02:00
|
|
|
all : sax2dom_test domwriter
|
2002-11-23 20:53:46 +01:00
|
|
|
|
2002-06-21 13:16:28 +02:00
|
|
|
|
2002-11-23 20:53:46 +01:00
|
|
|
sax2dom_test : $(SAXDOM_OBJS) $(CPPUNITFW_OBJS) $(CPPUNITUI_OBJS)
|
|
|
|
$(LINK.cc) -o $@ $(SAXDOM_OBJS) $(CPPUNITFW_OBJS) $(CPPUNITUI_OBJS)
|
2002-06-21 13:16:28 +02:00
|
|
|
cp sax2dom_test ../../bin
|
|
|
|
|
2003-09-08 18:03:57 +02:00
|
|
|
domwriter : $(DOMWRITER_OBJS)
|
|
|
|
$(LINK.cc) -o $@ $(DOMWRITER_OBJS)
|
|
|
|
cp domwriter ../../bin
|
|
|
|
|
2002-06-21 13:16:28 +02:00
|
|
|
#/////////////////////////////////////////////////////////////////////////
|
|
|
|
#//////////////////////////////////////////////
|
|
|
|
|
|
|
|
# Compile rules
|
|
|
|
|
|
|
|
%.o : %.cpp
|
2002-11-23 20:53:46 +01:00
|
|
|
$(COMPILE.cc) -o $@ $<
|
2002-06-21 13:16:28 +02:00
|
|
|
|
|
|
|
#/////////////////////////////////////////////////////////////////////////
|
|
|
|
#//////////////////////////////////////////////
|
|
|
|
|
|
|
|
# Dependencies
|
|
|
|
|
|
|
|
depend : .depend
|
|
|
|
|
|
|
|
.depend ::
|
2002-11-23 20:53:46 +01:00
|
|
|
$(COMPILE.cc) $(CCDEPFLAGS) $(SAXDOM_SRCS) $(CPPUNITFW_SRCS) $(CPPUNITUI_SRCS) > .depend
|
2002-06-21 13:16:28 +02:00
|
|
|
|
|
|
|
-include .depend
|
|
|
|
|
|
|
|
|
|
|
|
#/////////////////////////////////////////////////////////////////////////
|
|
|
|
#//////////////////////////////////////////////
|
|
|
|
|
|
|
|
# Cleaning up
|
|
|
|
|
|
|
|
clean :
|
2003-09-09 13:14:48 +02:00
|
|
|
$(REMOVE) .depend $(CPPUNITUI_OBJS) $(CPPUNITFW_OBJS) $(SAXDOM_OBJS) $(DOMWRITER_OBJS) core sax2dom_test domwriter ../../bin/sax2dom_test ../../bin/domwriter
|
2002-06-21 13:16:28 +02:00
|
|
|
|
|
|
|
|
|
|
|
#/////////////////////////////////////////////////////////////////////////
|
|
|
|
#//////////////////////////////////////////////
|
|
|
|
|
|
|
|
# End of File
|