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

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

IA64:Disable searching for image in actual directory in hello, fix Makefile

  • Property mode set to 100644
File size: 2.5 KB
RevLine 
[7208b6c]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#
[f1af679]23prefix=$(PREFIX)
[7208b6c]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)
[23d9938]31#LOADLIBES = -lefi -lgnuefi $(shell $(CC) -print-libgcc-file-name)
32LOADLIBES = -lefi -lgnuefi
[7208b6c]33FORMAT = efi-app-$(ARCH)
34
35
[f1af679]36all: gefi hello.efi
[7208b6c]37
38
39clean:
[f86c184]40 rm -f *.efi *~ *.o *.so *.map *.disass *.bin
[7208b6c]41
42.PHONY: install
43
44hello.efi: hello.so
45 $(OBJCOPY) -j .text -j .sdata -j .data -j .dynamic -j .dynsym -j .rel \
46 -j .rela -j .reloc --target=$(FORMAT) hello.so hello.efi
[f1af679]47 $(OBJDUMP) -d hello.efi > hello.disass
[7208b6c]48
[59e4864]49#When selected first lines or second lines, select if image is linked into hello or not - usefull for network boot
[23d9938]50#hello.so: hello.o image.o division.o
[bb74e8ab]51hello.so: hello.o image.bin division.o
[23d9938]52# $(LD) $(LDFLAGS) -Map hello.map hello.o division.o image.o -o hello.so $(LOADLIBES) #link image inside hello
53 $(LD) $(LDFLAGS) -Map hello.map hello.o division.o -o hello.so $(LOADLIBES) #dont link image inside hello
[7208b6c]54
55hello.o: hello.c
56 $(CC) $(INCDIR) $(CFLAGS) $(CPPFLAGS) -c hello.c -o hello.o
57
[23d9938]58division.o: division.c
59 $(CC) $(INCDIR) $(CFLAGS) $(CPPFLAGS) -c division.c -o division.o
60
[f3c4a26]61
62image.bin: ../../image.boot
63 $(OBJCOPY) -O binary ../../image.boot image.bin
64
65
[59e4864]66image.o: ../../image.boot mkimage
[f1af679]67 $(OBJCOPY) -O binary ../../image.boot image.bin
[59e4864]68 ./mkimage
69 $(CC) $(INCDIR) $(CFLAGS) $(CPPFLAGS) -c image.c -o image.o
70# $(OBJCOPY) -I binary -O elf64-ia64-little -B ia64 image.bin image.o
71
72mkimage: mkimage.c
73 gcc -o mkimage mkimage.c
[7208b6c]74
75
[f1af679]76gefi:
77 make -C .. prefix=$(PREFIX)
Note: See TracBrowser for help on using the repository browser.