2003-09-10 01:08:15 +02:00
|
|
|
####################################
|
|
|
|
# Arabica Makefile
|
|
|
|
#
|
|
|
|
# I wrote this for GNU Make + GNU tools on Linux.
|
|
|
|
# You may have to jiggle it for your own environment.
|
|
|
|
# Platforms specific build files gratefully received
|
|
|
|
# at jez@jezuk.co.uk Thanks :)
|
|
|
|
#
|
|
|
|
# $Id$
|
|
|
|
####################################
|
|
|
|
|
2003-09-10 10:48:31 +02:00
|
|
|
-include ../Makefile.header
|
2002-06-21 13:16:28 +02:00
|
|
|
|
2003-09-10 01:08:15 +02:00
|
|
|
######################################
|
2003-09-10 10:48:31 +02:00
|
|
|
# ADDITIONAL BUILD FLAGS
|
|
|
|
CXXFLAGS +=
|
2003-09-10 01:08:15 +02:00
|
|
|
LDFLAGS += -shared
|
2002-06-21 13:16:28 +02:00
|
|
|
|
2003-09-10 10:48:31 +02:00
|
|
|
INC_DIRS +=
|
|
|
|
LIBS_DIRS +=
|
2002-06-21 13:16:28 +02:00
|
|
|
|
2003-09-10 10:48:31 +02:00
|
|
|
STATIC_LIBS +=
|
|
|
|
DYNAMIC_LIBS +=
|
2002-06-21 13:16:28 +02:00
|
|
|
|
2003-09-10 10:48:31 +02:00
|
|
|
############
|
2003-09-09 23:40:23 +02:00
|
|
|
CXXFLAGS += $(INCS_DIRS)
|
2003-09-10 00:38:45 +02:00
|
|
|
LDFLAGS += $(LIBS_DIRS)
|
|
|
|
LDFLAGS += $(STATIC_LIBS)
|
2003-09-09 23:40:23 +02:00
|
|
|
LDFLAGS += $(DYNAMIC_LIBS)
|
2002-06-21 13:16:28 +02:00
|
|
|
|
2003-09-10 01:08:15 +02:00
|
|
|
######################################
|
|
|
|
# SOURCE FILES
|
2003-04-03 15:18:27 +02:00
|
|
|
SRCS = saxlib.cpp \
|
2002-11-23 20:53:46 +01:00
|
|
|
helpers/InputSourceResolver.cpp \
|
2003-09-10 12:39:01 +02:00
|
|
|
../Utils/rot13codecvt.cpp \
|
2003-09-08 18:03:57 +02:00
|
|
|
../Utils/utf8ucs2codecvt.cpp \
|
|
|
|
../Utils/impl/ucs2_utf8.cpp \
|
2003-09-10 12:39:01 +02:00
|
|
|
../Utils/utf16beucs2codecvt.cpp \
|
|
|
|
../Utils/utf16leucs2codecvt.cpp \
|
|
|
|
../Utils/impl/ucs2_utf16.cpp \
|
|
|
|
../Utils/iso88591utf8codecvt.cpp \
|
|
|
|
../Utils/utf8iso88591codecvt.cpp \
|
|
|
|
../Utils/impl/iso88591_utf8.cpp \
|
|
|
|
../Utils/utf16utf8codecvt.cpp \
|
|
|
|
../Utils/base64codecvt.cpp \
|
2003-09-08 18:03:57 +02:00
|
|
|
../XML/XMLCharacterClasses.cpp
|
2003-09-10 12:39:01 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2003-09-10 10:48:31 +02:00
|
|
|
|
2003-09-08 18:03:57 +02:00
|
|
|
|
2002-06-21 13:16:28 +02:00
|
|
|
HDRS = $(patsubst %.c,%.h,$(patsubst %.cpp,%.h,$(SRCS)))
|
|
|
|
OBJS = $(patsubst %.c,%.o,$(patsubst %.cpp,%.o,$(SRCS)))
|
|
|
|
|
2003-09-10 00:38:45 +02:00
|
|
|
##########################
|
2002-06-21 13:16:28 +02:00
|
|
|
# High level rules
|
2003-08-25 17:13:47 +02:00
|
|
|
all : libArabica.so.1 libArabica.a
|
2002-11-23 20:53:46 +01:00
|
|
|
|
2003-09-10 00:38:45 +02:00
|
|
|
libArabica.so.1 : $(OBJS)
|
2003-09-10 00:02:20 +02:00
|
|
|
$(LD) $(LDFLAGS) -o $@ $(OBJS)
|
|
|
|
$(COPY) libArabica.so.1 ../bin
|
|
|
|
(cd ../bin; $(REMOVE) libArabica.so; $(LINK) libArabica.so.1 libArabica.so)
|
2002-06-21 13:16:28 +02:00
|
|
|
|
2003-08-25 17:13:47 +02:00
|
|
|
libArabica.a : $(OBJS)
|
2003-09-10 00:38:45 +02:00
|
|
|
$(AR) $@ $(OBJS)
|
2003-09-10 00:02:20 +02:00
|
|
|
$(COPY) libArabica.a ../bin
|
2002-06-21 13:16:28 +02:00
|
|
|
|
2003-09-10 00:38:45 +02:00
|
|
|
######################
|
2002-06-21 13:16:28 +02:00
|
|
|
# Compile rules
|
2003-09-10 00:38:45 +02:00
|
|
|
####
|
|
|
|
# the .S files depends on symbols defined in this Makefile, hence
|
|
|
|
# this slightly wacky rule
|
|
|
|
saxlib.cpp : Makefile ParserConfig.h ArabicaConfig.h
|
2003-09-09 23:40:23 +02:00
|
|
|
$(CPP) $(PARSER_CONFIG) -o saxlib.cpp saxlib.S
|
2003-09-08 18:03:57 +02:00
|
|
|
|
2003-09-10 00:38:45 +02:00
|
|
|
ParserConfig.h : Makefile
|
|
|
|
$(CPP) $(PARSER_CONFIG) -o ParserConfig.h ParserConfig.S
|
|
|
|
|
|
|
|
ArabicaConfig.h : Makefile
|
|
|
|
$(CPP) $(PARSER_CONFIG) -o ArabicaConfig.h ArabicaConfig.S
|
2002-06-21 13:16:28 +02:00
|
|
|
|
|
|
|
%.o : %.cpp
|
2003-09-10 00:02:20 +02:00
|
|
|
$(CXX) $(CXXFLAGS) -c -o $@ $<
|
2002-06-21 13:16:28 +02:00
|
|
|
|
2003-09-10 00:38:45 +02:00
|
|
|
%.cpp : ArabicaConfig.h ParserConfig.h
|
2002-06-21 13:16:28 +02:00
|
|
|
|
2003-09-10 00:38:45 +02:00
|
|
|
#############################################
|
2002-06-21 13:16:28 +02:00
|
|
|
# Cleaning up
|
|
|
|
clean :
|
2003-09-10 00:38:45 +02:00
|
|
|
$(REMOVE) *.o helpers/*.o wrappers/*.o ../Utils/*.o ../Utils/impl/*.o ../XML/*.o libArabica* ../bin/libArabica* saxlib.cpp ParserConfig.h ArabicaConfig.h
|
2002-06-21 13:16:28 +02:00
|
|
|
|
|
|
|
# End of File
|
2003-09-10 01:08:15 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|