summaryrefslogtreecommitdiff
path: root/src/libcrawler
diff options
context:
space:
mode:
authorAndreas Baumann <mail@andreasbaumann.cc>2014-10-09 15:49:49 +0200
committerAndreas Baumann <mail@andreasbaumann.cc>2014-10-09 15:49:49 +0200
commit3fc6e3cf5b586640a057e3f8335605c2bf5784ec (patch)
tree5d8029190edfd1c1fd6d93359c517bea32a2a08e /src/libcrawler
parent5c37d14e53c729c10d87849408058031d96d51f1 (diff)
downloadcrawler-3fc6e3cf5b586640a057e3f8335605c2bf5784ec.tar.gz
crawler-3fc6e3cf5b586640a057e3f8335605c2bf5784ec.tar.bz2
first running lua code with URL normalization, cleanup needed..
Diffstat (limited to 'src/libcrawler')
-rwxr-xr-xsrc/libcrawler/GNUmakefile25
-rw-r--r--src/libcrawler/URL.pkg32
2 files changed, 57 insertions, 0 deletions
diff --git a/src/libcrawler/GNUmakefile b/src/libcrawler/GNUmakefile
index e28b916..d546058 100755
--- a/src/libcrawler/GNUmakefile
+++ b/src/libcrawler/GNUmakefile
@@ -8,14 +8,31 @@ INCLUDE_CPPFLAGS = \
INCLUDE_LDFLAGS = \
+ifeq ($(WITH_LUA),1)
+INCLUDE_LDFLAGS += \
+ $(TOLUA_LDFLAGS)
+endif
+
INCLUDE_DIRS = \
-I. \
-I$(TOPDIR)/include/logger \
-I$(TOPDIR)/include/util \
-I$(TOPDIR)/include/crawler
+ifeq ($(WITH_LUA),1)
+INCLUDE_DIRS += \
+ -I$(TOPDIR)/include/luaglue \
+ $(TOLUA_INCLUDES)
+endif
+
INCLUDE_LIBS = \
+ifeq ($(WITH_LUA),1)
+INCLUDE_LIBS += \
+ -llua \
+ $(TOLUA_LIBS)
+endif
+
STATIC_LIB = libcrawler.a
DYNAMIC_LIB = libcrawler.so
@@ -28,8 +45,16 @@ CPP_OBJS = \
MIMEType.o \
SpoolRewindInputStream.o
+ifeq ($(WITH_LUA),1)
+CPP_OBJS += \
+ URLLua.o
+endif
+
-include $(TOPDIR)/makefiles/gmake/sub.mk
+URLLua.cpp: URL.pkg
+ $(TOLUA) -H URLLua.hpp -o URLLua.cpp URL.pkg
+
local_all:
local_clean:
diff --git a/src/libcrawler/URL.pkg b/src/libcrawler/URL.pkg
new file mode 100644
index 0000000..d27288d
--- /dev/null
+++ b/src/libcrawler/URL.pkg
@@ -0,0 +1,32 @@
+$#include "URL.hpp"
+
+$using namespace std;
+
+class URL
+{
+ URL( ) {}
+
+ URL( const URL& url ) {}
+
+ URL( const std::string _protocol, const std::string _host, const unsigned short _port, const std::string _path, const std::string _query, const std::string _fragment ) {}
+
+ const string protocol( ) const {}
+
+ const string host( ) const {}
+
+ unsigned short port( ) const {}
+
+ const string path( ) const {}
+
+ const string query( ) const {}
+
+ std::string fragment( ) const {}
+
+ std::string str( ) const {}
+
+ static URL Null;
+
+ bool operator==( const URL &other ) const {}
+
+ bool operator<( const URL &other ) const {}
+};