blob: 942ceb9ca7a25d0a78f9a41ea50df9b7fa1102ff [file] [log] [blame]
Amaury Pouly303c4862011-11-06 19:44:03 +00001# __________ __ ___.
2# Open \______ \ ____ ____ | | _\_ |__ _______ ___
3# Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
4# Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
5# Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
6# \/ \/ \/ \/ \/
7
Amaury Pouly303c4862011-11-06 19:44:03 +00008# We use the SB code available in the Rockbox utils/sbtools directory
9IMXTOOLS_DIR=../../utils/imxtools/
Dominik Riebelingc5530d92012-01-02 16:59:26 +000010CFLAGS += -I$(IMXTOOLS_DIR) -Wall
Amaury Pouly303c4862011-11-06 19:44:03 +000011CFLAGS += -std=c99
12
Dominik Riebelingb52a9cc2011-12-14 22:00:47 +000013OUTPUT = mkimxboot
Amaury Pouly303c4862011-11-06 19:44:03 +000014
Dominik Riebelingb52a9cc2011-12-14 22:00:47 +000015# inputs for lib
16IMXTOOLS_SOURCES = misc.c sb.c crypto.c crc.c aes128.c sha1.c
17LIBSOURCES := dualboot.c mkimxboot.c md5.c \
18 $(addprefix $(IMXTOOLS_DIR),$(IMXTOOLS_SOURCES))
19# inputs for binary only
Amaury Pouly303c4862011-11-06 19:44:03 +000020SOURCES := $(LIBSOURCES) main.c
Dominik Riebelingb52a9cc2011-12-14 22:00:47 +000021# dependencies for binary
22EXTRADEPS :=
23
24include ../libtools.make
Amaury Pouly303c4862011-11-06 19:44:03 +000025
26# explicit dependencies on dualboot.{c,h} and mkimxboot.h
27$(OBJDIR)mkimxboot.o: dualboot.h dualboot.c mkimxboot.c mkimxboot.h
28$(OBJDIR)main.o: dualboot.h dualboot.c main.c mkimxboot.h
29
Amaury Pouly303c4862011-11-06 19:44:03 +000030$(OBJDIR)%.o: $(IMXTOOLS_DIR)%.c
31 @echo CC $<
32 $(SILENT)mkdir -p $(dir $@)
Dominik Riebelingb52a9cc2011-12-14 22:00:47 +000033 $(SILENT)$(CROSS)$(CC) $(CFLAGS) -c -o $@ $<