From 13da385aa7f5e9a9f52288fd7735d6dc806fab73 Mon Sep 17 00:00:00 2001 From: Andreas Baumann Date: Sun, 2 Sep 2012 13:07:14 +0200 Subject: prefer dynamic to static linking (linking a non-PIC .a library into a module is illegal, but on Linux!) --- src/GNUmakefile | 23 +++++++++++------------ 1 file changed, 11 insertions(+), 12 deletions(-) (limited to 'src/GNUmakefile') diff --git a/src/GNUmakefile b/src/GNUmakefile index 119ec2b..592a6a0 100755 --- a/src/GNUmakefile +++ b/src/GNUmakefile @@ -23,7 +23,12 @@ INCLUDE_LIBS += \ $(OPENSSL_LIBS) endif -LOCAL_STATIC_LIB_OBJS = \ +DYNAMIC_LIB = libcrawler.so +DYNAMIC_LIB_MAJOR = 0 +DYNAMIC_LIB_MINOR = 0 +DYNAMIC_LIB_PATCH = 0 + +CPP_OBJS = \ Logger.o \ ConsoleLogSink.o \ FileLogSink.o \ @@ -31,23 +36,14 @@ LOCAL_STATIC_LIB_OBJS = \ MIMEType.o \ SpoolRewindInputStream.o -CPP_OBJS = \ - $(LOCAL_STATIC_LIB_OBJS) - -LOCAL_STATIC_LIB = \ - libcrawler.a - CPP_BINS = \ crawl$(EXE) -include $(TOPDIR)/makefiles/gmake/sub.mk -local_all: $(LOCAL_STATIC_LIB) - -$(LOCAL_STATIC_LIB): $(LOCAL_STATIC_LIB_OBJS) - ar rcs $(LOCAL_STATIC_LIB) $(LOCAL_STATIC_LIB_OBJS) +local_all: -modules: $(LOCAL_STATIC_LIB) +modules: $(DYNAMIC_LIB) local_clean: @-rm -f $(LOCAL_STATIC_LIB) @@ -63,3 +59,6 @@ local_uninstall: @-rmdir $(DESTDIR)$(bindir) local_test: + +run: + LD_LIBRARY_PATH=$(TOPDIR)/src:$(TOPDIR)/googleurl:$(TOPDIR)/libfetch:$(TOPDIR)/streamhtmlparser ./crawl -- cgit v1.2.3-54-g00ecf