diff --git a/.gitignore b/.gitignore index 42d7213..41b9bd5 100644 --- a/.gitignore +++ b/.gitignore @@ -1,24 +1,20 @@ /Chf/mt_build/ /Chf/st_build/ -/Makefile -/Makefile.bak -/Saturn -/cpu -/hdw -/mod -/pack -/pack._man -/saturn -/saturn._man -/saturn.cat -/stateDir.gwh_run48/ -/stateDir.gwh_run49/ +dist/pack +dist/saturn /src/*.o -/saturn.toc -/saturn.aux -/saturn.cp -/saturn.cps -/saturn.dvi -/saturn.info -/saturn.pdf -/saturn.ps +docs/saturn.toc +docs/saturn.aux +docs/saturn.cp +docs/saturn.cps +docs/saturn.dvi +docs/saturn.info +docs/saturn.pdf +docs/saturn.ps + +dist/Saturn +dist/pack +dist/saturn +dist/saturn.cat +dist/stateDir.gwh_run48/ +dist/stateDir.gwh_run49/ diff --git a/Imakefile b/Imakefile deleted file mode 100644 index 2ff6874..0000000 --- a/Imakefile +++ /dev/null @@ -1,229 +0,0 @@ -# .+ -# -# .identifier : $Id: Imakefile,v 4.1 2000/12/11 09:54:19 cibrario Rel $ -# .context : SATURN, Saturn CPU / HP48 emulator -# .title : $RCSfile: Imakefile,v $ -# .kind : Makefile -# .author : Ivan Cibrario B. -# .site : CSTV-CNR -# .creation : * -# .keywords : * -# .description : -# Imakefile. -# .notes : -# $Log: Imakefile,v $ -# Revision 4.1 2000/12/11 09:54:19 cibrario -# Public release. -# -# Revision 3.16 2000/11/21 16:37:20 cibrario -# Ultrix/IRIX support: -# - Propagate CC and CFLAGS to Chf library as fallback values -# - Added -li library for Ultrix -# - Use RM directly if needed macros are not available -# -# Revision 3.14 2000/11/13 10:24:52 cibrario -# Implemented fast load/save; improved keyboard interface emulation at -# high emulated CPU speed: -# -# - New file disk_io_obj.c -# -# Revision 3.13 2000/11/09 11:14:50 cibrario -# Revised to add file selection box GUI element, CPU halt/run -# requests and emulator's extended functions: -# -# - New files: x_func.h, x_func.c, x_func.msf -# -# Revision 3.9 2000/10/24 16:12:55 cibrario -# Added Texinfo documentation targets -# -# Revision 3.8 2000/10/23 13:18:58 cibrario -# Bug fixes: -# - saturn.cat did not contain Chf messages -# - extended 'clean' target to remove saturn.cat as well -# - CatDestination was wrong on Debian GNU/Linux -# -# Revision 3.6 2000/10/02 13:54:04 cibrario -# ROM handling utilities: -# - Added support for stand-alone build of Chf library in its subdirectory -# - Added build commands for 'pack' utility -# -# Revision 3.5 2000/10/02 09:55:10 cibrario -# Linux support: -# - openpty() is in -lutil -# - message catalog must be installed in /usr/lib/locale/C -# -# Revision 3.3 2000/09/26 15:26:07 cibrario -# Revised to implement Flash ROM write access: -# - Added new files flash49.c and flash49.msf -# -# Revision 3.2 2000/09/22 13:21:33 cibrario -# Implemented preliminary support of HP49 hw architecture: -# - added new modules hw_config.c and romram49.c to SRCS list -# -# Revision 2.5 2000/09/14 15:41:16 cibrario -# Added new files serial.c and serial.msf -# -# Revision 2.1 2000/09/08 15:39:34 cibrario -# Added automatic installation of application default file and -# message catalog; removed platform-dependent options. -# -# Revision 1.1 1998/02/19 12:03:28 cibrario -# Initial revision -# -# -# .- - -# -# Stand-alone build of Chf library in its subdirectory -# -# 3.16: Propagate CC and CFLAGS to Chf library as fallback values -# -#define IHaveSubdirs -#define PassCDebugFlags X_CC="$(CC)" X_CFLAGS="$(CFLAGS)" -SUBDIRS = Chf -MakeSubdirs($(SUBDIRS)) - -# -# Programs built by this Imakefile -# -PROGRAMS= saturn pack - -# -# Source/object files -# Each row corresponds to a group of files; each group has its own -# CHF module identifier and message catalog source file. -# -SRCS1= src/debug.c \ - src/cpu.c src/dis.c src/emulator.c src/monitor.c \ - src/modules.c src/hw_config.c src/romram.c src/romram49.c src/hdw.c src/keyb.c \ - src/disk_io.c src/disk_io_obj.c \ - src/display.c src/x11.c \ - src/serial.c src/flash49.c src/x_func.c\ - src/saturn.c - -# -# Message catalog source files for the modules defined above. -# -MSFS= debug.msf \ - cpu.msf \ - modules.msf \ - disk_io.msf \ - x11.msf \ - serial.msf flash49.msf x_func.msf\ - saturn.msf util.msf \ - Chf/chf.msf - -# -# Source/object files of secondary target -# -SRCS2= src/pack.c - -# -# Automatic generation of object file list -# -OBJS1= $(SRCS1:.c=.o) -OBJS2= $(SRCS2:.c=.o) src/disk_io.o src/debug.o - -# -# Now, some extras... bring the Chf library in. -# -EXTRA_INCLUDES = -I./Chf -EXTRA_LOAD_FLAGS = -L./Chf/st_build - -# 3.5: Added linux support; openpty() is in -lutil -# - -#if defined(LinuxArchitecture) -EXTRA_ARCH_LIBRARIES = -lutil -#endif - -# 3.16: Added Ultrix support; catopen() is in -li -# - -#if defined(UltrixArchitecture) -EXTRA_TAIL_LIBRARIES = -li -#endif - -EXTRA_LIBRARIES = $(EXTRA_ARCH_LIBRARIES) \ --lXm $(XTOOLLIB) $(XLIB) -lChf \ -$(EXTRA_TAIL_LIBRARIES) - -# -# Main Target -# -ComplexProgramTarget_1(saturn,NullParameter,NullParameter) - -# -# Main Target -# -ComplexProgramTarget_2(pack,NullParameter,NullParameter) - -# -# Installation of the application default file; primary target only. -# -InstallAppDefaults(Saturn) - -# -# Special message catalog targets -# -saturn.cat: $(MSFS) - for msf in $? ; \ - do gencat saturn.cat $$msf ; \ - done - -all:: saturn.cat - -# -# 3.16: Use RM directly if macro is not available -# -#ifdef ImakeConfigRelease -clean:: - RemoveFile(saturn.cat) -#else -clean:: - $(RM) saturn.cat -#endif - -# -# Determine destination of saturn.cat; for now, few architectures are -# supported. -# -#if defined(AlphaArchitecture) -#define CatDestination /usr/lib/nls/msg/C -#elif defined(SunArchitecture) -#define CatDestination /usr/lib/locale/C/LC_MESSAGES -#elif defined(LinuxArchitecture) -#define CatDestination /usr/share/locale/C/LC_MESSAGES -#endif - -#if defined(CatDestination) -InstallNonExecFile(saturn.cat,CatDestination) -#else -install:: - echo "*** Can't determine CatDestination; install saturn.cat manually" -#endif - -# -# TexInfo Documentation -# -MAKEINFO= makeinfo -TEXI2DVI= texi2dvi -DVIPS= dvips - -doc: - $(MAKEINFO) saturn.texi - $(TEXI2DVI) saturn.texi && $(DVIPS) -o saturn.ps saturn.dvi - @echo "*** Install saturn.info manually, please" - -# -# 3.16: Use RM directly if macro is not available -# -#ifdef ImakeConfigRelease -clean:: - RemoveFiles(*.aux *.cp *.cps *.dvi *.fn *.info *.ky *.log *.pg) - RemoveFiles(*.ps *.toc *.tp *.vr) -#else -clean:: - $(RM) *.aux *.cp *.cps *.dvi *.fn *.info *.ky *.log *.pg - $(RM) *.ps *.toc *.tp *.vr -#endif diff --git a/Makefile.gwh b/Makefile similarity index 86% rename from Makefile.gwh rename to Makefile index f95ad24..3fee526 100644 --- a/Makefile.gwh +++ b/Makefile @@ -40,23 +40,45 @@ DOTOS = src/cpu.o \ src/x11.o \ src/x_func.o +MSFS= Msfs/debug.msf \ + Msfs/cpu.msf \ + Msfs/modules.msf \ + Msfs/disk_io.msf \ + Msfs/x11.msf \ + Msfs/serial.msf Msfs/flash49.msf Msfs/x_func.msf\ + Msfs/saturn.msf Msfs/util.msf \ + Chf/chf.msf + .PHONY: all clean clean-all pretty-code install mrproper -all: saturn pack +all: Chf/st_build/libChf.a dist/saturn dist/pack dist/saturn.cat docs # Binaries -saturn: $(DOTOS) +Chf/st_build/libChf.a: + make -C Chf + +dist/saturn: $(DOTOS) Chf/st_build/libChf.a $(CC) $^ -o $@ $(CFLAGS) $(LIBS) -pack: src/pack.o src/disk_io.o src/debug.o +dist/pack: src/pack.o src/disk_io.o src/debug.o Chf/st_build/libChf.a $(CC) $^ -o $@ $(CFLAGS) $(LIBS) +dist/saturn.cat: $(MSFS) + for msf in $? ; \ + do gencat $@ $$msf ; \ + done + +docs: + make -C docs + # Cleaning clean: rm -f src/*.o + make -C Chf clean + make -C docs clean mrproper: clean - rm -f pack saturn + rm -f dist/pack dist/saturn dist/saturn.cat clean-all: mrproper diff --git a/cpu.msf b/Msfs/cpu.msf similarity index 100% rename from cpu.msf rename to Msfs/cpu.msf diff --git a/debug.msf b/Msfs/debug.msf similarity index 100% rename from debug.msf rename to Msfs/debug.msf diff --git a/disk_io.msf b/Msfs/disk_io.msf similarity index 100% rename from disk_io.msf rename to Msfs/disk_io.msf diff --git a/flash49.msf b/Msfs/flash49.msf similarity index 100% rename from flash49.msf rename to Msfs/flash49.msf diff --git a/modules.msf b/Msfs/modules.msf similarity index 100% rename from modules.msf rename to Msfs/modules.msf diff --git a/saturn.msf b/Msfs/saturn.msf similarity index 100% rename from saturn.msf rename to Msfs/saturn.msf diff --git a/serial.msf b/Msfs/serial.msf similarity index 100% rename from serial.msf rename to Msfs/serial.msf diff --git a/util.msf b/Msfs/util.msf similarity index 100% rename from util.msf rename to Msfs/util.msf diff --git a/x11.msf b/Msfs/x11.msf similarity index 100% rename from x11.msf rename to Msfs/x11.msf diff --git a/x_func.msf b/Msfs/x_func.msf similarity index 100% rename from x_func.msf rename to Msfs/x_func.msf diff --git a/Saturn.ad b/dist/Saturn.ad similarity index 100% rename from Saturn.ad rename to dist/Saturn.ad diff --git a/gwh_run48.sh b/dist/gwh_run48.sh similarity index 100% rename from gwh_run48.sh rename to dist/gwh_run48.sh diff --git a/gwh_run49.sh b/dist/gwh_run49.sh similarity index 100% rename from gwh_run49.sh rename to dist/gwh_run49.sh diff --git a/run_saturn b/dist/run_saturn similarity index 100% rename from run_saturn rename to dist/run_saturn diff --git a/sutil_48.dir b/dist/sutil_48.dir similarity index 100% rename from sutil_48.dir rename to dist/sutil_48.dir diff --git a/sutil_49.dir b/dist/sutil_49.dir similarity index 100% rename from sutil_49.dir rename to dist/sutil_49.dir diff --git a/docs/Makefile b/docs/Makefile new file mode 100644 index 0000000..900e820 --- /dev/null +++ b/docs/Makefile @@ -0,0 +1,14 @@ +# +# TexInfo Documentation +# +MAKEINFO= makeinfo +TEXI2DVI= texi2dvi +DVIPS= dvips + +doc: + $(MAKEINFO) saturn.texi + $(TEXI2DVI) saturn.texi && $(DVIPS) -o saturn.ps saturn.dvi + @echo "*** Install saturn.info manually, please" + +clean: + -rm saturn.aux saturn.cp saturn.cps saturn.dvi saturn.info saturn.log saturn.ps saturn.toc diff --git a/cindex.texi b/docs/cindex.texi similarity index 100% rename from cindex.texi rename to docs/cindex.texi diff --git a/clopt.texi b/docs/clopt.texi similarity index 100% rename from clopt.texi rename to docs/clopt.texi diff --git a/custom.texi b/docs/custom.texi similarity index 100% rename from custom.texi rename to docs/custom.texi diff --git a/gpl.texi b/docs/gpl.texi similarity index 100% rename from gpl.texi rename to docs/gpl.texi diff --git a/introd.texi b/docs/introd.texi similarity index 100% rename from introd.texi rename to docs/introd.texi diff --git a/prep.texi b/docs/prep.texi similarity index 100% rename from prep.texi rename to docs/prep.texi diff --git a/saturn.texi b/docs/saturn.texi similarity index 100% rename from saturn.texi rename to docs/saturn.texi diff --git a/sutil.texi b/docs/sutil.texi similarity index 100% rename from sutil.texi rename to docs/sutil.texi diff --git a/tips.texi b/docs/tips.texi similarity index 100% rename from tips.texi rename to docs/tips.texi diff --git a/using.texi b/docs/using.texi similarity index 100% rename from using.texi rename to docs/using.texi diff --git a/gpl_replace b/gpl_replace deleted file mode 100755 index 7546832..0000000 --- a/gpl_replace +++ /dev/null @@ -1,78 +0,0 @@ -#!/bin/csh -# -# $Id: gpl_replace,v 4.1 2000/12/11 09:54:19 cibrario Rel $ -# -# This script adds/replaces the GPL header $gpl_template in -# all .c and .h files in the RCS repository. Must be executed on -# a clean (no locked files) repository. -# -# Arguments: -# -# argv[1]: -r argument to ci -# argv[2]: -m argument to ci, default provided - -if( $#argv < 1 ) then - echo "gpl_replace: missing target release number" - exit 1 -endif - -if( $#argv == 1 ) then - set argv = ($argv "Added/Replaced GPL header") -endif - -set gpl_template = gpl_template -set rcs_flist = `ls RCS/*.[ch],v` -set exit_code = 0 - -co $gpl_template -if( $status != 0 ) then - echo "gpl_replace: co ${gpl_template} failed" - exit 9 -endif - -foreach rcs_file ($rcs_flist) - set file = `basename $rcs_file ,v` - set s_file = "${file}_s" - set j_file = "${file}_j" - set b_file = "${file}_b" - - # Extract file from repository - co -l $file - if( $status != 0 ) then - echo "gpl_replace: ${file}: checkout failed; edit manually" - set exit_code = 2 - continue - endif - - sed -e '/.*+-+.*/,$\!d' $file > $s_file - - if( -z $s_file ) then - # File does not contain the template yet; add - cat $gpl_template - $file > $j_file < $j_file < BUILD_INFO.txt <