hdt: flags_to_string is now part of the acpi code
[syslinux.git] / utils / Makefile
blob455eb828fc0b7a8ddb51cd355861c2e53af0dfaa
1 ## -----------------------------------------------------------------------
2 ##
3 ## Copyright 1998-2008 H. Peter Anvin - All Rights Reserved
4 ##
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 ## -----------------------------------------------------------------------
14 # SYSLINUX utilities
17 topdir = ..
18 include $(topdir)/MCONFIG
20 CFLAGS = $(GCCWARN) -Os -fomit-frame-pointer -D_FILE_OFFSET_BITS=64
21 LDFLAGS = -O2 -s
23 TARGETS = mkdiskimage isohybrid gethostip memdiskfind
24 TARGETS += isohybrid.pl # about to be obsoleted
25 ASIS = keytab-lilo lss16toppm md5pass ppmtolss16 sha1pass syslinux2ansi \
26 pxelinux-options
28 ISOHDPFX = ../mbr/isohdpfx.bin ../mbr/isohdpfx_f.bin ../mbr/isohdpfx_c.bin \
29 ../mbr/isohdppx.bin ../mbr/isohdppx_f.bin ../mbr/isohdppx_c.bin
31 all: $(TARGETS)
33 %.o: %.c
34 $(CC) $(UMAKEDEPS) $(CFLAGS) -c -o $@ $<
36 mkdiskimage: mkdiskimage.in ../mbr/mbr.bin bin2hex.pl
37 $(PERL) bin2hex.pl < ../mbr/mbr.bin | cat mkdiskimage.in - > $@
38 chmod a+x $@
40 # Works on anything with a Perl interpreter...
41 isohybrid.pl: isohybrid.in $(ISOHDPFX) bin2hex.pl
42 cp -f isohybrid.in $@
43 for f in $(ISOHDPFX) ; do $(PERL) bin2hex.pl < $$f >> $@ ; done
44 chmod a+x $@
46 isohdpfx.c: $(ISOHDPFX) isohdpfxarray.pl
47 $(PERL) isohdpfxarray.pl $(ISOHDPFX) > $@
49 isohybrid: isohybrid.o isohdpfx.o
50 $(CC) $(LDFLAGS) -o $@ $^
52 gethostip: gethostip.o
53 $(CC) $(LDFLAGS) -o $@ $^
55 memdiskfind: memdiskfind.o
56 $(CC) $(LDFLAGS) -o $@ $^
58 tidy dist:
59 rm -f *.o .*.d isohdpfx.c
61 clean: tidy
62 rm -f $(TARGETS)
64 spotless: clean
66 installer: all
68 install: installer
69 mkdir -m 755 -p $(INSTALLROOT)$(BINDIR)
70 install -m 755 $(TARGETS) $(ASIS) $(INSTALLROOT)$(BINDIR)
72 -include .*.d