summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndreas Baumann <abaumann@yahoo.com>2012-09-07 16:38:44 +0200
committerAndreas Baumann <abaumann@yahoo.com>2012-09-07 16:38:44 +0200
commit26310b6ff3b4cb92cc9bb462536a9c5235fc3389 (patch)
treeeb7cb931ba1c512b217ae138eafb4776a9c614e2
parent4cb96d5377df049bd49bb6c0a109d89fcbd015ff (diff)
downloadcrawler-26310b6ff3b4cb92cc9bb462536a9c5235fc3389.tar.gz
crawler-26310b6ff3b4cb92cc9bb462536a9c5235fc3389.tar.bz2
added a libutil for porting stuff and helpers
-rwxr-xr-xinclude/util/win32/errormsg.hpp (renamed from include/crawler/win32/errormsg.hpp)0
-rwxr-xr-xinclude/util/win32/stringutils.hpp (renamed from include/crawler/win32/stringutils.hpp)0
-rwxr-xr-xsrc/GNUmakefile2
-rwxr-xr-xsrc/Makefile.W322
-rwxr-xr-xsrc/libutil/GNUmakefile37
-rwxr-xr-xsrc/libutil/Makefile.W3249
-rwxr-xr-xsrc/libutil/win32/errormsg.cpp (renamed from src/libcrawler/win32/errormsg.cpp)0
-rwxr-xr-xsrc/libutil/win32/stringutils.cpp (renamed from src/libcrawler/win32/stringutils.cpp)0
8 files changed, 88 insertions, 2 deletions
diff --git a/include/crawler/win32/errormsg.hpp b/include/util/win32/errormsg.hpp
index f1ceb93..f1ceb93 100755
--- a/include/crawler/win32/errormsg.hpp
+++ b/include/util/win32/errormsg.hpp
diff --git a/include/crawler/win32/stringutils.hpp b/include/util/win32/stringutils.hpp
index b0404cd..b0404cd 100755
--- a/include/crawler/win32/stringutils.hpp
+++ b/include/util/win32/stringutils.hpp
diff --git a/src/GNUmakefile b/src/GNUmakefile
index d6b684e..448253e 100755
--- a/src/GNUmakefile
+++ b/src/GNUmakefile
@@ -1,6 +1,6 @@
TOPDIR = ..
-SUBDIRS = logger libcrawler modules crawl
+SUBDIRS = libutil logger libcrawler modules crawl
-include $(TOPDIR)/makefiles/gmake/sub.mk
diff --git a/src/Makefile.W32 b/src/Makefile.W32
index f3702cf..782805a 100755
--- a/src/Makefile.W32
+++ b/src/Makefile.W32
@@ -1,6 +1,6 @@
TOPDIR = ..
-SUBDIRS = logger libcrawler modules crawl
+SUBDIRS = libutil logger libcrawler modules crawl
!INCLUDE $(TOPDIR)\makefiles\nmake\sub.mk
diff --git a/src/libutil/GNUmakefile b/src/libutil/GNUmakefile
new file mode 100755
index 0000000..9bb47f5
--- /dev/null
+++ b/src/libutil/GNUmakefile
@@ -0,0 +1,37 @@
+TOPDIR = ../..
+
+SUBDIRS =
+
+-include $(TOPDIR)/makefiles/gmake/platform.mk
+
+INCLUDE_CPPFLAGS = \
+
+INCLUDE_LDFLAGS = \
+
+INCLUDE_DIRS = \
+ -I$(TOPDIR)/include/util
+
+INCLUDE_LIBS = \
+
+STATIC_LIB = libutil.a
+
+DYNAMIC_LIB = libutil.so
+DYNAMIC_LIB_MAJOR = 0
+DYNAMIC_LIB_MINOR = 0
+DYNAMIC_LIB_PATCH = 0
+
+CPP_OBJS = \
+
+-include $(TOPDIR)/makefiles/gmake/sub.mk
+
+local_all:
+
+local_clean:
+
+local_distclean:
+
+local_install:
+
+local_uninstall:
+
+local_test:
diff --git a/src/libutil/Makefile.W32 b/src/libutil/Makefile.W32
new file mode 100755
index 0000000..2a5630f
--- /dev/null
+++ b/src/libutil/Makefile.W32
@@ -0,0 +1,49 @@
+TOPDIR = ..\..
+
+SUBDIRS =
+
+!INCLUDE $(TOPDIR)\makefiles\nmake\platform.mk
+
+INCLUDE_CXXFLAGS = \
+ /D_WIN32_WINNT=0x504 \
+ /DBUILDING_UTIL
+
+INCLUDE_DIRS = \
+ /I. \
+ /I$(TOPDIR)\include\util
+
+INCLUDE_LDFLAGS = \
+
+INCLUDE_LIBS = \
+
+CPP_OBJS = \
+ win32\errormsg.obj \
+ win32\stringutils.obj
+
+DYNAMIC_CPP_OBJS = \
+ win32\errormsg.dllobj \
+ win32\stringutils.dllobj
+
+STATIC_LIB = \
+ utilstatic.lib
+
+DYNAMIC_LIB = \
+ util.dll
+
+!INCLUDE $(TOPDIR)\makefiles\nmake\sub.mk
+
+$(DYNAMIC_LIB): $(DYNAMIC_CPP_OBJS)
+ $(LINK) /nologo /dll /out:$@ $(LDFLAGS) $(LIBS) $?
+
+$(STATIC_LIB): $(CPP_OBJS)
+ $(LINK) /lib /nologo /out:$@ $(STATIC_LDFLAGS) $(LIBS) $?
+
+local_all: $(DYNAMIC_LIB) $(STATIC_LIB)
+
+local_clean:
+ @-erase $(DYNAMIC_LIB) $(STATIC_LIB) 2>NUL
+ @-erase win32\*.obj win32\*.dllobj 2>NUL
+
+local_distclean:
+
+local_test:
diff --git a/src/libcrawler/win32/errormsg.cpp b/src/libutil/win32/errormsg.cpp
index c0a65d8..c0a65d8 100755
--- a/src/libcrawler/win32/errormsg.cpp
+++ b/src/libutil/win32/errormsg.cpp
diff --git a/src/libcrawler/win32/stringutils.cpp b/src/libutil/win32/stringutils.cpp
index 607735c..607735c 100755
--- a/src/libcrawler/win32/stringutils.cpp
+++ b/src/libutil/win32/stringutils.cpp