Amaury Pouly | 303c486 | 2011-11-06 19:44:03 +0000 | [diff] [blame] | 1 | # __________ __ ___. |
| 2 | # Open \______ \ ____ ____ | | _\_ |__ _______ ___ |
| 3 | # Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ / |
| 4 | # Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < < |
| 5 | # Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \ |
| 6 | # \/ \/ \/ \/ \/ |
| 7 | |
Amaury Pouly | 303c486 | 2011-11-06 19:44:03 +0000 | [diff] [blame] | 8 | # We use the SB code available in the Rockbox utils/sbtools directory |
| 9 | IMXTOOLS_DIR=../../utils/imxtools/ |
Dominik Riebeling | c5530d9 | 2012-01-02 16:59:26 +0000 | [diff] [blame] | 10 | CFLAGS += -I$(IMXTOOLS_DIR) -Wall |
Amaury Pouly | 303c486 | 2011-11-06 19:44:03 +0000 | [diff] [blame] | 11 | CFLAGS += -std=c99 |
| 12 | |
Dominik Riebeling | b52a9cc | 2011-12-14 22:00:47 +0000 | [diff] [blame] | 13 | OUTPUT = mkimxboot |
Amaury Pouly | 303c486 | 2011-11-06 19:44:03 +0000 | [diff] [blame] | 14 | |
Dominik Riebeling | b52a9cc | 2011-12-14 22:00:47 +0000 | [diff] [blame] | 15 | # inputs for lib |
| 16 | IMXTOOLS_SOURCES = misc.c sb.c crypto.c crc.c aes128.c sha1.c |
| 17 | LIBSOURCES := dualboot.c mkimxboot.c md5.c \ |
| 18 | $(addprefix $(IMXTOOLS_DIR),$(IMXTOOLS_SOURCES)) |
| 19 | # inputs for binary only |
Amaury Pouly | 303c486 | 2011-11-06 19:44:03 +0000 | [diff] [blame] | 20 | SOURCES := $(LIBSOURCES) main.c |
Dominik Riebeling | b52a9cc | 2011-12-14 22:00:47 +0000 | [diff] [blame] | 21 | # dependencies for binary |
| 22 | EXTRADEPS := |
| 23 | |
| 24 | include ../libtools.make |
Amaury Pouly | 303c486 | 2011-11-06 19:44:03 +0000 | [diff] [blame] | 25 | |
| 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 Pouly | 303c486 | 2011-11-06 19:44:03 +0000 | [diff] [blame] | 30 | $(OBJDIR)%.o: $(IMXTOOLS_DIR)%.c |
| 31 | @echo CC $< |
| 32 | $(SILENT)mkdir -p $(dir $@) |
Dominik Riebeling | b52a9cc | 2011-12-14 22:00:47 +0000 | [diff] [blame] | 33 | $(SILENT)$(CROSS)$(CC) $(CFLAGS) -c -o $@ $< |