aboutsummaryrefslogtreecommitdiffstats
path: root/mtools
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 /mtools
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 'mtools')
-rw-r--r--mtools/Makefile16
1 files changed, 5 insertions, 11 deletions
diff --git a/mtools/Makefile b/mtools/Makefile
index 9e9e5114..b0f0a194 100644
--- a/mtools/Makefile
+++ b/mtools/Makefile
@@ -1,16 +1,10 @@
-TMPFILE = $(shell mktemp /tmp/gcc_ok.XXXXXX)
+topdir = ..
+include $(topdir)/MCONFIG
-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)
-
-comma := ,
-LDHASH := $(call gcc_ok,-Wl$(comma)--hash-style=both,)
-
-CC = gcc
OPTFLAGS = -g -Os
INCLUDES = -I. -I.. -I../libfat -I../libinstaller
CFLAGS = -W -Wall -D_FILE_OFFSET_BITS=64 $(OPTFLAGS) $(INCLUDES)
-LDFLAGS = $(LDHASH) -s
+LDFLAGS = -s
SRCS = syslinux.c \
../libinstaller/syslxmod.c \
@@ -26,7 +20,7 @@ VPATH = .:../libfat:../libinstaller
all: installer
tidy dist:
- -rm -f *.o *.i *.s *.a .*.d
+ -rm -f *.o *.i *.s *.a .*.d *.tmp
clean: tidy
-rm -f syslinux
@@ -46,4 +40,4 @@ syslinux: $(OBJS)
%.s: %.c
$(CC) $(CFLAGS) -S -o $@ $<
--include .*.d
+-include .*.d *.tmp