2015-09-16 16:34:15 +02:00
|
|
|
top ?= $(abspath ../..)
|
|
|
|
objutil ?= $(top)/util
|
2009-04-04 20:24:21 +02:00
|
|
|
|
2015-09-16 16:34:15 +02:00
|
|
|
CONFIG_FMD_GENPARSER := y
|
2015-02-26 20:47:19 +01:00
|
|
|
|
2015-09-16 16:34:15 +02:00
|
|
|
HOSTCC ?= $(CC)
|
2015-11-20 17:58:59 +01:00
|
|
|
OBJCOPY ?= objcopy
|
2015-02-26 20:47:19 +01:00
|
|
|
|
2015-03-06 00:38:03 +01:00
|
|
|
.PHONY: all
|
2015-09-16 16:34:15 +02:00
|
|
|
all: $(objutil)/cbfstool/cbfstool \
|
|
|
|
$(objutil)/cbfstool/fmaptool \
|
|
|
|
$(objutil)/cbfstool/rmodtool \
|
2016-05-20 01:12:16 +02:00
|
|
|
$(objutil)/cbfstool/ifwitool \
|
2009-03-31 13:57:36 +02:00
|
|
|
|
2015-03-06 00:38:03 +01:00
|
|
|
.PHONY: clean
|
2009-09-14 15:29:27 +02:00
|
|
|
clean:
|
2015-10-22 13:34:06 +02:00
|
|
|
$(RM) fmd_parser.c fmd_parser.h fmd_scanner.c fmd_scanner.h
|
2015-09-16 16:34:15 +02:00
|
|
|
$(RM) $(objutil)/cbfstool/cbfstool $(cbfsobj)
|
|
|
|
$(RM) $(objutil)/cbfstool/fmaptool $(fmapobj)
|
|
|
|
$(RM) $(objutil)/cbfstool/rmodtool $(rmodobj)
|
2016-05-20 01:12:16 +02:00
|
|
|
$(RM) $(objutil)/cbfstool/ifwitool $(ifwiobj)
|
2012-08-16 01:02:52 +02:00
|
|
|
|
2015-11-20 17:58:59 +01:00
|
|
|
linux_trampoline.c: linux_trampoline.S
|
|
|
|
rm -f linux_trampoline.c
|
|
|
|
$(CC) -m32 -o linux_trampoline linux_trampoline.S -ffreestanding -nostdlib -nostdinc -Wl,--defsym=_start=0
|
|
|
|
$(OBJCOPY) -Obinary -j .data linux_trampoline trampoline
|
|
|
|
echo "/* This file is automatically generated. Do not manually change */" > trampoline.c
|
|
|
|
xxd -c 16 -i trampoline >> trampoline.c
|
|
|
|
mv trampoline.c linux_trampoline.c
|
|
|
|
rm linux_trampoline trampoline
|
|
|
|
|
2015-11-21 17:53:32 +01:00
|
|
|
.SILENT:
|
|
|
|
|
2015-09-16 16:34:15 +02:00
|
|
|
include Makefile.inc
|