mirror of
https://github.com/jezhiggins/arabica
synced 2025-02-05 20:45:56 +01:00
MinGW patches from Cromwell Enage, spanage@yahoo.com
This commit is contained in:
parent
54d4ce66f8
commit
aa4be03ea0
3 changed files with 109 additions and 8 deletions
75
SAX/Makefile.mingw
Normal file
75
SAX/Makefile.mingw
Normal file
|
@ -0,0 +1,75 @@
|
|||
####################################
|
||||
# Arabica Makefile
|
||||
#
|
||||
# Modified for GCC 3.4.2 (MinGW)
|
||||
####################################
|
||||
|
||||
-include ../Makefile.header
|
||||
|
||||
######################################
|
||||
# ADDITIONAL BUILD FLAGS
|
||||
CXXFLAGS += -D__GNUWIN32__ -D_LIB
|
||||
LDFLAGS += $(LINK_SHARED) -Wl,--out-implib,../../../../Dev/lib/libArabica.a
|
||||
|
||||
INCS_DIRS += -I..
|
||||
LIBS_DIRS +=
|
||||
|
||||
STATIC_LIBS +=
|
||||
DYNAMIC_LIBS +=
|
||||
|
||||
######################################
|
||||
# SOURCE FILES
|
||||
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/ucs2utf8codecvt.cpp \
|
||||
../Utils/base64codecvt.cpp \
|
||||
../Utils/impl/codecvt_specialisations.cpp \
|
||||
../XML/XMLCharacterClasses.cpp
|
||||
|
||||
HDRS = $(patsubst %.c,%.h,$(patsubst %.cpp,%.h,$(SRCS)))
|
||||
OBJS = $(patsubst %.c,%.o,$(patsubst %.cpp,%.o,$(SRCS)))
|
||||
|
||||
##########################
|
||||
# High level rules
|
||||
all : libArabica$(LIBSUFFIX)
|
||||
|
||||
libArabica$(LIBSUFFIX) : $(OBJS)
|
||||
$(LD) $(LDFLAGS) -o ../bin/libArabica$(LIBSUFFIX) $(OBJS) $(LIBS_DIRS) $(STATIC_LIBS) $(DYNAMIC_LIBS)
|
||||
|
||||
######################
|
||||
# Compile rules
|
||||
####
|
||||
# the .S files depends on symbols defined in this Makefile, hence
|
||||
# this slightly wacky rule
|
||||
saxlib.cpp : ParserConfig.h ArabicaConfig.h
|
||||
$(CPP) $(PARSER_CONFIG) -o saxlib.cpp saxlib.S
|
||||
|
||||
ParserConfig.h : Makefile ../Makefile.header
|
||||
$(CPP) $(PARSER_CONFIG) -o ParserConfig.h ParserConfig.S
|
||||
|
||||
ArabicaConfig.h : Makefile ../Makefile.header
|
||||
$(CPP) $(PARSER_CONFIG) -o ArabicaConfig.h ArabicaConfig.S
|
||||
|
||||
%.cpp : ArabicaConfig.h ParserConfig.h
|
||||
|
||||
Makefile :
|
||||
|
||||
-include ../Makefile.rules
|
||||
|
||||
#############################################
|
||||
# Cleaning up
|
||||
clean :
|
||||
$(REMOVE) wrappers/*.o $(OBJS) ../bin/libArabica* ../../../../Dev/lib/libArabica* saxlib.cpp ParserConfig.h ArabicaConfig.h
|
||||
|
||||
# End of File
|
||||
|
26
SAX/saxlib.S
26
SAX/saxlib.S
|
@ -53,6 +53,32 @@ message("Pulling in Expat wrappers.")
|
|||
#endif
|
||||
#endif
|
||||
|
||||
#ifdef __GNUWIN32__
|
||||
#ifdef _LIB
|
||||
include <windows.h>
|
||||
|
||||
BOOL APIENTRY DllMain(
|
||||
HINSTANCE hInst
|
||||
, DWORD reason
|
||||
, LPVOID reserved
|
||||
)
|
||||
{
|
||||
switch (reason)
|
||||
{
|
||||
case DLL_PROCESS_ATTACH:
|
||||
break;
|
||||
|
||||
case DLL_PROCESS_DETACH:
|
||||
break;
|
||||
|
||||
case DLL_THREAD_ATTACH:
|
||||
break;
|
||||
|
||||
case DLL_THREAD_DETACH:
|
||||
break;
|
||||
}
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
#endif
|
||||
#endif
|
||||
|
|
|
@ -2,17 +2,17 @@
|
|||
|
||||
# High level rules
|
||||
all :
|
||||
cd SAX; ${MAKE}
|
||||
cd SAX2DOM; ${MAKE}
|
||||
cd XPath; ${MAKE}
|
||||
cd Utils; ${MAKE}
|
||||
${MAKE} --directory=SAX
|
||||
${MAKE} --directory=SAX2DOM
|
||||
${MAKE} --directory=XPath
|
||||
${MAKE} --directory=Utils
|
||||
|
||||
# Cleaning up
|
||||
|
||||
clean :
|
||||
cd SAX; ${MAKE} clean
|
||||
cd SAX2DOM; ${MAKE} clean
|
||||
cd XPath; ${MAKE} clean
|
||||
cd Utils; ${MAKE} clean
|
||||
${MAKE} --directory=SAX clean
|
||||
${MAKE} --directory=SAX2DOM clean
|
||||
${MAKE} --directory=XPath clean
|
||||
${MAKE} --directory=Utils clean
|
||||
|
||||
# End of File
|
||||
|
|
Loading…
Add table
Reference in a new issue