From c876d3bbefe0dc00c27ca0c12d29da5874946962 Mon Sep 17 00:00:00 2001 From: Dominik Riebeling Date: Wed, 15 Dec 2021 21:04:28 +0100 Subject: rbutil: Merge rbutil with utils folder. rbutil uses several components from the utils folder, and can be considered part of utils too. Having it in a separate folder is an arbitrary split that doesn't help anymore these days, so merge them. This also allows other utils to easily use libtools.make without the need to navigate to a different folder. Change-Id: I3fc2f4de19e3e776553efb5dea5f779dfec0dc21 --- utils/sansapatcher/Makefile | 52 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 52 insertions(+) create mode 100644 utils/sansapatcher/Makefile (limited to 'utils/sansapatcher/Makefile') diff --git a/utils/sansapatcher/Makefile b/utils/sansapatcher/Makefile new file mode 100644 index 0000000000..85c36c6d14 --- /dev/null +++ b/utils/sansapatcher/Makefile @@ -0,0 +1,52 @@ +# __________ __ ___. +# Open \______ \ ____ ____ | | _\_ |__ _______ ___ +# Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ / +# Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < < +# Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \ +# \/ \/ \/ \/ \/ + +TARGET_DIR ?= $(shell pwd)/ +CFLAGS += -Wall -W -D_LARGEFILE64_SOURCE + +OUTPUT = sansapatcher + +# inputs +LIBSOURCES := sansapatcher.c sansaio-posix.c sansaio-win32.c +SOURCES := main.c +# additional link dependencies for the standalone executable +EXTRADEPS := + +# Releases of sansapatcher are created with "make RELEASE=1". This +# enables BOOTOBJS and uses the VERSION string defined in main.c +ifdef RELEASE +CFLAGS += -DRELEASE +BOOTOBJS=1 +endif + +ifdef WITH_BOOTOBJS +BOOTSRC = bootimg_c200.c bootimg_e200.c +SOURCES += $(BOOTSRC) +CFLAGS += -DWITH_BOOTOBJS +endif + +include ../libtools.make + +# find out if we need to link the manifest resource. +# Since libtools.make sets up BINARY we check it for the file extension .exe. +ifeq ($(findstring exe,$(BINARY)),exe) +$(BINARY): $(OBJDIR)sansapatcher-rc.o +endif + +$(OBJDIR)main.o: $(BOOTSRC) +$(OBJDIR)sansapatcher-rc.o: sansapatcher.rc sansapatcher.manifest + @echo WINDRES $(notdir $<) + $(SILENT)$(CROSS)$(WINDRES) -i sansapatcher.rc -o $@ + +bootimg_c200.c: firmware.mi4 $(BIN2C) + @echo BIN2C $< + $(SILENT)$(BIN2C) $< $* + +bootimg_e200.c: PP5022.mi4 $(BIN2C) + @echo BIN2C $< $* + $(SILENT)$(BIN2C) $< $* + -- cgit v1.2.3