arabica/SAX/Makefile

100 lines
2.2 KiB
Makefile
Raw Normal View History

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)
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 \
helpers/InputSourceResolver.cpp \
../Utils/rot13codecvt.cpp \
../Utils/utf8ucs2codecvt.cpp \
../Utils/impl/ucs2_utf8.cpp \
../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 \
../XML/XMLCharacterClasses.cpp
2003-09-10 10:48:31 +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)))
##########################
2002-06-21 13:16:28 +02:00
# High level rules
all : libArabica.so.1 libArabica.a
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
libArabica.a : $(OBJS)
$(AR) $@ $(OBJS)
2003-09-10 00:02:20 +02:00
$(COPY) libArabica.a ../bin
2002-06-21 13:16:28 +02:00
######################
2002-06-21 13:16:28 +02:00
# Compile rules
####
# 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
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
%.cpp : ArabicaConfig.h ParserConfig.h
2002-06-21 13:16:28 +02:00
#############################################
2002-06-21 13:16:28 +02:00
# Cleaning up
clean :
$(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