--- ./dmd2/src/druntime/posix.mak.orig 2011-02-19 10:06:22.000000000 +0200 +++ ./dmd2/src/druntime/posix.mak 2011-02-19 10:38:16.673333400 +0200 @@ -8,16 +8,16 @@ DOCDIR=doc IMPDIR=import -MODEL=32 +MODEL?=32 DFLAGS=-m$(MODEL) -O -release -inline -nofloat -w -d -Isrc -Iimport UDFLAGS=-m$(MODEL) -O -release -nofloat -w -d -Isrc -Iimport CFLAGS=-m$(MODEL) -O -OBJDIR=obj +OBJDIR=obj$(MODEL) DRUNTIME_BASE=druntime -DRUNTIME=lib/lib$(DRUNTIME_BASE).a +DRUNTIME=lib$(MODEL)/lib$(DRUNTIME_BASE).a DOCFMT= --- ./dmd2/src/phobos/linux.mak.orig 2011-02-19 10:22:02.156666734 +0200 +++ ./dmd2/src/phobos/linux.mak 2011-02-19 10:32:16.750000067 +0200 @@ -21,12 +21,18 @@ # # OS can be posix, win32, win32remote, win32wine, or osx OS = posix +MODEL ?= 32 + +ifeq (,$(findstring $(MODEL),32 64)) +$(error "MODEL=$(MODEL) isn't supported") +endif + # Configurable stuff that's rarely edited DRUNTIME_PATH = ../druntime ZIPFILE = phobos.zip ROOT_OF_THEM_ALL = generated -ROOT = $(ROOT_OF_THEM_ALL)/$(OS)/$(BUILD) +ROOT = $(ROOT_OF_THEM_ALL)/$(OS)/$(BUILD)$(MODEL) # Documentation-related stuff DOCSRC = ../docsrc DOC_OUTPUT_DIR = ../web/2.0/phobos @@ -51,8 +57,11 @@ # Set DRUNTIME name and full path ifeq (,$(findstring win,$(OS))) - DRUNTIME = $(DRUNTIME_PATH)/lib/libdruntime.a + DRUNTIME = $(DRUNTIME_PATH)/lib$(MODEL)/libdruntime.a else +ifneq ($(MODEL),32) +$(error "Anything except of Win32 isn't supported?") +endif DRUNTIME = $(DRUNTIME_PATH)/lib/druntime.lib endif @@ -76,7 +85,7 @@ # Set CFLAGS ifeq ($(OS),posix) - CFLAGS += -m32 + CFLAGS += -m$(MODEL) ifeq ($(BUILD),debug) CFLAGS += -g else