2011-08-22 18:29:59 -04:00
|
|
|
ifndef CPU
|
|
|
|
CPU=x86
|
|
|
|
endif
|
|
|
|
|
|
|
|
ifeq ($(CPU),x86)
|
|
|
|
X86FAMILY=1
|
|
|
|
CPUDEFINES=-DPLATFORM_X86
|
|
|
|
CPUFLAGS=-m32
|
|
|
|
CPULDFLAGS=-melf_i386
|
|
|
|
endif
|
|
|
|
|
|
|
|
ifeq ($(CPU),x64)
|
|
|
|
X86FAMILY=1
|
|
|
|
CPUDEFINES=-DPLATFORM_X64
|
|
|
|
CPUFLAGS=-m64
|
|
|
|
CPULDFLAGS=-melf_x86_64
|
|
|
|
endif
|
|
|
|
|
|
|
|
LIBMAXSIROOT=$(OSROOT)/libmaxsi
|
|
|
|
|
2011-09-13 10:49:08 -04:00
|
|
|
LIBC=$(LIBMAXSIROOT)/start.o $(LIBMAXSIROOT)/libc.a
|
2011-08-22 18:29:59 -04:00
|
|
|
LIBS=$(LIBC)
|
|
|
|
|
2012-03-11 10:08:03 -04:00
|
|
|
CPPFLAGS=$(CPUDEFINES) -U_GNU_SOURCE -Ulinux -Dsortix
|
2011-08-22 18:29:59 -04:00
|
|
|
FLAGS=-nostdinc -nostdlib -fno-builtin -nostartfiles -nodefaultlibs
|
2012-02-11 20:03:34 -05:00
|
|
|
INCLUDES=-I $(LIBMAXSIROOT)/preproc -I $(OSROOT)/
|
2011-08-22 18:29:59 -04:00
|
|
|
|
|
|
|
LD=ld
|
|
|
|
LDFLAGS=$(CPULDFLAGS)
|
|
|
|
CC=gcc
|
|
|
|
CFLAGS=$(CPUFLAGS) $(FLAGS) $(INCLUDES)
|
|
|
|
CXX=g++
|
2012-01-03 15:54:49 -05:00
|
|
|
CXXFLAGS=$(CPUFLAGS) $(FLAGS) $(INCLUDES) -fno-exceptions -fno-rtti
|
2011-08-22 18:29:59 -04:00
|
|
|
|
|
|
|
|