mirror of
https://git.planet-casio.com/Lephenixnoir/fxsdk.git
synced 2024-12-29 13:03:37 +01:00
fxsdk: add update command and fix LD flag order
This commit is contained in:
parent
e1ddf0f452
commit
627fe14290
2 changed files with 26 additions and 3 deletions
|
@ -16,8 +16,8 @@ cf-fx := $(cf) -m3 -DFX9860G
|
||||||
cf-cg := $(cf) -m4-nofpu -DFXCG50
|
cf-cg := $(cf) -m4-nofpu -DFXCG50
|
||||||
|
|
||||||
# Linker flags
|
# Linker flags
|
||||||
lf-fx := $(LDFLAGS) -Tfx9860g.ld -lgint-fx -lgcc -Wl,-Map=build-fx/map
|
lf-fx := -Tfx9860g.ld -lgint-fx $(LDFLAGS) -lgcc -Wl,-Map=build-fx/map
|
||||||
lf-cg := $(LDFLAGS) -Tfxcg50.ld -lgint-cg -lgcc -Wl,-Map=build-cg/map
|
lf-cg := -Tfxcg50.ld -lgint-cg $(LDFLAGS) -lgcc -Wl,-Map=build-cg/map
|
||||||
|
|
||||||
dflags = -MMD -MT $@ -MF $(@:.o=.d) -MP
|
dflags = -MMD -MT $@ -MF $(@:.o=.d) -MP
|
||||||
cpflags := -R .bss -R .gint_bss
|
cpflags := -R .bss -R .gint_bss
|
||||||
|
|
|
@ -39,6 +39,13 @@ Installation:
|
||||||
Sends the target file to the calculator. Uses p7 (which must be installed
|
Sends the target file to the calculator. Uses p7 (which must be installed
|
||||||
externally) for fx-9860G. Currently not implemented for fx-CG 50, as it
|
externally) for fx-9860G. Currently not implemented for fx-CG 50, as it
|
||||||
requires detecting and mounting the calculator (same of the Graph 35+E II).
|
requires detecting and mounting the calculator (same of the Graph 35+E II).
|
||||||
|
|
||||||
|
Project update:
|
||||||
|
fxsdk update
|
||||||
|
|
||||||
|
Copies the latest version of the Makefile to your project. *This will
|
||||||
|
discard any changes made to your Makefile.* If you have edited your
|
||||||
|
Makefile, make a backup and merge the changes after updating.
|
||||||
EOF
|
EOF
|
||||||
)
|
)
|
||||||
|
|
||||||
|
@ -138,7 +145,8 @@ ICON_CG_SEL = assets-cg/icon-cg-sel.png
|
||||||
|
|
||||||
# Additional compiler flags
|
# Additional compiler flags
|
||||||
CFLAGS = -std=c11 -Os
|
CFLAGS = -std=c11 -Os
|
||||||
# Additional linker flags
|
# Additional linker flags. This is followed by -lgcc. When using fxlib, add
|
||||||
|
# libfx.a to the projet directory and set LDFLAGS to "-L . -lfx".
|
||||||
LDFLAGS =
|
LDFLAGS =
|
||||||
EOF
|
EOF
|
||||||
}
|
}
|
||||||
|
@ -222,6 +230,17 @@ fxsdk_send_cg() {
|
||||||
echo "error: this is tricky and not implemented yet, sorry x_x"
|
echo "error: this is tricky and not implemented yet, sorry x_x"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
fxsdk_update() {
|
||||||
|
if [[ ! -e "project.cfg" ]]; then
|
||||||
|
echo "No file 'project.cfg' was found. This does not look like an fxSDK"
|
||||||
|
echo "project folder. (Nothing done.)"
|
||||||
|
fi
|
||||||
|
|
||||||
|
assets="$PREFIX/share/fxsdk/assets"
|
||||||
|
cp "$assets"/Makefile .
|
||||||
|
echo "Succesfully copied $assets/Makefile to the current directory."
|
||||||
|
}
|
||||||
|
|
||||||
# Parse command name
|
# Parse command name
|
||||||
|
|
||||||
case $1 in
|
case $1 in
|
||||||
|
@ -250,6 +269,10 @@ case $1 in
|
||||||
"send-cg"|"sc"|"scg")
|
"send-cg"|"sc"|"scg")
|
||||||
fxsdk_send_cg;;
|
fxsdk_send_cg;;
|
||||||
|
|
||||||
|
# Project update
|
||||||
|
"update")
|
||||||
|
fxsdk_update;;
|
||||||
|
|
||||||
# Misc
|
# Misc
|
||||||
-h|--help|-\?)
|
-h|--help|-\?)
|
||||||
usage 0;;
|
usage 0;;
|
||||||
|
|
Loading…
Reference in a new issue