diff options
author | Dominik Riebeling <Dominik.Riebeling@gmail.com> | 2021-12-15 21:04:28 +0100 |
---|---|---|
committer | Dominik Riebeling <Dominik.Riebeling@gmail.com> | 2021-12-24 18:05:53 +0100 |
commit | c876d3bbefe0dc00c27ca0c12d29da5874946962 (patch) | |
tree | 69f468a185a369b01998314bc3ecc19b70f4fcaa /utils/mkimxboot/Makefile | |
parent | 6c6f0757d7a902feb293be165d1490c42bc8e7ad (diff) | |
download | rockbox-c876d3bbefe0dc00c27ca0c12d29da5874946962.tar.gz rockbox-c876d3bbefe0dc00c27ca0c12d29da5874946962.zip |
rbutil: Merge rbutil with utils folder.
rbutil uses several components from the utils folder, and can be
considered part of utils too. Having it in a separate folder is an
arbitrary split that doesn't help anymore these days, so merge them.
This also allows other utils to easily use libtools.make without the
need to navigate to a different folder.
Change-Id: I3fc2f4de19e3e776553efb5dea5f779dfec0dc21
Diffstat (limited to 'utils/mkimxboot/Makefile')
-rw-r--r-- | utils/mkimxboot/Makefile | 46 |
1 files changed, 46 insertions, 0 deletions
diff --git a/utils/mkimxboot/Makefile b/utils/mkimxboot/Makefile new file mode 100644 index 0000000000..966423159a --- /dev/null +++ b/utils/mkimxboot/Makefile | |||
@@ -0,0 +1,46 @@ | |||
1 | # __________ __ ___. | ||
2 | # Open \______ \ ____ ____ | | _\_ |__ _______ ___ | ||
3 | # Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ / | ||
4 | # Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < < | ||
5 | # Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \ | ||
6 | # \/ \/ \/ \/ \/ | ||
7 | |||
8 | # We use the SB code available in the Rockbox utils/sbtools directory | ||
9 | |||
10 | IMXTOOLS_DIR=../../utils/imxtools/sbtools/ | ||
11 | |||
12 | COMPILEFLAGS := -Wall -g -O3 -I$(IMXTOOLS_DIR) | ||
13 | |||
14 | # std=gnu99 is required by MinGW on Windows (c99 is sufficient for Linux / MXE) | ||
15 | CFLAGS += -std=gnu99 $(COMPILEFLAGS) | ||
16 | |||
17 | TOMCRYPT_DIR := ../../utils/tomcrypt | ||
18 | |||
19 | CFLAGS += -I$(TOMCRYPT_DIR)/src/headers | ||
20 | LDOPTS += -lpthread $(TOMCRYPT_DIR)/librbtomcrypt.a | ||
21 | |||
22 | OUTPUT = mkimxboot | ||
23 | |||
24 | # inputs for lib | ||
25 | IMXTOOLS_SOURCES = misc.c sb.c crypto.c crc.c elf.c | ||
26 | LIBSOURCES := dualboot.c mkimxboot.c md5.c \ | ||
27 | $(addprefix $(IMXTOOLS_DIR),$(IMXTOOLS_SOURCES)) | ||
28 | |||
29 | # for now build tomcrypt as part of the lib. | ||
30 | LIBSOURCES += $(addprefix $(TOMCRYPT_DIR),$(TOMCRYPT_SOURCES)) | ||
31 | |||
32 | # inputs for binary only | ||
33 | SOURCES := $(LIBSOURCES) main.c | ||
34 | # dependencies for binary | ||
35 | EXTRADEPS := | ||
36 | |||
37 | include ../libtools.make | ||
38 | |||
39 | # explicit dependencies on dualboot.{c,h} and mkimxboot.h | ||
40 | $(OBJDIR)mkimxboot.o: dualboot.h dualboot.c mkimxboot.c mkimxboot.h | ||
41 | $(OBJDIR)main.o: dualboot.h dualboot.c main.c mkimxboot.h | ||
42 | $(BINARY): librbtomcrypt.a | ||
43 | |||
44 | librbtomcrypt.a: | ||
45 | $(MAKE) -C ../../utils/tomcrypt | ||
46 | |||