aboutsummaryrefslogtreecommitdiffstats
path: root/core
diff options
context:
space:
mode:
authorH. Peter Anvin <hpa@zytor.com>2008-08-20 15:15:34 -0700
committerH. Peter Anvin <hpa@zytor.com>2008-08-20 15:15:34 -0700
commitbd09a6d828fa492aed4406adde6c412e0e5c640d (patch)
tree660a4813999ba273afb26fd3e137399cb0a57a97 /core
parent6aa3a1c8380276387430684eb39650e958b0030a (diff)
downloadsyslinux-elf-bd09a6d828fa492aed4406adde6c412e0e5c640d.tar.gz
syslinux-elf-bd09a6d828fa492aed4406adde6c412e0e5c640d.tar.xz
syslinux-elf-bd09a6d828fa492aed4406adde6c412e0e5c640d.zip
Major Makefile cleanups; gcc 4.3.0 compatiblity
Cleanup and centralize the Makefile system even more. Fix a gcc 4.3 incompatibility in memdisk (definition of strlen).
Diffstat (limited to 'core')
-rw-r--r--core/Makefile29
1 files changed, 14 insertions, 15 deletions
diff --git a/core/Makefile b/core/Makefile
index 278d7afe..12ff8694 100644
--- a/core/Makefile
+++ b/core/Makefile
@@ -20,25 +20,24 @@ MAKE += -r
topdir = ..
-include $(topdir)/version.mk
+include $(topdir)/MCONFIG
+
+GCCOPT := $(call gcc_ok,-m32,) \
+ $(call gcc_ok,-ffreestanding,) \
+ $(call gcc_ok,-fno-stack-protector,) \
+ $(call gcc_ok,-fno-top-level-reorder,\
+ $(call gcc_ok,-fno-unit-at-a-time)) \
+ -Os -march=i386 -mregparm=3 -DREGPARM=3 -msoft-float \
+ -fomit-frame-pointer \
+ $(call gcc_ok,-falign-functions=0,-malign-functions=0) \
+ $(call gcc_ok,-falign-jumps=0,-malign-jumps=0) \
+ $(call gcc_ok,-falign-loops=0,-malign-loops=0) \
-CC = gcc
-
-TMPFILE = $(shell mktemp /tmp/gcc_ok.XXXXXX)
-gcc_ok = $(shell tmpf=$(TMPFILE); if $(CC) $(1) dummy.c -o $$tmpf 2>/dev/null; \
- then echo '$(1)'; else echo '$(2)'; fi; rm -f $$tmpf)
-
-M32 := $(call gcc_ok,-m32,) $(call gcc_ok,-ffreestanding,) \
- $(call gcc_ok,-fno-stack-protector,) \
- $(call gcc_ok,-fno-top-level-reorder,$(call gcc_ok,-fno-unit-at-a-time))
-
-LD = ld
LDFLAGS = -m elf_i386
-OBJCOPY = objcopy
-OBJDUMP = objdump
-OPTFLAGS = -g -Os -march=i386 -falign-functions=0 -falign-jumps=0 -falign-loops=0 -fomit-frame-pointer
+OPTFLAGS =
INCLUDES =
-CFLAGS = $(M32) -mregparm=3 -DREGPARM=3 -W -Wall -msoft-float $(OPTFLAGS) $(INCLUDES)
+CFLAGS = $(GCCOPT) -W -Wall $(OPTFLAGS) $(INCLUDES)
NASM = nasm
NASMOPT = -O9999