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