commit:09ed7fdfdaa09307dfc9256a4e7488fa6cec0a7c
author:Chip Black
committer:Chip Black
date:Sat Nov 23 21:52:41 2013 -0600
parents:8ed87e28887d2ba90a3e1f72de8b83766fb1e93d
Add -fPIC for x86_64; add blerg_auth.a to clean target
diff --git a/Makefile b/Makefile
line changes: +5/-1
index 775276e..eb99c15
--- 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