blob: 61a1a632578d08550aec9c8954dea4883fa43f9f [file] [log] [blame]
Patrick Georgiae570d52015-09-16 16:34:15 +02001top ?= $(abspath ../..)
2objutil ?= $(top)/util
Patrick Georgiae570d52015-09-16 16:34:15 +02003
4CONFIG_FMD_GENPARSER := y
Peter Stuge1d862de2009-04-14 00:08:34 +00005
Alexandru Gagniuc4a7b1152014-01-27 17:17:29 -06006HOSTCC ?= $(CC)
Stefan Reinauer0316e1a2015-11-20 17:58:59 +01007OBJCOPY ?= objcopy
Sol Boucher0e539312015-03-05 15:38:03 -08008
Sol Boucher0e539312015-03-05 15:38:03 -08009.PHONY: all
Patrick Georgiae570d52015-09-16 16:34:15 +020010all: $(objutil)/cbfstool/cbfstool \
11 $(objutil)/cbfstool/fmaptool \
12 $(objutil)/cbfstool/rmodtool \
Peter Stuge1d862de2009-04-14 00:08:34 +000013
Sol Boucher0e539312015-03-05 15:38:03 -080014.PHONY: clean
Patrick Georgib7b56dd82009-09-14 13:29:27 +000015clean:
Nico Huber37743a92015-10-22 13:34:06 +020016 $(RM) fmd_parser.c fmd_parser.h fmd_scanner.c fmd_scanner.h
Patrick Georgiae570d52015-09-16 16:34:15 +020017 $(RM) $(objutil)/cbfstool/cbfstool $(cbfsobj)
18 $(RM) $(objutil)/cbfstool/fmaptool $(fmapobj)
19 $(RM) $(objutil)/cbfstool/rmodtool $(rmodobj)
Peter Stuge1d862de2009-04-14 00:08:34 +000020
Stefan Reinauer0316e1a2015-11-20 17:58:59 +010021linux_trampoline.c: linux_trampoline.S
22 rm -f linux_trampoline.c
23 $(CC) -m32 -o linux_trampoline linux_trampoline.S -ffreestanding -nostdlib -nostdinc -Wl,--defsym=_start=0
24 $(OBJCOPY) -Obinary -j .data linux_trampoline trampoline
25 echo "/* This file is automatically generated. Do not manually change */" > trampoline.c
26 xxd -c 16 -i trampoline >> trampoline.c
Stefan Reinauer0316e1a2015-11-20 17:58:59 +010027 mv trampoline.c linux_trampoline.c
28 rm linux_trampoline trampoline
29
Stefan Reinauer30ff3622015-11-21 17:53:32 +010030.SILENT:
31
Patrick Georgiae570d52015-09-16 16:34:15 +020032include Makefile.inc