Add -fPIC for x86_64; add blerg_auth.a to clean target
authorChip Black <bytex64@bytex64.net>
Sun, 24 Nov 2013 03:52:41 +0000 (21:52 -0600)
committerChip Black <bytex64@bytex64.net>
Sat, 29 Mar 2014 03:56:23 +0000 (22:56 -0500)
Makefile

index 775276e..eb99c15 100644 (file)
--- 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)
@@ -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