summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--GNUmakefile6
-rw-r--r--makefiles/gmake/platform.mk2
-rwxr-xr-xsrc/GNUmakefile2
-rwxr-xr-xsrc/crawl/GNUmakefile8
-rwxr-xr-xsrc/libcrawler/GNUmakefile1
-rwxr-xr-xsrc/libluaglue/GNUmakefile4
-rw-r--r--src/modules/fetcher/GNUmakefile6
-rw-r--r--tests/GNUmakefile10
-rw-r--r--tests/url/GNUmakefile3
-rwxr-xr-xtests/url/exec_test2
10 files changed, 36 insertions, 8 deletions
diff --git a/GNUmakefile b/GNUmakefile
index 8c83b3e..c999cb7 100644
--- a/GNUmakefile
+++ b/GNUmakefile
@@ -1,6 +1,6 @@
TOPDIR = .
-SUBDIRS = libfetch googleurl streamhtmlparser src tests
+SUBDIRS = googleurl streamhtmlparser src tests
ifeq ($(WITH_LOCAL_SQLITE),1)
SUBDIRS += sqlite3
@@ -10,6 +10,10 @@ ifeq ($(WITH_LUA),1)
SUBDIRS := lua tolua $(SUBDIRS)
endif
+ifeq ($(WITH_LOCAL_LIBFETCH),1)
+SUBDIRS := libfetch
+endif
+
PACKAGE_NAME = crawler
PACKAGE_VERSION = 0.0.1
diff --git a/makefiles/gmake/platform.mk b/makefiles/gmake/platform.mk
index 7a98051..03cf70a 100644
--- a/makefiles/gmake/platform.mk
+++ b/makefiles/gmake/platform.mk
@@ -367,6 +367,6 @@ TOLUA_DIR = $(TOPDIR)/tolua
LUA_DIR = $(TOPDIR)/lua
TOLUA = LD_LIBRARY_PATH=$(LUA_DIR)/src $(TOLUA_DIR)/bin/tolua
TOLUA_INCLUDES = -I$(TOLUA_DIR)/include -I$(LUA_DIR)/src
-TOLUA_LDFLAGS =
+TOLUA_LDFLAGS = -L$(LUA_DIR)/src
TOLUA_LIBS = $(TOLUA_DIR)/lib/libtolua.a
endif
diff --git a/src/GNUmakefile b/src/GNUmakefile
index 9bd6fe4..36e98b1 100755
--- a/src/GNUmakefile
+++ b/src/GNUmakefile
@@ -22,7 +22,7 @@ VALKYRIE=valkyrie
PERFCHECK=${HOME}/scripts/qcachegrind.sh
-LD_LIBRARY_PATH=$(TOPDIR)/src:$(TOPDIR)/src/libutil:$(TOPDIR)/src/liblogger:$(TOPDIR)/src/libcrawler:$(TOPDIR)/googleurl:$(TOPDIR)/libfetch:$(TOPDIR)/streamhtmlparser:$(TOPDIR)/src/libluaglue
+LD_LIBRARY_PATH=$(TOPDIR)/src:$(TOPDIR)/src/libutil:$(TOPDIR)/src/liblogger:$(TOPDIR)/src/libcrawler:$(TOPDIR)/googleurl:$(TOPDIR)/libfetch:$(TOPDIR)/streamhtmlparser:$(TOPDIR)/src/libluaglue:$(TOPDIR)/lua/src
run:
LD_LIBRARY_PATH=$(LD_LIBRARY_PATH) $(TOPDIR)/src/crawl/crawl $(TOPDIR)/src/crawl/crawl.conf
diff --git a/src/crawl/GNUmakefile b/src/crawl/GNUmakefile
index 778a72a..5c99362 100755
--- a/src/crawl/GNUmakefile
+++ b/src/crawl/GNUmakefile
@@ -36,7 +36,13 @@ endif
ifeq ($(WITH_LUA),1)
INCLUDE_CXXFLAGS += \
- -DWITH_LUA
+ -DWITH_LUA \
+ -I$(TOPDIR)/lua/src
+endif
+
+ifeq ($(WITH_LUA),1)
+INCLUDE_LDFLAGS += \
+ -L$(TOPDIR)/lua/src
endif
CPP_OBJS = \
diff --git a/src/libcrawler/GNUmakefile b/src/libcrawler/GNUmakefile
index e337c4f..a74d128 100755
--- a/src/libcrawler/GNUmakefile
+++ b/src/libcrawler/GNUmakefile
@@ -34,6 +34,7 @@ INCLUDE_LIBS = \
ifeq ($(WITH_LUA),1)
INCLUDE_LIBS += \
+ -L$(TOPDIR)/lua/src \
-llua \
$(TOLUA_LIBS)
endif
diff --git a/src/libluaglue/GNUmakefile b/src/libluaglue/GNUmakefile
index c39d741..076d1cc 100755
--- a/src/libluaglue/GNUmakefile
+++ b/src/libluaglue/GNUmakefile
@@ -7,12 +7,14 @@ SUBDIRS =
INCLUDE_CPPFLAGS = \
INCLUDE_LDFLAGS = \
+ -L$(TOPDIR)/lua/src
INCLUDE_DIRS = \
-I. \
-I$(TOPDIR)/include \
-I$(TOPDIR)/include/luaglue \
- -I$(TOPDIR)/include/util
+ -I$(TOPDIR)/include/util \
+ -I$(TOPDIR)/lua/src
INCLUDE_LIBS = \
diff --git a/src/modules/fetcher/GNUmakefile b/src/modules/fetcher/GNUmakefile
index feb638c..d4f3684 100644
--- a/src/modules/fetcher/GNUmakefile
+++ b/src/modules/fetcher/GNUmakefile
@@ -1,11 +1,15 @@
TOPDIR = ../../..
-SUBDIRS = libfetch file
+SUBDIRS = file
ifeq ($(WITH_CURL),1)
SUBDIRS += libcurl
endif
+ifeq ($(WITH_LIBFETCH),1)
+SUBDIRS += libfetch
+endif
+
-include $(TOPDIR)/makefiles/gmake/sub.mk
local_all:
diff --git a/tests/GNUmakefile b/tests/GNUmakefile
index e80f114..34ae488 100644
--- a/tests/GNUmakefile
+++ b/tests/GNUmakefile
@@ -1,13 +1,21 @@
TOPDIR = ..
SUBDIRS = \
- utils logger modules url streamhtmlparser libfetch psql sqlite typedetect \
+ utils logger modules url streamhtmlparser psql typedetect \
fetcher textwolf
+ifeq ($(WITH_SQLITE3),1)
+SUBDIRS += sqlite
+endif
+
ifeq ($(WITH_CURL),1)
SUBDIRS += libcurlpp
endif
+ifeq ($(WITH_LIBFETCH),1)
+SUBDIRS += libfetch
+endif
+
ifeq ($(WITH_LUA),1)
SUBDIRS += tolua
endif
diff --git a/tests/url/GNUmakefile b/tests/url/GNUmakefile
index 60ec5cf..f2bbd0c 100644
--- a/tests/url/GNUmakefile
+++ b/tests/url/GNUmakefile
@@ -22,6 +22,9 @@ endif
ifeq ($(WITH_LUA),1)
INCLUDE_CXXFLAGS += \
-DWITH_LUA
+
+INCLUDE_LDFLAGS += \
+ -L$(TOPDIR)/lua/src
endif
INCLUDE_LDFLAGS = \
diff --git a/tests/url/exec_test b/tests/url/exec_test
index ea433da..ebc0d48 100755
--- a/tests/url/exec_test
+++ b/tests/url/exec_test
@@ -8,5 +8,5 @@ TITLE=$1
shift
printf "$ID: $TITLE .. "
-LD_LIBRARY_PATH=../../src:../../src/liblogger:../../src/libcrawler:../../googleurl:../../src/libluaglue:../../src/libutil ./$BINARY $* >$ID.RES 2>&1
+LD_LIBRARY_PATH=../../src:../../src/liblogger:../../src/libcrawler:../../googleurl:../../src/libluaglue:../../src/libutil:../../lua/src ./$BINARY $* >$ID.RES 2>&1
diff $ID.MUST $ID.RES > $ID.DIFF && printf "OK\n" || printf "ERROR\n"