From 38d4d8899db8a01100688dbc748f7abbc392c5b5 Mon Sep 17 00:00:00 2001 From: hpa Date: Sat, 24 Jan 2004 21:10:48 +0000 Subject: Conditionally add -m32 to be able to compile in a 64-bit environment --- memdisk/Makefile | 3 ++- sample/Makefile | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/memdisk/Makefile b/memdisk/Makefile index 9866db26..df01da2e 100644 --- a/memdisk/Makefile +++ b/memdisk/Makefile @@ -14,7 +14,8 @@ VERSION := $(shell cat ../version) CC = gcc -CFLAGS = -g -Wall -O2 -fomit-frame-pointer -march=i386 \ +M32 = $(shell if gcc -m32 -c -x c /dev/null -o /dev/null 2>/dev/null; then echo -m32 ; fi) +CFLAGS = $(M32) -g -Wall -O2 -fomit-frame-pointer -march=i386 \ -malign-functions=0 -malign-jumps=0 -malign-loops=0 \ -DVERSION='"$(VERSION)"' -DDATE='"$(DATE)"' LDFLAGS = -g diff --git a/sample/Makefile b/sample/Makefile index 8a2eb6de..8f81bdd9 100644 --- a/sample/Makefile +++ b/sample/Makefile @@ -20,7 +20,8 @@ LD = ld AR = ar NASM = nasm RANLIB = ranlib -CFLAGS = -march=i386 -O2 -fomit-frame-pointer -I../com32/include +M32 = $(shell if gcc -m32 -c -x c /dev/null -o /dev/null 2>/dev/null; then echo -m32 ; fi) +CFLAGS = $(M32) -march=i386 -O2 -fomit-frame-pointer -I../com32/include SFLAGS = -march=i386 LDFLAGS = -s OBJCOPY = objcopy -- cgit v1.2.1