Makefile: Add cpu specific definition

We need to figure out what kind of cpu we're
going to run on for bios code.

Suggested-by: Pekka Enberg <penberg@cs.helsinki.fi>
Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
This commit is contained in:
Cyrill Gorcunov
2015-06-01 16:39:39 +01:00
committed by Will Deacon
parent 8b8fb6c724
commit ab7fd4be0c
+9 -1
View File
@@ -20,7 +20,15 @@ OBJS += util.o
OBJS += bios/intfake.o
OBJS += bios/int10.o
CFLAGS += $(CPPFLAGS) -Iinclude -g
uname_M := $(shell uname -m | sed -e s/i.86/i386/)
ifeq ($(uname_M),i386)
DEFINES += -D__x86_32__
ifeq ($(uname_M),x86_64)
DEFINES += -D__x86_64__
endif
endif
CFLAGS += $(CPPFLAGS) $(DEFINES) -Iinclude -g
WARNINGS += -Wall
WARNINGS += -Wcast-align