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
Jonas 'Sortie' Termansen fec176fa15 Refactored the libmaxsi/ directory.
C and C++ files are now kept together and so are the mxmpp declarations.

Header files are now stored in include/ and mxmpp'd into preproc/.

All other code now -I ../libmaxsi/preproc.

And other stuff to make this happen, including refactoring Makefile.
2012-02-12 13:20:53 +01:00

35 lines
665 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)/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