1 ## -----------------------------------------------------------------------
3 ## Copyright 2001-2009 H. Peter Anvin - All Rights Reserved
4 ## Copyright 2009 Intel Corporation; author: H. Peter Anvin
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.
12 ## -----------------------------------------------------------------------
15 include $(MAKEDIR
)/elf.mk
21 OBJS
= gfxboot.o realmode_callback.o
23 gfxboot.elf
: $(OBJS
) $(LIBS
) $(C_LIBS
)
24 $(LD
) $(LDFLAGS
) -o
$@
$^
26 realmode_callback.o
: realmode_callback.asm
28 $(NASM
) -f bin
-O99
-o
$*.tmp
-l
$*.lst
$<
29 $(OBJCOPY
) -B i386
-I binary
-O elf32-i386 \
30 --redefine-sym _binary_
$*_tmp_start
=$*_start \
31 --redefine-sym _binary_
$*_tmp_end
=$*_end \
32 --strip-symbol _binary_
$*_tmp_size \
36 $(NASM
) -f bin
-O99
-o
$*.tmp
-l
$*.lst
$<
37 $(OBJCOPY
) -B i386
:x86-64
-I binary
-O elf64-x86-64 \
38 --redefine-sym _binary_
$*_tmp_start
=$*_start \
39 --redefine-sym _binary_
$*_tmp_end
=$*_end \
40 --strip-symbol _binary_
$*_tmp_size \
45 rm -f
*.o
*.lo
*.a
*.lst .
*.d
*.tmp
51 rm -f
*.lss
*.c32
*.com