2011-11-06 19:44:03 +00:00
|
|
|
# __________ __ ___.
|
|
|
|
# Open \______ \ ____ ____ | | _\_ |__ _______ ___
|
|
|
|
# Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
|
|
|
|
# Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
|
|
|
|
# Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
|
|
|
|
# \/ \/ \/ \/ \/
|
|
|
|
|
|
|
|
# We use the SB code available in the Rockbox utils/sbtools directory
|
2019-01-24 12:31:07 +00:00
|
|
|
|
2012-05-23 09:03:35 +00:00
|
|
|
IMXTOOLS_DIR=../../utils/imxtools/sbtools/
|
2017-04-13 19:58:16 +00:00
|
|
|
|
2020-08-08 16:46:43 +00:00
|
|
|
COMPILEFLAGS := -Wall -g -O3 -I$(IMXTOOLS_DIR)
|
|
|
|
|
|
|
|
# std=gnu99 is required by MinGW on Windows (c99 is sufficient for Linux / MXE)
|
|
|
|
CFLAGS += -std=gnu99 $(COMPILEFLAGS)
|
2019-01-24 12:31:07 +00:00
|
|
|
|
2020-08-08 16:46:43 +00:00
|
|
|
TOMCRYPT_DIR := ../../utils/tomcrypt
|
2019-01-24 12:31:07 +00:00
|
|
|
|
2020-08-08 16:46:43 +00:00
|
|
|
CFLAGS += -I$(TOMCRYPT_DIR)/src/headers
|
|
|
|
LDOPTS += -lpthread $(TOMCRYPT_DIR)/librbtomcrypt.a
|
2011-11-06 19:44:03 +00:00
|
|
|
|
2011-12-14 22:00:47 +00:00
|
|
|
OUTPUT = mkimxboot
|
2011-11-06 19:44:03 +00:00
|
|
|
|
2011-12-14 22:00:47 +00:00
|
|
|
# inputs for lib
|
2020-08-08 20:05:44 +00:00
|
|
|
IMXTOOLS_SOURCES = misc.c sb.c crypto.c crc.c elf.c
|
2011-12-14 22:00:47 +00:00
|
|
|
LIBSOURCES := dualboot.c mkimxboot.c md5.c \
|
|
|
|
$(addprefix $(IMXTOOLS_DIR),$(IMXTOOLS_SOURCES))
|
2020-08-08 16:46:43 +00:00
|
|
|
|
|
|
|
# for now build tomcrypt as part of the lib.
|
|
|
|
LIBSOURCES += $(addprefix $(TOMCRYPT_DIR),$(TOMCRYPT_SOURCES))
|
|
|
|
|
2011-12-14 22:00:47 +00:00
|
|
|
# inputs for binary only
|
2011-11-06 19:44:03 +00:00
|
|
|
SOURCES := $(LIBSOURCES) main.c
|
2011-12-14 22:00:47 +00:00
|
|
|
# dependencies for binary
|
|
|
|
EXTRADEPS :=
|
|
|
|
|
|
|
|
include ../libtools.make
|
2011-11-06 19:44:03 +00:00
|
|
|
|
|
|
|
# explicit dependencies on dualboot.{c,h} and mkimxboot.h
|
|
|
|
$(OBJDIR)mkimxboot.o: dualboot.h dualboot.c mkimxboot.c mkimxboot.h
|
|
|
|
$(OBJDIR)main.o: dualboot.h dualboot.c main.c mkimxboot.h
|
2020-08-08 16:46:43 +00:00
|
|
|
$(BINARY): librbtomcrypt.a
|
|
|
|
|
|
|
|
librbtomcrypt.a:
|
|
|
|
$(MAKE) -C ../../utils/tomcrypt
|
|
|
|
|