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

36 lines
665 B
Makefile
Raw Normal View History

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