1 ## -----------------------------------------------------------------------
3 ## Copyright 1998-2008 H. Peter Anvin - All Rights Reserved
5 ## This program is free software; you can redistribute it and/or modify
6 ## it under the terms of the GNU General Public License as published by
7 ## the Free Software Foundation, Inc., 53 Temple Place Ste 330,
8 ## Boston MA 02111-1307, USA; either version 2 of the License, or
9 ## (at your option) any later version; incorporated herein by reference.
11 ## -----------------------------------------------------------------------
18 MAKEDIR = $(topdir)/mk
19 include $(MAKEDIR)/syslinux.mk
21 CFLAGS = $(GCCWARN) -Os -fomit-frame-pointer -D_FILE_OFFSET_BITS=64
24 C_TARGETS = isohybrid gethostip memdiskfind
25 SCRIPT_TARGETS = mkdiskimage
26 SCRIPT_TARGETS += isohybrid.pl # about to be obsoleted
27 ASIS = keytab-lilo lss16toppm md5pass ppmtolss16 sha1pass \
28 syslinux2ansi pxelinux-options
30 TARGETS = $(C_TARGETS) $(SCRIPT_TARGETS)
32 ISOHDPFX = ../mbr/isohdpfx.bin ../mbr/isohdpfx_f.bin ../mbr/isohdpfx_c.bin \
33 ../mbr/isohdppx.bin ../mbr/isohdppx_f.bin ../mbr/isohdppx_c.bin
38 $(CC) $(UMAKEDEPS) $(CFLAGS) -c -o $@ $<
40 mkdiskimage: mkdiskimage.in ../mbr/mbr.bin bin2hex.pl
41 $(PERL) bin2hex.pl < ../mbr/mbr.bin | cat mkdiskimage.in - > $@
44 # Works on anything with a Perl interpreter...
45 isohybrid.pl: isohybrid.in $(ISOHDPFX) bin2hex.pl
47 for f in $(ISOHDPFX) ; do $(PERL) bin2hex.pl < $$f >> $@ ; done
50 isohdpfx.c: $(ISOHDPFX) isohdpfxarray.pl
51 $(PERL) isohdpfxarray.pl $(ISOHDPFX) > $@
53 isohybrid: isohybrid.o isohdpfx.o
54 $(CC) $(LDFLAGS) -o $@ $^
56 gethostip: gethostip.o
57 $(CC) $(LDFLAGS) -o $@ $^
59 memdiskfind: memdiskfind.o
60 $(CC) $(LDFLAGS) -o $@ $^
63 rm -f *.o .*.d isohdpfx.c
73 mkdir -m 755 -p $(INSTALLROOT)$(BINDIR)
74 install -m 755 $(TARGETS) $(ASIS) $(INSTALLROOT)$(BINDIR)