make install (WIP)
This commit is contained in:
parent
ae943d26fe
commit
6e4e42cc1c
19 changed files with 88 additions and 27 deletions
2
.gitignore
vendored
2
.gitignore
vendored
|
@ -17,3 +17,5 @@ dist/pack
|
||||||
dist/saturn
|
dist/saturn
|
||||||
dist/saturn.cat
|
dist/saturn.cat
|
||||||
dist/stateDir.*
|
dist/stateDir.*
|
||||||
|
|
||||||
|
dist/ROMs/*rom-*
|
||||||
|
|
42
Makefile
42
Makefile
|
@ -6,6 +6,10 @@
|
||||||
# The governing license can be found in the LICENSE file or at
|
# The governing license can be found in the LICENSE file or at
|
||||||
# https://opensource.org/license/MIT.
|
# https://opensource.org/license/MIT.
|
||||||
|
|
||||||
|
PREFIX = /usr
|
||||||
|
DOCDIR = $(PREFIX)/doc/x48ng
|
||||||
|
MANDIR = $(PREFIX)/man
|
||||||
|
|
||||||
OPTIM ?= 2
|
OPTIM ?= 2
|
||||||
|
|
||||||
CFLAGS ?= -g -O$(OPTIM) -I./src/ -D_GNU_SOURCE=1 -I./libChf -L./libChf/st_build -lutil
|
CFLAGS ?= -g -O$(OPTIM) -I./src/ -D_GNU_SOURCE=1 -I./libChf -L./libChf/st_build -lutil
|
||||||
|
@ -94,7 +98,7 @@ override CPPFLAGS := -I./src/ -D_GNU_SOURCE=1 \
|
||||||
-DPATCHLEVEL=$(PATCHLEVEL) \
|
-DPATCHLEVEL=$(PATCHLEVEL) \
|
||||||
$(CPPFLAGS)
|
$(CPPFLAGS)
|
||||||
|
|
||||||
.PHONY: all clean clean-all pretty-code install mrproper get-roms
|
.PHONY: all clean clean-all pretty-code install mrproper get-roms install
|
||||||
|
|
||||||
all: libChf/st_build/libChf.a dist/saturn dist/pack dist/saturn.cat manual
|
all: libChf/st_build/libChf.a dist/saturn dist/pack dist/saturn.cat manual
|
||||||
|
|
||||||
|
@ -124,6 +128,7 @@ clean:
|
||||||
|
|
||||||
mrproper: clean
|
mrproper: clean
|
||||||
rm -f dist/pack dist/saturn dist/saturn.cat
|
rm -f dist/pack dist/saturn dist/saturn.cat
|
||||||
|
make -C dist/ROMs mrproper
|
||||||
|
|
||||||
clean-all: mrproper
|
clean-all: mrproper
|
||||||
|
|
||||||
|
@ -133,4 +138,37 @@ pretty-code:
|
||||||
|
|
||||||
# Dependencies
|
# Dependencies
|
||||||
get-roms:
|
get-roms:
|
||||||
make -C ROMs get-roms
|
make -C dist/ROMs get-roms
|
||||||
|
|
||||||
|
# Installation
|
||||||
|
install: dist/saturn dist/pack dist/saturn.cat dist/Saturn.ad
|
||||||
|
install -m 755 -d -- $(DESTDIR)$(PREFIX)/bin
|
||||||
|
install -c -m 755 dist/saturn $(DESTDIR)$(PREFIX)/bin/saturn
|
||||||
|
install -c -m 755 dist/saturn48gx $(DESTDIR)$(PREFIX)/bin/saturn48gx
|
||||||
|
|
||||||
|
install -m 755 -d -- $(DESTDIR)$(PREFIX)/share/saturn
|
||||||
|
install -c -m 755 dist/pack $(DESTDIR)$(PREFIX)/share/saturn/pack
|
||||||
|
cp -R dist/ROMs/ $(DESTDIR)$(PREFIX)/share/saturn/
|
||||||
|
|
||||||
|
install -m 755 -d -- $(DESTDIR)$(PREFIX)/share/locale/C/LC_MESSAGES
|
||||||
|
install -c -m 644 dist/saturn.cat $(DESTDIR)$(PREFIX)/share/locale/C/LC_MESSAGES
|
||||||
|
|
||||||
|
install -m 755 -d -- $(DESTDIR)$(PREFIX)/etc/X11/app-defaults
|
||||||
|
install -c -m 644 dist/Saturn.ad $(DESTDIR)$(PREFIX)/etc/X11/app-defaults/Saturn
|
||||||
|
|
||||||
|
# install -c -m 755 dist/mkcard $(DESTDIR)$(PREFIX)/share/x48ng/mkcard
|
||||||
|
# install -c -m 755 dist/dump2rom $(DESTDIR)$(PREFIX)/share/x48ng/dump2rom
|
||||||
|
# install -c -m 755 dist/checkrom $(DESTDIR)$(PREFIX)/share/x48ng/checkrom
|
||||||
|
# install -c -m 644 dist/hplogo.png $(DESTDIR)$(PREFIX)/share/x48ng/hplogo.png
|
||||||
|
# cp -R dist/ROMs/ $(DESTDIR)$(PREFIX)/share/x48ng/
|
||||||
|
# sed "s|@PREFIX@|$(PREFIX)|g" dist/setup-x48ng-home.sh > $(DESTDIR)$(PREFIX)/share/x48ng/setup-x48ng-home.sh
|
||||||
|
# chmod 755 $(DESTDIR)$(PREFIX)/share/x48ng/setup-x48ng-home.sh
|
||||||
|
|
||||||
|
# install -m 755 -d -- $(DESTDIR)$(MANDIR)/man1
|
||||||
|
# sed "s|@VERSION@|$(VERSION_MAJOR).$(VERSION_MINOR).$(PATCHLEVEL)|g" dist/x48ng.man.1 > $(DESTDIR)$(MANDIR)/man1/x48ng.1
|
||||||
|
|
||||||
|
install -m 755 -d -- $(DESTDIR)$(DOCDIR)
|
||||||
|
cp -R COPYING LICENSE README* docs* manual/ $(DESTDIR)$(DOCDIR)
|
||||||
|
|
||||||
|
# install -m 755 -d -- $(DESTDIR)$(PREFIX)/share/applications
|
||||||
|
# sed "s|@PREFIX@|$(PREFIX)|g" dist/x48ng.desktop > $(DESTDIR)$(PREFIX)/share/applications/x48ng.desktop
|
||||||
|
|
BIN
ROMs/gxrom-l
BIN
ROMs/gxrom-l
Binary file not shown.
BIN
ROMs/gxrom-m
BIN
ROMs/gxrom-m
Binary file not shown.
BIN
ROMs/gxrom-p
BIN
ROMs/gxrom-p
Binary file not shown.
BIN
ROMs/gxrom-r
BIN
ROMs/gxrom-r
Binary file not shown.
BIN
ROMs/sxrom-a
BIN
ROMs/sxrom-a
Binary file not shown.
BIN
ROMs/sxrom-b
BIN
ROMs/sxrom-b
Binary file not shown.
BIN
ROMs/sxrom-c
BIN
ROMs/sxrom-c
Binary file not shown.
BIN
ROMs/sxrom-d
BIN
ROMs/sxrom-d
Binary file not shown.
BIN
ROMs/sxrom-e
BIN
ROMs/sxrom-e
Binary file not shown.
BIN
ROMs/sxrom-j
BIN
ROMs/sxrom-j
Binary file not shown.
0
ROMs/Makefile → dist/ROMs/Makefile
vendored
0
ROMs/Makefile → dist/ROMs/Makefile
vendored
20
dist/Saturn.ad
vendored
20
dist/Saturn.ad
vendored
|
@ -3,9 +3,9 @@
|
||||||
! .identifier : $Id: Saturn.ad,v 4.1.1.1 2002/11/11 16:13:56 cibrario Exp $
|
! .identifier : $Id: Saturn.ad,v 4.1.1.1 2002/11/11 16:13:56 cibrario Exp $
|
||||||
! .context : SATURN, Saturn CPU / HP48 emulator
|
! .context : SATURN, Saturn CPU / HP48 emulator
|
||||||
! .title : $RCSfile: Saturn.ad,v $
|
! .title : $RCSfile: Saturn.ad,v $
|
||||||
! .kind : Application's resource file
|
! .kind : Application's resource file
|
||||||
! .author : Ivan Cibrario B.
|
! .author : Ivan Cibrario B.
|
||||||
! .site : CSTV-CNR
|
! .site : CSTV-CNR
|
||||||
! .creation : 7-Sep-2000
|
! .creation : 7-Sep-2000
|
||||||
! .keywords : *
|
! .keywords : *
|
||||||
! .description :
|
! .description :
|
||||||
|
@ -99,7 +99,7 @@
|
||||||
! Error Dialog resources
|
! Error Dialog resources
|
||||||
|
|
||||||
*error_popup*deleteResponse: XmDO_NOTHING
|
*error_popup*deleteResponse: XmDO_NOTHING
|
||||||
*error*fontList: *helvetica-medium-r-*-*-8-*,*symbol-*-*-*-*-8-*=S
|
*error*fontList: *helvetica-medium-r-*-*-12-*,*symbol-*-*-*-*-8-*=S
|
||||||
*error*dialogTitle: Attention, please...
|
*error*dialogTitle: Attention, please...
|
||||||
*error*okLabelString: Continue
|
*error*okLabelString: Continue
|
||||||
|
|
||||||
|
@ -107,7 +107,7 @@
|
||||||
|
|
||||||
*msg*foreground: red
|
*msg*foreground: red
|
||||||
*msg*cursorPositionVisible: False
|
*msg*cursorPositionVisible: False
|
||||||
*msg*fontList: *helvetica-medium-r-*-*-8-*,*symbol-*-*-*-*-8-*=S
|
*msg*fontList: *helvetica-medium-r-*-*-12-*,*symbol-*-*-*-*-8-*=S
|
||||||
|
|
||||||
! Destroy application when 'Close' is selected from mwm menu.
|
! Destroy application when 'Close' is selected from mwm menu.
|
||||||
|
|
||||||
|
@ -151,8 +151,8 @@
|
||||||
|
|
||||||
*hp48.nKeys: 49
|
*hp48.nKeys: 49
|
||||||
*hp48.kbd.fractionBase: 1440
|
*hp48.kbd.fractionBase: 1440
|
||||||
*hp48.kbd*fontList: *helvetica-*-r-*-*-10-*,*symbol-*-*-*-*-10-*=S
|
*hp48.kbd*fontList: *helvetica-*-r-*-*-16-*,*symbol-*-*-*-*-10-*=S
|
||||||
*hp48.kbd*btn.fontList: *helvetica-*-r-*-*-12-*,*symbol-*-*-*-*-12-*=S
|
*hp48.kbd*btn.fontList: *helvetica-*-r-*-*-18-*,*symbol-*-*-*-*-12-*=S
|
||||||
*hp48.kbd*ul.foreground: dark violet
|
*hp48.kbd*ul.foreground: dark violet
|
||||||
*hp48.kbd*ur.foreground: dark green
|
*hp48.kbd*ur.foreground: dark green
|
||||||
*hp48.kbd*ll.foreground: gray90
|
*hp48.kbd*ll.foreground: gray90
|
||||||
|
@ -899,8 +899,8 @@
|
||||||
|
|
||||||
*hp49.nKeys: 51
|
*hp49.nKeys: 51
|
||||||
*hp49.kbd.fractionBase: 1124
|
*hp49.kbd.fractionBase: 1124
|
||||||
*hp49.kbd*fontList: *helvetica-medium-r-*-*-8-*,*symbol-*-*-*-*-8-*=S
|
*hp49.kbd*fontList: *helvetica-medium-r-*-*-12-*,*symbol-*-*-*-*-8-*=S
|
||||||
*hp49.kbd*btn.fontList: *helvetica-medium-r-*-*-8-*,*symbol-*-*-*-*-8-*=S
|
*hp49.kbd*btn.fontList: *helvetica-medium-r-*-*-12-*,*symbol-*-*-*-*-8-*=S
|
||||||
*hp49.kbd*ul.foreground: midnight blue
|
*hp49.kbd*ul.foreground: midnight blue
|
||||||
*hp49.kbd*ur.foreground: red
|
*hp49.kbd*ur.foreground: red
|
||||||
*hp49.kbd*lr.foreground: sea green
|
*hp49.kbd*lr.foreground: sea green
|
||||||
|
@ -1680,8 +1680,8 @@
|
||||||
|
|
||||||
*hp40.nKeys: 51
|
*hp40.nKeys: 51
|
||||||
*hp40.kbd.fractionBase: 1440
|
*hp40.kbd.fractionBase: 1440
|
||||||
*hp40.kbd*fontList: *helvetica-*-r-*-*-12-*,*symbol-*-*-*-*-12-*=S
|
*hp40.kbd*fontList: *helvetica-*-r-*-*-16-*,*symbol-*-*-*-*-12-*=S
|
||||||
*hp40.kbd*btn.fontList: *helvetica-*-r-*-*-14-*,*symbol-*-*-*-*-14-*=S
|
*hp40.kbd*btn.fontList: *helvetica-*-r-*-*-18-*,*symbol-*-*-*-*-14-*=S
|
||||||
*hp40.kbd*ul.foreground: light sky blue
|
*hp40.kbd*ul.foreground: light sky blue
|
||||||
*hp40.kbd*ur.foreground: red
|
*hp40.kbd*ur.foreground: red
|
||||||
*hp40.kbd*lr.foreground: orange
|
*hp40.kbd*lr.foreground: orange
|
||||||
|
|
2
dist/run48.sh
vendored
2
dist/run48.sh
vendored
|
@ -7,7 +7,7 @@ mkdir -p "$STATEDIR"
|
||||||
|
|
||||||
if [ ! -e "$STATEDIR"/gxrom-r ]; then
|
if [ ! -e "$STATEDIR"/gxrom-r ]; then
|
||||||
make -C .. get-roms
|
make -C .. get-roms
|
||||||
cp ../ROMs/gxrom-r "$STATEDIR"/gxrom-r
|
cp ROMs/gxrom-r "$STATEDIR"/gxrom-r
|
||||||
fi
|
fi
|
||||||
|
|
||||||
RAM=''
|
RAM=''
|
||||||
|
|
21
dist/saturn48gx
vendored
Executable file
21
dist/saturn48gx
vendored
Executable file
|
@ -0,0 +1,21 @@
|
||||||
|
#!/bin/bash -eu
|
||||||
|
|
||||||
|
STATE_HOME=${XDG_STATE_HOME:-$HOME/.local/state}
|
||||||
|
|
||||||
|
STATEDIR=$STATE_HOME/saturn/48gx
|
||||||
|
mkdir -p "$STATEDIR"
|
||||||
|
|
||||||
|
if [ ! -e "$STATEDIR"/gxrom-r ]; then
|
||||||
|
make -C /usr/share/saturn/ROMs get-roms
|
||||||
|
cp /usr/share/saturn/ROMs/gxrom-r "$STATEDIR"/gxrom-r
|
||||||
|
fi
|
||||||
|
|
||||||
|
RAM=''
|
||||||
|
if [ ! -e "$STATEDIR"/ram ]; then
|
||||||
|
RAM=-reset
|
||||||
|
fi
|
||||||
|
|
||||||
|
[ ! -e "$STATEDIR"/port1 ] && dd if=/dev/zero of="$STATEDIR"/port1 bs=1k count=128
|
||||||
|
[ ! -e "$STATEDIR"/port2 ] && dd if=/dev/zero of="$STATEDIR"/port2 bs=1k count=4096
|
||||||
|
|
||||||
|
/usr/bin/saturn -face hp48 -hw hp48 -stateDir "$STATEDIR" -rom gxrom-r $RAM -port1 port1 -port2 port2
|
|
@ -2,9 +2,9 @@ $ .+
|
||||||
$ .identifier : $Id: serial.msf,v 4.1 2000/12/11 09:54:19 cibrario Rel $
|
$ .identifier : $Id: serial.msf,v 4.1 2000/12/11 09:54:19 cibrario Rel $
|
||||||
$ .context : SATURN, Saturn CPU / HP48 emulator
|
$ .context : SATURN, Saturn CPU / HP48 emulator
|
||||||
$ .title : $RCSfile: serial.msf,v $
|
$ .title : $RCSfile: serial.msf,v $
|
||||||
$ .kind : Message catalog source
|
$ .kind : Message catalog source
|
||||||
$ .author : Ivan Cibrario B.
|
$ .author : Ivan Cibrario B.
|
||||||
$ .site : CSTV-CNR
|
$ .site : CSTV-CNR
|
||||||
$ .creation : 13-Sep-2000
|
$ .creation : 13-Sep-2000
|
||||||
$ .keywords : *
|
$ .keywords : *
|
||||||
$ .description :
|
$ .description :
|
||||||
|
@ -44,7 +44,7 @@ $set 15
|
||||||
104 Write [%s]; value [%01X](old) -> [%01X](new)
|
104 Write [%s]; value [%01X](old) -> [%01X](new)
|
||||||
105 Read RBR; value [%02X]
|
105 Read RBR; value [%02X]
|
||||||
106 Write TBR; value [%02X]
|
106 Write TBR; value [%02X]
|
||||||
107 Slave pseudo-terminal name is [%s]
|
107 Pseudo-terminal name is [%s]
|
||||||
201 Read from empty receiver buffer, rcs [%01X]
|
201 Read from empty receiver buffer, rcs [%01X]
|
||||||
202 Write into full transmitter buffer, tcs [%01X]
|
202 Write into full transmitter buffer, tcs [%01X]
|
||||||
203 Pseudo-terminals not supported
|
203 Pseudo-terminals not supported
|
||||||
|
|
|
@ -166,11 +166,11 @@ table[] =
|
||||||
{"hp48",
|
{"hp48",
|
||||||
|
|
||||||
{ /* name, id, access_prio,
|
{ /* name, id, access_prio,
|
||||||
init, save,
|
init, save,
|
||||||
read, write,
|
read, write,
|
||||||
r_config, r_abs_base_addr, r_size,
|
r_config, r_abs_base_addr, r_size,
|
||||||
map_flags
|
map_flags
|
||||||
*/
|
*/
|
||||||
|
|
||||||
{
|
{
|
||||||
"ROM (ROM)",
|
"ROM (ROM)",
|
||||||
|
@ -257,11 +257,11 @@ table[] =
|
||||||
{"hp49",
|
{"hp49",
|
||||||
|
|
||||||
{ /* name, id, access_prio,
|
{ /* name, id, access_prio,
|
||||||
init, save,
|
init, save,
|
||||||
read, write,
|
read, write,
|
||||||
r_config, r_abs_base_addr, r_size,
|
r_config, r_abs_base_addr, r_size,
|
||||||
map_flags
|
map_flags
|
||||||
*/
|
*/
|
||||||
|
|
||||||
{
|
{
|
||||||
"ROM (ROM)",
|
"ROM (ROM)",
|
||||||
|
|
|
@ -96,7 +96,7 @@
|
||||||
#define SERIAL_I_WRITE 104 /* Write %s %x -> %x */
|
#define SERIAL_I_WRITE 104 /* Write %s %x -> %x */
|
||||||
#define SERIAL_I_RBR 105 /* Read RBR -> %x */
|
#define SERIAL_I_RBR 105 /* Read RBR -> %x */
|
||||||
#define SERIAL_I_TBR 106 /* Write TBR <- %x */
|
#define SERIAL_I_TBR 106 /* Write TBR <- %x */
|
||||||
#define SERIAL_I_PTY_NAME 107 /* Slave pty name is %s */
|
#define SERIAL_I_PTY_NAME 107 /* pty name is %s */
|
||||||
#define SERIAL_W_EMPTY_RRB 201 /* Read from empty RX buffer, rcs=%x */
|
#define SERIAL_W_EMPTY_RRB 201 /* Read from empty RX buffer, rcs=%x */
|
||||||
#define SERIAL_W_FULL_TRB 202 /* Write into full TX buffer, tcs=%x */
|
#define SERIAL_W_FULL_TRB 202 /* Write into full TX buffer, tcs=%x */
|
||||||
#define SERIAL_W_NOPTY 203 /* 3.16: Pty support not available */
|
#define SERIAL_W_NOPTY 203 /* 3.16: Pty support not available */
|
||||||
|
|
Loading…
Reference in a new issue