mirror of
https://git.planet-casio.com/Lephenixnoir/fxsdk.git
synced 2024-12-28 04:23:37 +01:00
fxsdk: add an option to choose add-in output path
This commit is contained in:
parent
46b19bab62
commit
15712b4f5b
2 changed files with 32 additions and 22 deletions
|
@ -44,15 +44,22 @@ FXCONVCG := --cg --toolchain=$(TOOLCHAIN_CG)
|
|||
# File listings
|
||||
#
|
||||
|
||||
ifeq "$(TARGET)" ""
|
||||
NULL :=
|
||||
TARGET := $(subst $(NULL) $(NULL),-,$(NAME))
|
||||
|
||||
ifeq "$(TARGET_FX)" ""
|
||||
TARGET_FX := $(TARGET).g1a
|
||||
endif
|
||||
|
||||
elf = $(dir $<)$(TARGET).elf
|
||||
bin = $(dir $<)$(TARGET).bin
|
||||
TARGETFX := $(TARGET).g1a
|
||||
TARGETCG := $(TARGET).g3a
|
||||
ifeq "$(TARGET_CG)" ""
|
||||
TARGET_CG := $(TARGET).g3a
|
||||
endif
|
||||
|
||||
ELF_FX := build-fx/$(shell basename -s .g1a $(TARGET_FX)).elf
|
||||
BIN_FX := $(ELF_FX:.elf=.bin)
|
||||
|
||||
ELF_CG := build-cg/$(shell basename -s .g3a $(TARGET_CG)).elf
|
||||
BIN_CG := $(ELF_CG:.elf=.bin)
|
||||
|
||||
# Source files
|
||||
src := $(wildcard src/*.[csS] \
|
||||
|
@ -87,18 +94,20 @@ endif
|
|||
|
||||
all: $(all)
|
||||
|
||||
all-fx: $(TARGETFX)
|
||||
all-cg: $(TARGETCG)
|
||||
all-fx: $(TARGET_FX)
|
||||
all-cg: $(TARGET_CG)
|
||||
|
||||
$(TARGETFX): $(obj-fx) $(deps-fx)
|
||||
$(TOOLCHAIN_FX)-gcc -o $(elf) $(obj-fx) $(CFLAGSFX) $(LDFLAGSFX)
|
||||
$(TOOLCHAIN_FX)-objcopy -O binary $(BINFLAGS) $(elf) $(bin)
|
||||
fxg1a $(bin) -o $@ $(G1AF)
|
||||
$(TARGET_FX): $(obj-fx) $(deps-fx)
|
||||
@ mkdir -p $(dir $@)
|
||||
$(TOOLCHAIN_FX)-gcc -o $(ELF_FX) $(obj-fx) $(CFLAGSFX) $(LDFLAGSFX)
|
||||
$(TOOLCHAIN_FX)-objcopy -O binary $(BINFLAGS) $(ELF_FX) $(BIN_FX)
|
||||
fxg1a $(BIN_FX) -o $@ $(G1AF)
|
||||
|
||||
$(TARGETCG): $(obj-cg) $(deps-cg)
|
||||
$(TOOLCHAIN_CG)-gcc -o $(elf) $(obj-cg) $(CFLAGSCG) $(LDFLAGSCG)
|
||||
$(TOOLCHAIN_CG)-objcopy -O binary $(COPY) $(elf) $(bin)
|
||||
mkg3a $(G3AF) $(bin) $@
|
||||
$(TARGET_CG): $(obj-cg) $(deps-cg)
|
||||
@ mkdir -p $(dir $@)
|
||||
$(TOOLCHAIN_CG)-gcc -o $(ELF_CG) $(obj-cg) $(CFLAGSCG) $(LDFLAGSCG)
|
||||
$(TOOLCHAIN_CG)-objcopy -O binary $(BINFLAGS) $(ELF_CG) $(BIN_CG)
|
||||
mkg3a $(G3AF) $(BIN_CG) $@
|
||||
|
||||
# C sources
|
||||
build-fx/%.c.o: %.c
|
||||
|
@ -164,17 +173,17 @@ clean-cg:
|
|||
@ rm -rf build-cg/
|
||||
|
||||
distclean-fx: clean-fx
|
||||
@ rm -f $(TARGETFX)
|
||||
@ rm -f $(TARGET_FX)
|
||||
distclean-cg: clean-cg
|
||||
@ rm -f $(TARGETCG)
|
||||
@ rm -f $(TARGET_CG)
|
||||
|
||||
clean: clean-fx clean-cg
|
||||
|
||||
distclean: distclean-fx distclean-cg
|
||||
|
||||
install-fx: $(TARGETFX)
|
||||
install-fx: $(TARGET_FX)
|
||||
p7 send -f $<
|
||||
install-cg: $(TARGETCG)
|
||||
install-cg: $(TARGET_CG)
|
||||
@ while [[ ! -h /dev/Prizm1 ]]; do sleep 0.25; done
|
||||
@ while ! mount /dev/Prizm1; do sleep 0.25; done
|
||||
@ rm -f /mnt/prizm/$<
|
||||
|
|
|
@ -142,9 +142,10 @@ NAME := $NAME
|
|||
# the main menu of the calculator!
|
||||
INTERNAL := $INTERNAL
|
||||
|
||||
# Output file name, your add-in will be named <TARGET>.g1a (or g3a).
|
||||
# The default is to take <NAME> and replace spaces with dashes.
|
||||
TARGET :=
|
||||
# Output file name. The default is to take <NAME>, replace spaces with dashes,
|
||||
# and add .g1a (or .g3a). You can specify a different folder if you want.
|
||||
TARGET_FX :=
|
||||
TARGET_CG :=
|
||||
|
||||
# fx-9860G icon location
|
||||
ICON_FX = assets-fx/icon-fx.png
|
||||
|
|
Loading…
Reference in a new issue