aboutsummaryrefslogtreecommitdiffstats
path: root/sample/Makefile
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 /sample/Makefile
parent6aa3a1c8380276387430684eb39650e958b0030a (diff)
downloadsyslinux.git-bd09a6d828fa492aed4406adde6c412e0e5c640d.tar.gz
syslinux.git-bd09a6d828fa492aed4406adde6c412e0e5c640d.tar.xz
syslinux.git-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 'sample/Makefile')
-rw-r--r--sample/Makefile25
1 files changed, 6 insertions, 19 deletions
diff --git a/sample/Makefile b/sample/Makefile
index d10b5ed1..d9df4582 100644
--- a/sample/Makefile
+++ b/sample/Makefile
@@ -14,28 +14,15 @@
## samples for syslinux users
##
-TMPFILE = $(shell mktemp /tmp/gcc_ok.XXXXXX)
+topdir = ..
+include $(topdir)/MCONFIG
-CC = gcc
-
-gcc_ok = $(shell tmpf=$(TMPFILE); if $(CC) $(1) -c -x c /dev/null -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,)
-
-LD = ld -m elf_i386
-AR = ar
-NASM = nasm
-NASMOPT = -O9999
-RANLIB = ranlib
-CFLAGS = $(M32) -W -Wall -march=i386 -Os -fomit-frame-pointer -I../com32/include
-SFLAGS = $(M32) -march=i386
+LD += -m elf_i386
+CFLAGS = $(GCCOPT) -W -Wall -I$(topdir)/com32/include
+SFLAGS = $(GCCOPT)
LDFLAGS = -s
-OBJCOPY = objcopy
-PPMTOLSS16 = ../utils/ppmtolss16
+PPMTOLSS16 = $(topdir)/utils/ppmtolss16
LIB = liboldcom32.a
-GZIPPROG = gzip
-PNGTOPNM = pngtopnm
LIBOBJS = conio.o atou.o skipatou.o printf.o c32exit.o