Merge branch 'memdisk-iso-SAFE' into memdisk-iso
[profile/ivi/syslinux.git] / modules / Makefile
1 ## -----------------------------------------------------------------------
2 ##
3 ##   Copyright 2001-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.
10 ##
11 ## -----------------------------------------------------------------------
12
13 ##
14 ## Non-COM32 simple Syslinux modules
15 ##
16
17 topdir = ..
18 include $(topdir)/MCONFIG.embedded
19
20 INCLUDES   = -I$(com32)/include
21
22 BINS = pxechain.com gfxboot.com poweroff.com int18.com
23
24 all: $(BINS)
25
26 .PRECIOUS: %.o
27
28 .PRECIOUS: %.elf
29 %.elf: c32entry.o %.o $(LIB)
30         $(LD) -Ttext 0x101000 -e _start -o $@ $^
31
32 %.c32: %.elf
33         $(OBJCOPY) -O binary $< $@
34
35 %.com: %.asm
36         ( $(NASM) -M -DDEPEND -o $@ $< ; echo '' ) > .$@.d ; true
37         $(NASM) $(NASMOPT) -f bin -o $@ -l $*.lst $<
38
39 $(LIB): $(LIBOBJS)
40         rm -f $@
41         $(AR) cq $@ $^
42         $(RANLIB) $@
43
44 %.lss:  %.ppm.gz $(PPMTOLSS16)
45         $(GZIPPROG) -cd $< | \
46                 $(PPMTOLSS16) \#000000=0 \#d0d0d0=7 \#f6f6f6=15 \
47                 > $@
48
49 %.ppm.gz: %.png
50         $(PNGTOPNM) $< | gzip -9 > $@
51
52 tidy dist:
53         rm -f *.o *.a *.lst *.elf *.map .*.d
54
55 clean: tidy
56
57 spotless: clean
58         rm -f $(BINS)
59
60 -include .*.d