Amaury Pouly | 1d121e8 | 2017-02-23 11:33:19 +0100 | [diff] [blame] | 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 | UPGTOOLS_DIR=../../utils/nwztools/upgtools/ |
| 10 | CFLAGS += -I$(UPGTOOLS_DIR) -Wall |
| 11 | # std=gnu99 is required by MinGW on Windows (c99 is sufficient for Linux / MXE) |
| 12 | CFLAGS += -std=gnu99 -g -O3 |
| 13 | # dependencies |
| 14 | # FIXME make it work for windows and maybe embed crypto++ |
| 15 | LDOPTS += `pkg-config --libs libcrypto++` |
| 16 | |
| 17 | OUTPUT = mknwzboot |
| 18 | |
| 19 | # inputs for lib |
| 20 | UPGTOOLS_SOURCES = misc.c upg.c fwp.c mg.cpp md5.cpp |
Amaury Pouly | 7de1d8b | 2017-09-17 22:16:50 +0200 | [diff] [blame] | 21 | LIBSOURCES := mknwzboot.c install_script.c uninstall_script.c \ |
Amaury Pouly | 1d121e8 | 2017-02-23 11:33:19 +0100 | [diff] [blame] | 22 | $(addprefix $(UPGTOOLS_DIR),$(UPGTOOLS_SOURCES)) |
| 23 | # inputs for binary only |
| 24 | SOURCES := $(LIBSOURCES) main.c |
| 25 | # dependencies for binary |
| 26 | EXTRADEPS := |
| 27 | |
| 28 | include ../libtools.make |
| 29 | |
| 30 | install_script.c install_script.h: install_script.sh $(BIN2C) |
| 31 | $(BIN2C) install_script.sh install_script |
| 32 | |
Amaury Pouly | 7de1d8b | 2017-09-17 22:16:50 +0200 | [diff] [blame] | 33 | uninstall_script.c uninstall_script.h: uninstall_script.sh $(BIN2C) |
| 34 | $(BIN2C) uninstall_script.sh uninstall_script |
| 35 | |
Amaury Pouly | 1d121e8 | 2017-02-23 11:33:19 +0100 | [diff] [blame] | 36 | # explicit dependencies on install_script.{c,h} and mknwzboot.h |
Amaury Pouly | 7de1d8b | 2017-09-17 22:16:50 +0200 | [diff] [blame] | 37 | $(OBJDIR)mknwzboot.o: install_script.h install_script.c uninstall_script.h uninstall_script.c mknwzboot.h |
| 38 | $(OBJDIR)main.o: main.c mknwzboot.h |