X-Git-Url: http://git.bytex64.net/?a=blobdiff_plain;f=Makefile;h=e305aaa90fc561b2eec3783e85780386b927df99;hb=0647b76522be38edfe4b1fbae32addbbf8bb4128;hp=775276e8f7c619061086738b481905a2a1b6ae87;hpb=0633c5ed9ca5302ba9ff0eb9050bc23f1173e38a;p=blerg.git diff --git a/Makefile b/Makefile index 775276e..e305aaa 100644 --- a/Makefile +++ b/Makefile @@ -1,6 +1,10 @@ include libs.mk +ARCH=$(shell uname -m) CFLAGS ?= -g +ifeq ($(ARCH),x86_64) + CFLAGS += -fPIC +endif INCLUDES = -I. -Idatabase -Icommon -Ibuilddeps/scrypt-1.1.6/lib/crypto $(YAJL_INCLUDES) HTTP_INCLUDES = -Ihttp $(MHD_INCLUDES) CGI_INCLUDES = -Icgi $(CGI_UTIL_INCLUDES) @@ -9,7 +13,7 @@ HTTP_LIBDIRS = $(MHD_LIBDIR) $(YAJL_LIBDIR) CGI_LIBDIRS = $(CGI_UTIL_LIBDIR) $(YAJL_LIBDIR) targets = blerg.a blerg_auth.a blergtool blerglatest blerg.cgi www/build/enyo-blerg.js -blerg_a_objects = database/database.o database/tags.o database/util.o database/subscription.o common/stringbucket.o +blerg_a_objects = database/database.o database/tags.o database/util.o database/configuration.o database/subscription.o common/stringbucket.o blerg_auth_a_objects = common/auth.o common/md5.o blergtool_objects = tools/blergtool.o blerg.a blerglatest_objects = tools/blerglatest.o blerg.a common/json.o @@ -19,7 +23,7 @@ cgi_blerg_objects = cgi/cgi_blerg.o cgi/canned_responses.o common/app.o common/j all: $(targets) clean: - rm -f $(targets) $(blerg_a_objects) $(blergtool_objects) $(blerglatest_objects) $(http_blerg_objects) $(cgi_blerg_objects) builddeps/*.a + rm -f $(targets) $(blerg_a_objects) $(blerg_auth_a_objects) $(blergtool_objects) $(blerglatest_objects) $(http_blerg_objects) $(cgi_blerg_objects) builddeps/*.a @make -C builddeps/scrypt-1.1.6 distclean @make -C builddeps/scrypt-1.1.6/lib/crypto clean @@ -58,5 +62,5 @@ builddeps/scrypt-1.1.6/config.h: cd builddeps/scrypt-1.1.6 && ./configure builddeps/scrypt.a: builddeps/scrypt-1.1.6/config.h - make -C builddeps/scrypt-1.1.6/lib/crypto + make -C builddeps/scrypt-1.1.6/lib/crypto CFLAGS="$(CFLAGS)" cp builddeps/scrypt-1.1.6/lib/crypto/scrypt.a builddeps/