Permalink
Browse files

Update Makefile to add support for 64-bit architecture

  • Loading branch information...
1 parent 711df4b commit e8a85c3299334f06189f169d9cd093861ca85ae1 @marcelon marcelon committed Dec 6, 2012
Showing with 5 additions and 0 deletions.
  1. +5 −0 Make.rules
View
@@ -1,5 +1,7 @@
#.SILENT:
# Sufix and prefix
+ARCH := $(shell getconf LONG_BIT)
+
LIBSUFFIX=a
LIBPREFIX=lib
@@ -33,6 +35,9 @@ objs := $(foreach dir, $(MAKELIBS), $(wildcard $(BUILD_OBJ_DIR)/$(dir)/*.o))
endif
ifneq (,$(LIBDEP))
+ifeq ($(ARCH),64)
+CPPFLAGS += -fPIC
+endif
lib_objs := $(patsubst %.$(SOURCE_SUFIX),%.o, \
$(addprefix $(BUILD_OBJ_DIR)/$(notdir $(CURDIR))/,$(SOURCE_FILES)))
endif

0 comments on commit e8a85c3

Please sign in to comment.