summaryrefslogtreecommitdiff
path: root/sample/Makefile
diff options
context:
space:
mode:
authorErwan Velu <erwan.velu@free.fr>2009-02-09 23:21:39 +0100
committerH. Peter Anvin <hpa@zytor.com>2009-02-25 20:58:39 -0800
commit3fba9b8036423fc7a25a8c43e5d136b4f7ceadbc (patch)
treed4c01a213cfaf292702bbf7d1697ae94718cbc5d /sample/Makefile
parentab51f7bd138f306075b03f8cd3dbb0cb6448bfb3 (diff)
downloadsyslinux-3fba9b8036423fc7a25a8c43e5d136b4f7ceadbc.tar.gz
hdt: First release
Diffstat (limited to 'sample/Makefile')
-rw-r--r--sample/Makefile13
1 files changed, 12 insertions, 1 deletions
diff --git a/sample/Makefile b/sample/Makefile
index 8560b3e1..d1147e06 100644
--- a/sample/Makefile
+++ b/sample/Makefile
@@ -20,12 +20,17 @@ include $(topdir)/MCONFIG.embedded
INCLUDES = -I$(com32)/include
PPMTOLSS16 = $(topdir)/utils/ppmtolss16
+LIBGCC := $(shell $(CC) $(GCCOPT) --print-libgcc)
LIB = liboldcom32.a
LIBOBJS = conio.o atou.o skipatou.o printf.o c32exit.o
+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: syslogo.lss comecho.com hello.c32 hello2.c32 filetest.c32 c32echo.c32 \
- fd.c32 $(LIB)
+ fd.c32 hdt.c32 $(LIB)
.PRECIOUS: %.o
%.o: %.S
@@ -39,6 +44,12 @@ 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) -I$(topdir)/menu/libmenu/ -c -o $@ $<
+
+hdt.elf: hdt.o $(com32)/modules/cpuid.o $(topdir)/menu/libmenu/libmenu.a $(LIB) $(C_LIBS)
+ $(LD) $(LDFLAGS) -o $@ $^
+
%.c32: %.elf
$(OBJCOPY) -O binary $< $@