1
0
Fork 0
mirror of https://gitlab.com/sortix/sortix.git synced 2023-02-13 20:55:38 -05:00
sortix--sortix/crosscompilemakefile.mak
2011-08-23 21:02:00 +02:00

35 lines
622 B
Makefile

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
LIBC=$(LIBMAXSIROOT)/libc.a $(LIBMAXSIROOT)/start.o
LIBS=$(LIBC)
CPPFLAGS=$(CPUDEFINES)
FLAGS=-nostdinc -nostdlib -fno-builtin -nostartfiles -nodefaultlibs
INCLUDES=-I $(LIBMAXSIROOT)/c/h/ -I $(OSROOT)/
LD=ld
LDFLAGS=$(CPULDFLAGS)
CC=gcc
CFLAGS=$(CPUFLAGS) $(FLAGS) $(INCLUDES)
CXX=g++
CXXFLAGS=$(CPUFLAGS) $(FLAGS) $(INCLUDES)