silly architecture names...
Signed-off-by: Michel Pollet <buserror@gmail.com>
# You should have received a copy of the GNU General Public License
# along with simavr. If not, see <http://www.gnu.org/licenses/>.
-# 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
AVR_ROOT := /usr/lib/avr
AVR_INC := ${AVR_ROOT}
AVR := avr-
+CFLAGS += -fPIC
endif
CC ?= gcc