From: Michel Pollet Date: Wed, 23 Feb 2011 17:56:08 +0000 (+0000) Subject: Makefile: Fix for x86_64 X-Git-Tag: v1.0a7~10 X-Git-Url: https://git.htl-mechatronik.at/public/?a=commitdiff_plain;h=c9dcd6ca2f5d129590466cd3f812faf9a7382705;p=sx%2Fsimavr.git Makefile: Fix for x86_64 silly architecture names... Signed-off-by: Michel Pollet --- diff --git a/Makefile.common b/Makefile.common index 022f1f1..bc8e3ba 100644 --- a/Makefile.common +++ b/Makefile.common @@ -26,11 +26,11 @@ # You should have received a copy of the GNU General Public License # along with simavr. If not, see . -# get the first character of what the compiler says it is -ARCH = ${shell $(CC) -dumpmachine | sed 's/\(.\).*/\1/'} +# get the first character of what the compiler says it is, unless it's 'x86_64' doh +ARCH = ${shell $(CC) -dumpmachine | sed -e 's/^x/i/' -e 's/\(.\).*/\1/'} ifeq ($(ARCH), i) -CFLAGS += -mfpmath=sse -msse2 -fPIC +CFLAGS += -mfpmath=sse -msse2 endif CFLAGS += -g --std=gnu99 @@ -46,6 +46,7 @@ else AVR_ROOT := /usr/lib/avr AVR_INC := ${AVR_ROOT} AVR := avr- +CFLAGS += -fPIC endif CC ?= gcc