aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorErwan Velu <erwan.velu@free.fr>2009-02-18 21:18:15 +0100
committerH. Peter Anvin <hpa@zytor.com>2009-02-25 20:58:42 -0800
commit7f64a90cef11d0e2d39589779e41d60c42bf9de4 (patch)
tree07f7a7be9d9c9244eba49b5e98cb3ee9abb88508
parent8b77b4c6007b5b3a749d36a89ee5f48d109fb47d (diff)
downloadsyslinux-7f64a90cef11d0e2d39589779e41d60c42bf9de4.tar.gz
syslinux-7f64a90cef11d0e2d39589779e41d60c42bf9de4.tar.xz
syslinux-7f64a90cef11d0e2d39589779e41d60c42bf9de4.zip
hdt: Moving hdt from sample to its own directory
-rw-r--r--Makefile2
-rw-r--r--hdt/Makefile68
-rw-r--r--hdt/hdt.c (renamed from sample/hdt.c)0
-rw-r--r--sample/Makefile8
4 files changed, 70 insertions, 8 deletions
diff --git a/Makefile b/Makefile
index ffbc48f1..edcfb7e8 100644
--- a/Makefile
+++ b/Makefile
@@ -48,7 +48,7 @@ BOBJECTS = $(BTARGET) \
# Note: libinstaller is both a BSUBDIR and an ISUBDIR. It contains
# files that depend only on the B phase, but may have to be regenerated
# for "make installer".
-BSUBDIRS = codepage core memdisk modules com32 mbr memdump gpxe sample \
+BSUBDIRS = codepage core memdisk modules com32 mbr memdump gpxe sample hdt \
libinstaller dos win32
ITARGET =
IOBJECTS = $(ITARGET) dos/copybs.com \
diff --git a/hdt/Makefile b/hdt/Makefile
new file mode 100644
index 00000000..05492ca0
--- /dev/null
+++ b/hdt/Makefile
@@ -0,0 +1,68 @@
+## -----------------------------------------------------------------------
+##
+## Copyright 2001-2008 H. Peter Anvin - All Rights Reserved
+##
+## This program is free software; you can redistribute it and/or modify
+## it under the terms of the GNU General Public License as published by
+## the Free Software Foundation, Inc., 53 Temple Place Ste 330,
+## Boston MA 02111-1307, USA; either version 2 of the License, or
+## (at your option) any later version; incorporated herein by reference.
+##
+## -----------------------------------------------------------------------
+
+##
+## samples for syslinux users
+##
+
+topdir = ..
+include $(topdir)/MCONFIG.embedded
+
+INCLUDES = -I$(com32)/include
+
+LIBGCC := $(shell $(CC) $(GCCOPT) --print-libgcc)
+LIB = liboldcom32.a
+
+
+com32 = $(topdir)/com32
+C_LIBS = $(com32)/libutil/libutil_com.a $(com32)/lib/libcom32.a $(LIBGCC)
+LDFLAGS = -m elf_i386 -T $(com32)/lib/com32.ld
+
+all: hdt.c32 $(LIB)
+
+.PRECIOUS: %.o
+%.o: %.S
+ $(CC) $(SFLAGS) -c -o $@ $<
+
+.PRECIOUS: %.o
+%.o: %.c
+ $(CC) $(CFLAGS) -c -o $@ $<
+
+.PRECIOUS: %.elf
+%.elf: c32entry.o %.o $(LIB)
+ $(LD) -Ttext 0x101000 -e _start -o $@ $^
+
+hdt.o: hdt.c
+ $(CC) $(CFLAGS) -std=gnu99 -D__COM32__ -I$(topdir)/menu/libmenu/ -c -o $@ $<
+
+hdt.elf: hdt.o $(com32)/modules/cpuid.o $(com32)/modules/dmi.o $(topdir)/menu/libmenu/libmenu.a $(LIB) $(C_LIBS)
+ $(LD) $(LDFLAGS) -o $@ $^
+
+%.c32: %.elf
+ $(OBJCOPY) -O binary $< $@
+
+%.com: %.asm
+ $(NASM) $(NASMOPT) -f bin -o $@ -l $*.lst $<
+
+$(LIB):
+ rm -f $@
+ $(AR) cq $@ $^
+ $(RANLIB) $@
+
+tidy dist:
+ rm -f *.o *.a *.lst *.elf
+
+# Don't specify *.com since mdiskchk.com can't be built using Linux tools
+clean: tidy
+ rm -f *.o *.c32
+
+spotless: clean
diff --git a/sample/hdt.c b/hdt/hdt.c
index 85491527..85491527 100644
--- a/sample/hdt.c
+++ b/hdt/hdt.c
diff --git a/sample/Makefile b/sample/Makefile
index e6a1a92c..e4c4a6d6 100644
--- a/sample/Makefile
+++ b/sample/Makefile
@@ -30,7 +30,7 @@ C_LIBS = $(com32)/libutil/libutil_com.a $(com32)/lib/libcom32.a $(LIBGCC)
LDFLAGS = -m elf_i386 -T $(com32)/lib/com32.ld
all: syslogo.lss comecho.com hello.c32 hello2.c32 filetest.c32 c32echo.c32 \
- fd.c32 hdt.c32 $(LIB)
+ fd.c32 $(LIB)
.PRECIOUS: %.o
%.o: %.S
@@ -44,12 +44,6 @@ all: syslogo.lss comecho.com hello.c32 hello2.c32 filetest.c32 c32echo.c32 \
%.elf: c32entry.o %.o $(LIB)
$(LD) -Ttext 0x101000 -e _start -o $@ $^
-hdt.o: hdt.c
- $(CC) $(CFLAGS) -std=gnu99 -D__COM32__ -I$(topdir)/menu/libmenu/ -c -o $@ $<
-
-hdt.elf: hdt.o $(com32)/modules/cpuid.o $(com32)/modules/dmi.o $(topdir)/menu/libmenu/libmenu.a $(LIB) $(C_LIBS)
- $(LD) $(LDFLAGS) -o $@ $^
-
%.c32: %.elf
$(OBJCOPY) -O binary $< $@