aboutsummaryrefslogtreecommitdiffstats
path: root/com32/hdt/Makefile
diff options
context:
space:
mode:
authorGert Hulselmans <kimmik999999@yahoo.co.uk>2009-10-04 22:17:41 +0200
committerErwan Velu <erwan.velu@free.fr>2009-10-04 22:17:41 +0200
commit16b37fe2266c920087f88cdec94243b71218d871 (patch)
treeffb419a73f66f43789f6cf32920b2e533148953b /com32/hdt/Makefile
parent5aeb4beef6c4d5004babd463a2fb5b02af2b4df4 (diff)
downloadsyslinux.git-16b37fe2266c920087f88cdec94243b71218d871.tar.gz
syslinux.git-16b37fe2266c920087f88cdec94243b71218d871.tar.xz
syslinux.git-16b37fe2266c920087f88cdec94243b71218d871.zip
hdt: Adding hdt.img target
Impact: add a bootable floppy image The 'make hdt.img' command generates a hdt.img file. hdt.img is a 2.88MB floppy bootable image.
Diffstat (limited to 'com32/hdt/Makefile')
-rw-r--r--com32/hdt/Makefile18
1 files changed, 17 insertions, 1 deletions
diff --git a/com32/hdt/Makefile b/com32/hdt/Makefile
index 8f8cae21..48ec96f2 100644
--- a/com32/hdt/Makefile
+++ b/com32/hdt/Makefile
@@ -27,11 +27,27 @@ TESTFILES =
OBJS = $(patsubst %.c,%.o,$(wildcard *.c))
+KERNEL_VERSION ?= $(shell uname -r)
+MODULES_ALIAS_FILE ?= /lib/modules/$(KERNEL_VERSION)/modules.alias
+MODULES_PCIMAP_FILE ?= /lib/modules/$(KERNEL_VERSION)/modules.pcimap
+PCI_IDS_FILE ?= $(PWD)/floppy/pci.ids
+
all: $(MODULES) $(TESTFILES)
hdt.elf : $(OBJS) $(LIBS) $(C_LIBS)
$(LD) $(LDFLAGS) -o $@ $^
+hdt.img: hdt.c32 floppy/hdt.cfg floppy/mtools.conf $(topdir)/mtools/syslinux
+ rm -f hdt.img
+ MTOOLSRC=$(PWD)/floppy/mtools.conf $(MFORMAT) -v HDT -f 2880 -C a:
+ $(topdir)/mtools/syslinux hdt.img
+ -[ ! -f $(PCI_IDS_FILE) ] && cp /usr/share/hwdata/pci.ids $(PCI_IDS_FILE)
+ -[ ! -f $(PCI_IDS_FILE) ] && cp /usr/share/pci.ids $(PCI_IDS_FILE)
+ -[ -f $(MODULES_ALIAS_FILE) ] && MTOOLSRC=$(PWD)/floppy/mtools.conf $(MCOPY) $(MODULES_ALIAS_FILE) a:
+ -[ -f $(MODULES_PCIMAP_FILE) ] && MTOOLSRC=$(PWD)/floppy/mtools.conf $(MCOPY) $(MODULES_PCIMAP_FILE) a:
+ @ [ -f $(PCI_IDS_FILE) ] && MTOOLSRC=$(PWD)/floppy/mtools.conf $(MCOPY) $(PCI_IDS_FILE) a: || printf "\nThe floppy/pci.ids file is missing and can be downloaded from http://pciids.sourceforge.net and put in\nthe ./com32/hdt/floppy directory of the extracted Syslinux source.\n\n"
+ MTOOLSRC=$(PWD)/floppy/mtools.conf $(MCOPY) floppy/hdt.cfg a:syslinux.cfg
+
tidy dist:
rm -f *.o *.lo *.a *.lst *.elf .*.d *.tmp
@@ -39,7 +55,7 @@ clean: tidy
rm -f *.lnx
spotless: clean
- rm -f *.lss *.c32 *.com
+ rm -f *.lss *.c32 *.com hdt.img
rm -f *~ \#*
install: