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 | |
parent | 0b52217d645e3457194d2514f3f52da8c90f6e4b (diff) | |
download | syslinux-e94896af601b2c0458bcf07caf6f7432509c73f1.tar.gz |
Adjust options to work on 64-bit machines, and clean up nuisance warnings
-rw-r--r-- | Makefile | 2 | ||||
-rw-r--r-- | memdisk/Makefile | 22 | ||||
-rw-r--r-- | sample/Makefile | 14 | ||||
-rw-r--r-- | win32/Makefile | 4 |
4 files changed, 26 insertions, 16 deletions
@@ -18,7 +18,7 @@ OSTYPE = $(shell uname -msr) CC = gcc INCLUDE = -CFLAGS = -Wall -O2 -fomit-frame-pointer -D_FILE_OFFSET_BITS=64 +CFLAGS = -W -Wall -Os -fomit-frame-pointer -D_FILE_OFFSET_BITS=64 PIC = -fPIC LDFLAGS = -O2 -s AR = ar diff --git a/memdisk/Makefile b/memdisk/Makefile index df01da2e..e0da72e1 100644 --- a/memdisk/Makefile +++ b/memdisk/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 @@ -13,15 +13,18 @@ VERSION := $(shell cat ../version) -CC = gcc -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 \ +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,) +ALIGN := $(call gcc_ok,-falign-functions=0 -falign-jumps=0 -falign-loops=0,-malign-functions=0 -malign-jumps=0 -malign-loops=0) + +CC = gcc $(M32) +CFLAGS = -g -W -Wall -Os -fomit-frame-pointer -march=i386 $(ALIGN) \ -DVERSION='"$(VERSION)"' -DDATE='"$(DATE)"' LDFLAGS = -g INCLUDE = -I../com32/include -AS = as -LD = ld +LD = ld -m elf_i386 NASM = nasm -O99 NINCLUDE = OBJCOPY = objcopy @@ -51,8 +54,11 @@ spotless: clean %.o: %.asm $(NASM) -f elf -l $*.lst -o $@ $< +%.o: %.s + $(CC) -x assembler -c -o $@ $< + %.o16: %.s16 - $(AS) -o $@ $< + $(CC) -x assembler -c -o $@ $< %.o: %.c $(CC) $(INCLUDE) $(CFLAGS) -c -o $@ $< 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 diff --git a/win32/Makefile b/win32/Makefile index b570d6b6..fd890ec9 100644 --- a/win32/Makefile +++ b/win32/Makefile @@ -23,7 +23,7 @@ ifeq ($(findstring CYGWIN,$(OSTYPE)),CYGWIN) CC = gcc AR = ar RANLIB = ranlib -CFLAGS = -mno-cygwin -Wall -O2 -fomit-frame-pointer -D_FILE_OFFSET_BITS=64 +CFLAGS = -mno-cygwin -W -Wall -O2 -fomit-frame-pointer -D_FILE_OFFSET_BITS=64 PIC = LDFLAGS = -mno-cygwin -O2 -s else @@ -36,7 +36,7 @@ CC = mingw-gcc AR = mingw-ar RANLIB = mingw-ranlib endif -CFLAGS = -Wall -O2 -fomit-frame-pointer -D_FILE_OFFSET_BITS=64 +CFLAGS = -W -Wall -O2 -fomit-frame-pointer -D_FILE_OFFSET_BITS=64 PIC = LDFLAGS = -O2 -s endif |