source: mainline/boot/arch/ia64/loader/gefi/HelenOS/Makefile@ 7208b6c

lfn serial ticket/834-toolchain-update topic/msim-upgrade topic/simplify-dev-export
Last change on this file since 7208b6c was 7208b6c, checked in by Jakub Vana <jakub.vana@…>, 18 years ago

Basic IA64 boot and kernel suport for real machines

  • Property mode set to 100644
File size: 1.8 KB
Line 
1#
2# Copyright (C) 1999-2001 Hewlett-Packard Co.
3# Contributed by David Mosberger <davidm@hpl.hp.com>
4# Contributed by Stephane Eranian <eranian@hpl.hp.com>
5#
6# This file is part of the gnu-efi package.
7#
8# GNU-EFI is free software; you can redistribute it and/or modify
9# it under the terms of the GNU General Public License as published by
10# the Free Software Foundation; either version 2, or (at your option)
11# any later version.
12#
13# GNU-EFI is distributed in the hope that it will be useful,
14# but WITHOUT ANY WARRANTY; without even the implied warranty of
15# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16# GNU General Public License for more details.
17#
18# You should have received a copy of the GNU General Public License
19# along with GNU-EFI; see the file COPYING. If not, write to the Free
20# Software Foundation, 59 Temple Place - Suite 330, Boston, MA
21# 02111-1307, USA.
22#
23
24include ../Make.defaults
25CDIR=$(TOPDIR)/..
26LINUX_HEADERS = /usr/src/sys/build
27CPPFLAGS += -D__KERNEL__ -I$(LINUX_HEADERS)/include
28CRTOBJS = ../gnuefi/crt0-efi-$(ARCH).o
29LDSCRIPT = ../gnuefi/elf_$(ARCH)_efi.lds
30LDFLAGS += -T $(LDSCRIPT) -shared -Bsymbolic -L../lib -L../gnuefi $(CRTOBJS)
31LOADLIBES = -lefi -lgnuefi $(shell $(CC) -print-libgcc-file-name)
32FORMAT = efi-app-$(ARCH)
33
34
35all: hello.efi
36
37
38clean:
39 rm -f *.efi *~ *.o *.so
40
41.PHONY: install
42
43hello.efi: hello.so
44 $(OBJCOPY) -j .text -j .sdata -j .data -j .dynamic -j .dynsym -j .rel \
45 -j .rela -j .reloc --target=$(FORMAT) hello.so hello.efi
46 objdump -d hello.efi > hello.disass
47
48hello.so: hello.o image.o
49 $(LD) $(LDFLAGS) -Map hello.map hello.o -o hello.so $(LOADLIBES)
50
51hello.o: hello.c
52 $(CC) $(INCDIR) $(CFLAGS) $(CPPFLAGS) -c hello.c -o hello.o
53
54image.o: ../../image.boot
55 objcopy -O binary ../../image.boot image.bin
56 objcopy -I binary -O elf64-ia64-little -B ia64 image.bin image.o
57
58
59
Note: See TracBrowser for help on using the repository browser.