diff options
Diffstat (limited to 'sample/Makefile')
-rw-r--r-- | sample/Makefile | 25 |
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 |