Sortix now defaults to build the same arch as the host machine.

This commit is contained in:
Jonas 'Sortie' Termansen 2011-12-04 20:13:29 +01:00
parent de70b1804d
commit 84b93044c8
1 changed files with 12 additions and 7 deletions

View File

@ -1,20 +1,25 @@
BITS:=$(shell getconf LONG_BIT)
ifndef CPU ifndef CPU
CPU=x86 ifeq ($(BITS),64)
MFLAGS:=CPU=$(CPU) CPU:=x64
else
CPU:=x86
endif
MFLAGS:=$(MFLAGS) CPU=$(CPU)
endif endif
ifndef O ifndef O
O=-O2 O=-O2
MFLAGS:=0=$(O) MFLAGS:=$(MFLAGS) 0=$(O)
endif endif
ifeq ($(BENCH),1) ifeq ($(BENCH),1)
EXTRAMODULES:=$(EXTRAMODULES) bench EXTRAMODULES:=$(EXTRAMODULES) bench
endif endif
ifndef SYSROOT ifndef SYSROOT
SYSROOT:=$(shell pwd)/sysroot SYSROOT:=$(shell pwd)/sysroot
MFLAGS:=SYSROOT=$(SYSROOT) MFLAGS:=$(MFLAGS) SYSROOT=$(SYSROOT)
endif endif
REMOTE=192.168.2.6 REMOTE=192.168.2.6
@ -56,9 +61,9 @@ everything: all deb iso
everything-all-archs: everything-all-archs:
$(MAKE) clean $(MFLAGS) $(MAKE) clean $(MFLAGS)
$(MAKE) everything CPU=x86 $(MFLAGS) $(MAKE) everything $(MFLAGS) CPU=x86
$(MAKE) clean $(MFLAGS) $(MAKE) clean $(MFLAGS)
$(MAKE) everything CPU=x64 $(MFLAGS) $(MAKE) everything $(MFLAGS) CPU=x64
# Initializing RamDisk # Initializing RamDisk
$(INITRD): suball $(INITRD): suball