mirror of
https://github.com/gwenhael-le-moine/x49gp.git
synced 2024-12-25 21:58:49 +01:00
replace pull-firmware.sh with a Makefile; move targets into dist/
This commit is contained in:
parent
3b19984aef
commit
4c9be25894
10 changed files with 38 additions and 36 deletions
9
.gitignore
vendored
9
.gitignore
vendored
|
@ -3,11 +3,14 @@
|
|||
.depend
|
||||
*.o
|
||||
*.d
|
||||
/sdcard
|
||||
/x49gp
|
||||
/src/qemu-git/arm-softmmu
|
||||
/src/qemu-git/libhw32
|
||||
/src/qemu-git/libhw64
|
||||
/src/qemu-git/config-host.*
|
||||
/src/qemu-git/config-all-devices.mak
|
||||
/firmware/*.bin
|
||||
/dist/x49gp
|
||||
/dist/sdcard
|
||||
/dist/firmware/*.zip
|
||||
/dist/firmware/hp-arm-models-bootloader/
|
||||
/dist/firmware/hp4950v215/
|
||||
/dist/firmware/newrpl/
|
||||
|
|
20
Makefile
20
Makefile
|
@ -37,8 +37,8 @@ X49GP_DEBUG = \
|
|||
|
||||
DEBUG = -g # -pg
|
||||
|
||||
IMAGE49GP = hp49g+.png
|
||||
IMAGE50G = hp50g.png
|
||||
IMAGE49GP = dist/hp49g+.png
|
||||
IMAGE50G = dist/hp50g.png
|
||||
|
||||
QEMU_DEFINES = -DTARGET_ARM -DX49GP \
|
||||
-D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE \
|
||||
|
@ -131,7 +131,7 @@ VVFATOBJS = $(SRC_DIR)/block-vvfat.o \
|
|||
|
||||
VVFATOBJS += $(QEMU_DIR)/cutils.o
|
||||
|
||||
TARGET = x49gp
|
||||
TARGET = dist/x49gp
|
||||
TARGET_ALLCAPS = X49GP
|
||||
|
||||
all: do-it-all
|
||||
|
@ -150,20 +150,20 @@ install: all $(TARGET).desktop $(TARGET).man
|
|||
install -D -m 755 $(TARGET) "$(DESTDIR)$(INSTALL_BINARY_DIR)/$(TARGET)"
|
||||
install -D -m 644 $(IMAGE49GP) "$(DESTDIR)$(INSTALL_DATA_DIR)/$(IMAGE49GP)"
|
||||
install -D -m 644 $(IMAGE50G) "$(DESTDIR)$(INSTALL_DATA_DIR)/$(IMAGE50G)"
|
||||
install -D -m 755 pull-firmware.sh "$(DESTDIR)$(INSTALL_DATA_DIR)/pull-firmware.sh"
|
||||
install -D -m 755 dist/firmware "$(DESTDIR)$(INSTALL_DATA_DIR)/firmware"
|
||||
install -D -m 644 $(TARGET).desktop "$(DESTDIR)$(INSTALL_MENU_DIR)/$(TARGET).desktop"
|
||||
install -D -m 644 $(TARGET).man "$(DESTDIR)$(INSTALL_MAN_DIR)/$(TARGET).1"
|
||||
|
||||
$(TARGET).desktop: x49gp.desktop.in
|
||||
$(TARGET).desktop: $(TARGET).desktop.in
|
||||
perl -p -e "s!TARGET!$(TARGET)!" <x49gp.desktop.in >$@
|
||||
|
||||
$(TARGET).man: x49gp.man.in
|
||||
$(TARGET).man: $(TARGET).man.in
|
||||
perl -p -e "s!TARGET_ALLCAPS!$(TARGET_ALLCAPS)!;" -e "s!TARGET!$(TARGET)!" <x49gp.man.in >$@
|
||||
|
||||
sdcard:
|
||||
dist/sdcard:
|
||||
ifeq ($(shell uname),Darwin)
|
||||
rm -f sdcard.dmg
|
||||
hdiutil create sdcard -megabytes 64 -fs MS-DOS -volname x49gp
|
||||
hdiutil create $@ -megabytes 64 -fs MS-DOS -volname x49gp
|
||||
else
|
||||
/sbin/mkdosfs -v -C -S 512 -f 2 -F 16 -r 512 -R 2 -n "x49gp" $@ 65536
|
||||
endif
|
||||
|
@ -206,11 +206,13 @@ depend: depend-libs
|
|||
$(MAKEDEPEND) $(CFLAGS) $(X49GP_CFLAGS) $(SRCS) >.depend
|
||||
|
||||
mrproper: clean-qemu distclean
|
||||
make -C dist/firmware/ mrproper
|
||||
|
||||
|
||||
pretty-code:
|
||||
clang-format -i $(SRC_DIR)/*.c $(SRC_DIR)/*.h
|
||||
|
||||
pull-firmware:
|
||||
./pull-firmware.sh
|
||||
make -C dist/firmware/
|
||||
|
||||
dummy:
|
||||
|
|
21
dist/firmware/Makefile
vendored
Normal file
21
dist/firmware/Makefile
vendored
Normal file
|
@ -0,0 +1,21 @@
|
|||
.PHONY: get-roms mrproper
|
||||
|
||||
all: bootloaders official newrpl
|
||||
|
||||
mrproper:
|
||||
rm -f ./hp-arm-models-bootloader ./hp4950v215 ./newrpl
|
||||
|
||||
bootloaders:
|
||||
wget https://www.hpcalc.org/hp49/pc/rom/hp-arm-models-bootloader.zip
|
||||
unzip -j hp-arm-models-bootloader.zip -d hp-arm-models-bootloader
|
||||
rm hp-arm-models-bootloader.zip
|
||||
|
||||
official:
|
||||
wget https://www.hpcalc.org/hp49/pc/rom/hp4950v215.zip
|
||||
unzip -j hp4950v215.zip -d hp4950v215
|
||||
rm hp4950v215.zip
|
||||
|
||||
newrpl:
|
||||
mkdir -p newrpl
|
||||
wget https://hpgcc3.org/downloads/newrplfw.bin -O newrpl/newrplfw.bin
|
||||
echo "newrplfw.bin" > newrpl/update.scp
|
0
hp49g+.png → dist/hp49g+.png
vendored
0
hp49g+.png → dist/hp49g+.png
vendored
Before Width: | Height: | Size: 416 KiB After Width: | Height: | Size: 416 KiB |
Before Width: | Height: | Size: 431 KiB After Width: | Height: | Size: 431 KiB |
0
hp50g.png → dist/hp50g.png
vendored
0
hp50g.png → dist/hp50g.png
vendored
Before Width: | Height: | Size: 275 KiB After Width: | Height: | Size: 275 KiB |
0
x49gp.desktop.in → dist/x49gp.desktop.in
vendored
0
x49gp.desktop.in → dist/x49gp.desktop.in
vendored
0
x49gp.man.in → dist/x49gp.man.in
vendored
0
x49gp.man.in → dist/x49gp.man.in
vendored
|
@ -1 +0,0 @@
|
|||
This folder will hold ROM binary files.
|
|
@ -1,23 +0,0 @@
|
|||
CWD=$(pwd)
|
||||
TEMPDIR=${TEMPDIR:-$CWD/tmpdir}
|
||||
FWDIR=${FWDIR:-$CWD/firmware}
|
||||
|
||||
mkdir -p "$FWDIR"
|
||||
mkdir -p "$TEMPDIR"
|
||||
cd "$TEMPDIR" || exit 1
|
||||
|
||||
echo "Retrieving Bootloader from hpcalc.org for HP 49g+ and HP 50g..."
|
||||
wget https://www.hpcalc.org/hp49/pc/rom/hp-arm-models-bootloader.zip
|
||||
unzip -j hp-arm-models-bootloader.zip -d "$TEMPDIR"
|
||||
mv ./*.bin "$FWDIR"/
|
||||
|
||||
echo "Retrieving ROM 2.15 from hpcalc.org for HP 49g+ and HP 50g..."
|
||||
wget https://www.hpcalc.org/hp49/pc/rom/hp4950v215.zip
|
||||
unzip -j hp4950v215.zip -d "$TEMPDIR"
|
||||
mv ./*.bin "$FWDIR"/
|
||||
|
||||
echo "Retrieving latest Unofficial newRPL build..."
|
||||
wget https://hpgcc3.org/downloads/newrplfw.bin -O "$FWDIR"/newrplfw.bin
|
||||
|
||||
cd "$CWD" || exit 1
|
||||
rm -rf "$TEMPDIR"
|
Loading…
Reference in a new issue