Initial code release
[external/syslinux.git] / com32 / gfxboot / Makefile
1 ## -----------------------------------------------------------------------
2 ##
3 ##   Copyright 2001-2009 H. Peter Anvin - All Rights Reserved
4 ##   Copyright 2009 Intel Corporation; author: H. Peter Anvin
5 ##
6 ##   This program is free software; you can redistribute it and/or modify
7 ##   it under the terms of the GNU General Public License as published by
8 ##   the Free Software Foundation, Inc., 53 Temple Place Ste 330,
9 ##   Boston MA 02111-1307, USA; either version 2 of the License, or
10 ##   (at your option) any later version; incorporated herein by reference.
11 ##
12 ## -----------------------------------------------------------------------
13
14 topdir = ../..
15 include ../MCONFIG
16
17 MODULES   = gfxboot.c32
18
19 all: $(MODULES)
20
21 gfxboot.elf : gfxboot.o realmode_callback.o $(LIBS) $(C_LIBS)
22         $(LD) $(LDFLAGS) -o $@ $^
23
24 realmode_callback.o: realmode_callback.asm
25         $(NASM) -f bin -O99 -o $*.tmp -l $*.lst $<
26         $(OBJCOPY) -B i386 -I binary -O elf32-i386 \
27           --redefine-sym _binary_$*_tmp_start=$*_start \
28           --redefine-sym _binary_$*_tmp_end=$*_end \
29           --strip-symbol _binary_$*_tmp_size \
30           $*.tmp $@
31
32 tidy dist:
33         rm -f *.o *.lo *.a *.lst *.elf .*.d *.tmp
34
35 clean: tidy
36         rm -f *.lnx
37
38 spotless: clean
39         rm -f *.lss *.c32 *.com
40         rm -f *~ \#*
41
42 install:
43
44 -include .*.d