diff options
author | hpa <hpa> | 2004-01-24 21:37:22 +0000 |
---|---|---|
committer | hpa <hpa> | 2004-01-24 21:37:22 +0000 |
commit | e94896af601b2c0458bcf07caf6f7432509c73f1 (patch) | |
tree | 7bce5db8b7cc8e499d7fb23bf47875e18e218ff5 /sample | |
parent | 0b52217d645e3457194d2514f3f52da8c90f6e4b (diff) | |
download | syslinux-e94896af601b2c0458bcf07caf6f7432509c73f1.tar.gz |
Adjust options to work on 64-bit machines, and clean up nuisance warnings
Diffstat (limited to 'sample')
-rw-r--r-- | sample/Makefile | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/sample/Makefile b/sample/Makefile index 8f81bdd9..cdaabff8 100644 --- a/sample/Makefile +++ b/sample/Makefile @@ -1,7 +1,7 @@ #ident "$Id$" ## ----------------------------------------------------------------------- ## -## Copyright 2001 H. Peter Anvin - All Rights Reserved +## Copyright 2001-2004 H. Peter Anvin - All Rights Reserved ## ## This program is free software; you can redistribute it and/or modify ## it under the terms of the GNU General Public License as published by @@ -15,13 +15,17 @@ ## samples for syslinux users ## -CC = gcc -LD = ld +gcc_ok = $(shell if gcc $(1) -c -x c /dev/null -o /dev/null 2>/dev/null; \ + then echo $(1); else echo $(2); fi) + +M32 := $(call gcc_ok,-m32,) + +CC = gcc $(M32) +LD = ld -m elf_i386 AR = ar NASM = nasm RANLIB = ranlib -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 +CFLAGS = -W -Wall -march=i386 -Os -fomit-frame-pointer -I../com32/include SFLAGS = -march=i386 LDFLAGS = -s OBJCOPY = objcopy |