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
|
|
|
|
CXXFLAGS = -Wall -pthread -fpic
|
|
|
|
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-04-04 11:26:23 +02:00
|
|
|
LDFLAGS += -O2 -L../../bin -lSAX -lArabicaUtils
|
2002-06-21 13:16:28 +02:00
|
|
|
|
|
|
|
# Uncomment for debug version
|
2003-04-04 11:26:23 +02:00
|
|
|
CXXFLAGS += -g -D__DEBUG__
|
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
|
|
|
|
2002-11-23 20:53:46 +01:00
|
|
|
LIBS_DIRS =
|
2002-06-21 13:16:28 +02:00
|
|
|
|
2002-11-23 20:53:46 +01:00
|
|
|
STATIC_LIBS =
|
2003-04-04 11:26:23 +02:00
|
|
|
DYNAMIC_LIBS = -L../../bin -lSAX -lexpat
|
2002-06-21 13:16:28 +02:00
|
|
|
|
2002-11-23 20:53:46 +01:00
|
|
|
CXXFLAGS += ${INCS_DIRS}
|
|
|
|
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))
|
|
|
|
|
|
|
|
#/////////////////////////////////////////////////////////////////////////
|
|
|
|
#//////////////////////////////////////////////
|
|
|
|
|
|
|
|
# High level rules
|
|
|
|
|
2002-11-23 20:53:46 +01:00
|
|
|
all : sax2dom_test
|
|
|
|
|
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
|
|
|
|
|
|
|
|
#/////////////////////////////////////////////////////////////////////////
|
|
|
|
#//////////////////////////////////////////////
|
|
|
|
|
|
|
|
# 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-04-04 11:26:23 +02:00
|
|
|
$(REMOVE) .depend $(CPPUNITUI_OBJS) $(CPPUNITFW_OBJS) $(SAXDOM_OBJS) core sax2dom_test ../../bin/sax2dom_test
|
2002-06-21 13:16:28 +02:00
|
|
|
|
|
|
|
|
|
|
|
#/////////////////////////////////////////////////////////////////////////
|
|
|
|
#//////////////////////////////////////////////
|
|
|
|
|
|
|
|
# End of File
|