aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorH. Peter Anvin <hpa@zytor.com>2004-06-10 21:00:58 +0000
committerH. Peter Anvin <hpa@zytor.com>2004-06-10 21:00:58 +0000
commit2a5a39841091d5c741806ad10f815aaa614455d6 (patch)
tree089af8a95602ad3de1a489564e489198b7a81faf
parentb8a39ec4987df32fe311097fdc56f5d3ad11fc56 (diff)
downloadklibc-2a5a39841091d5c741806ad10f815aaa614455d6.tar.gz
Support building the syslinux installer with klibc.klibc-0.138
-rw-r--r--syslinux/Makefile13
-rw-r--r--syslinux/Makefile.main45
-rw-r--r--syslinux/README5
3 files changed, 63 insertions, 0 deletions
diff --git a/syslinux/Makefile b/syslinux/Makefile
new file mode 100644
index 0000000000000..9a1de9b8437fa
--- /dev/null
+++ b/syslinux/Makefile
@@ -0,0 +1,13 @@
+SYSDIR = $(wildcard syslinux-[0-9]*)
+
+all:
+ $(MAKE) -C $(SYSDIR) installer
+ $(MAKE) -f Makefile.main
+
+clean:
+ $(MAKE) -f Makefile.main clean
+
+spotless:
+ $(MAKE) -C $(SYSDIR) clean
+ $(MAKE) -f Makefile.main spotless
+
diff --git a/syslinux/Makefile.main b/syslinux/Makefile.main
new file mode 100644
index 0000000000000..15d8f7e8a00d8
--- /dev/null
+++ b/syslinux/Makefile.main
@@ -0,0 +1,45 @@
+SRCROOT = ..
+include ../MCONFIG
+
+SYSDIR = $(wildcard syslinux-[0-9]*)
+
+MAKEDEPS = -Wp,-MD,.$(subst /,-,$*).d
+CFLAGS = $(MAKEDEPS) $(OPTFLAGS) $(REQFLAGS) -W -Wall -DPATCH_OFFSET=`cat $(SYSDIR)/patch.offset`
+LIBS = $(KLIBC) $(LIBGCC)
+PROGS = syslinux syslinux.shared
+OBJS = syslinux-nomtools.o syslxmod.o bootsect_bin.o ldlinux_bin.o
+
+all: $(PROGS)
+
+syslinux: $(OBJS) $(CRT0) $(LIBS)
+ $(LD) $(LDFLAGS) -o $@ $(CRT0) $(OBJS) $(LIBS)
+ cp -f $@ $@.g
+ $(STRIP) $@
+
+syslinux.shared: $(OBJS) $(CRT0) $(LIBS)
+ $(LD) $(LDFLAGS) -o $@ $(EMAIN) $(CRTSHARED) $(OBJS) -R $(LIBSHARED) $(LIBGCC)
+ cp -f $@ $@.g
+ $(STRIP) $@
+
+%.c: $(SYSDIR)/%.c
+ cp -f $< $@
+
+%.h: $(SYSDIR)/%.h
+ cp -f $< $@
+
+$(CRT0) $(LIBS):
+ @echo '*** error: $@ not up to date' || exit 1
+
+clean:
+ $(RM) *.c *.h *.o $(PROGS) core .*.d
+
+spotless: clean
+ $(RM) *~
+
+syslinux-nomtools.o: syslinux-nomtools.c syslinux.h
+
+syslxmod.o: syslxmod.c syslinux.h
+
+ifneq ($(wildcard .*.d),)
+include $(wildcard .*.d)
+endif
diff --git a/syslinux/README b/syslinux/README
new file mode 100644
index 0000000000000..7f975f971c28f
--- /dev/null
+++ b/syslinux/README
@@ -0,0 +1,5 @@
+To build the klibc version of SYSLINUX, extract the SYSLINUX
+distribution into this directory (so it creates a directory called
+syslinux-<version> inside this directory), and type "make".
+
+SYSLINUX version 2.10-pre6 or later is required.