summaryrefslogtreecommitdiff
path: root/utils/mkimxboot/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'utils/mkimxboot/Makefile')
-rw-r--r--utils/mkimxboot/Makefile46
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
10IMXTOOLS_DIR=../../utils/imxtools/sbtools/
11
12COMPILEFLAGS := -Wall -g -O3 -I$(IMXTOOLS_DIR)
13
14# std=gnu99 is required by MinGW on Windows (c99 is sufficient for Linux / MXE)
15CFLAGS += -std=gnu99 $(COMPILEFLAGS)
16
17TOMCRYPT_DIR := ../../utils/tomcrypt
18
19CFLAGS += -I$(TOMCRYPT_DIR)/src/headers
20LDOPTS += -lpthread $(TOMCRYPT_DIR)/librbtomcrypt.a
21
22OUTPUT = mkimxboot
23
24# inputs for lib
25IMXTOOLS_SOURCES = misc.c sb.c crypto.c crc.c elf.c
26LIBSOURCES := dualboot.c mkimxboot.c md5.c \
27 $(addprefix $(IMXTOOLS_DIR),$(IMXTOOLS_SOURCES))
28
29# for now build tomcrypt as part of the lib.
30LIBSOURCES += $(addprefix $(TOMCRYPT_DIR),$(TOMCRYPT_SOURCES))
31
32# inputs for binary only
33SOURCES := $(LIBSOURCES) main.c
34# dependencies for binary
35EXTRADEPS :=
36
37include ../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
44librbtomcrypt.a:
45 $(MAKE) -C ../../utils/tomcrypt
46