Patrick Georgi | ae570d5 | 2015-09-16 16:34:15 +0200 | [diff] [blame] | 1 | top ?= $(abspath ../..) |
| 2 | objutil ?= $(top)/util |
Patrick Georgi | ae570d5 | 2015-09-16 16:34:15 +0200 | [diff] [blame] | 3 | |
Alexander Couzens | 2c68b1c | 2016-06-16 20:16:54 -0700 | [diff] [blame] | 4 | CONFIG_FMD_GENPARSER ?= n |
Peter Stuge | 1d862de | 2009-04-14 00:08:34 +0000 | [diff] [blame] | 5 | |
Alexandru Gagniuc | 4a7b115 | 2014-01-27 17:17:29 -0600 | [diff] [blame] | 6 | HOSTCC ?= $(CC) |
Stefan Reinauer | 0316e1a | 2015-11-20 17:58:59 +0100 | [diff] [blame] | 7 | OBJCOPY ?= objcopy |
Sol Boucher | 0e53931 | 2015-03-05 15:38:03 -0800 | [diff] [blame] | 8 | |
Paul Kocialkowski | 61486b5 | 2016-07-24 12:14:38 +0200 | [diff] [blame] | 9 | VBOOT_SOURCE ?= $(top)/3rdparty/vboot |
| 10 | |
Sol Boucher | 0e53931 | 2015-03-05 15:38:03 -0800 | [diff] [blame] | 11 | .PHONY: all |
Patrick Georgi | c88d16b | 2017-01-11 15:26:58 +0100 | [diff] [blame] | 12 | all: cbfstool fmaptool rmodtool ifwitool cbfs-compression-tool |
Peter Stuge | 1d862de | 2009-04-14 00:08:34 +0000 | [diff] [blame] | 13 | |
Antonello Dettori | 75c3705 | 2016-06-05 17:26:01 +0200 | [diff] [blame] | 14 | cbfstool: $(objutil)/cbfstool/cbfstool |
| 15 | |
| 16 | fmaptool: $(objutil)/cbfstool/fmaptool |
| 17 | |
| 18 | rmodtool: $(objutil)/cbfstool/rmodtool |
| 19 | |
| 20 | ifwitool: $(objutil)/cbfstool/ifwitool |
| 21 | |
Patrick Georgi | c88d16b | 2017-01-11 15:26:58 +0100 | [diff] [blame] | 22 | cbfs-compression-tool: $(objutil)/cbfstool/cbfs-compression-tool |
| 23 | |
| 24 | .PHONY: clean cbfstool fmaptool rmodtool ifwitool cbfs-compression-tool |
Patrick Georgi | b7b56dd8 | 2009-09-14 13:29:27 +0000 | [diff] [blame] | 25 | clean: |
Nico Huber | 37743a9 | 2015-10-22 13:34:06 +0200 | [diff] [blame] | 26 | $(RM) fmd_parser.c fmd_parser.h fmd_scanner.c fmd_scanner.h |
Patrick Georgi | ae570d5 | 2015-09-16 16:34:15 +0200 | [diff] [blame] | 27 | $(RM) $(objutil)/cbfstool/cbfstool $(cbfsobj) |
| 28 | $(RM) $(objutil)/cbfstool/fmaptool $(fmapobj) |
| 29 | $(RM) $(objutil)/cbfstool/rmodtool $(rmodobj) |
Furquan Shaikh | 233f1b6 | 2016-05-19 16:12:16 -0700 | [diff] [blame] | 30 | $(RM) $(objutil)/cbfstool/ifwitool $(ifwiobj) |
Patrick Georgi | c88d16b | 2017-01-11 15:26:58 +0100 | [diff] [blame] | 31 | $(RM) $(objutil)/cbfstool/cbfs-compression-tool $(cbfscompobj) |
Peter Stuge | 1d862de | 2009-04-14 00:08:34 +0000 | [diff] [blame] | 32 | |
Stefan Reinauer | 0316e1a | 2015-11-20 17:58:59 +0100 | [diff] [blame] | 33 | linux_trampoline.c: linux_trampoline.S |
| 34 | rm -f linux_trampoline.c |
| 35 | $(CC) -m32 -o linux_trampoline linux_trampoline.S -ffreestanding -nostdlib -nostdinc -Wl,--defsym=_start=0 |
| 36 | $(OBJCOPY) -Obinary -j .data linux_trampoline trampoline |
| 37 | echo "/* This file is automatically generated. Do not manually change */" > trampoline.c |
| 38 | xxd -c 16 -i trampoline >> trampoline.c |
Stefan Reinauer | 0316e1a | 2015-11-20 17:58:59 +0100 | [diff] [blame] | 39 | mv trampoline.c linux_trampoline.c |
| 40 | rm linux_trampoline trampoline |
| 41 | |
Stefan Reinauer | 30ff362 | 2015-11-21 17:53:32 +0100 | [diff] [blame] | 42 | .SILENT: |
| 43 | |
Patrick Georgi | ae570d5 | 2015-09-16 16:34:15 +0200 | [diff] [blame] | 44 | include Makefile.inc |