diff options
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 | |||