mirror of
https://github.com/hsoft/collapseos.git
synced 2024-11-23 12:48:05 +11:00
Move /emul/forth/* to /emul
Less noisy this way
This commit is contained in:
parent
816563e2e3
commit
1bd191e86a
13
emul/.gitignore
vendored
13
emul/.gitignore
vendored
@ -1,7 +1,8 @@
|
||||
/forth/stage1
|
||||
/forth/stage1dbg
|
||||
/forth/stage2
|
||||
/forth/forth
|
||||
/*/*-bin.h
|
||||
/*/*.bin
|
||||
/stage1
|
||||
/stage1dbg
|
||||
/stage2
|
||||
/forth
|
||||
/*-bin.h
|
||||
/core.bin
|
||||
/forth?.bin
|
||||
/blkfs
|
||||
|
@ -1,7 +1,7 @@
|
||||
TARGETS = forth/forth forth/stage2
|
||||
TARGETS = forth stage2
|
||||
# Those Forth source files are in a particular order
|
||||
FORTHSRCS = core.fs cmp.fs print.fs parse.fs readln.fs fmt.fs blk.fs
|
||||
FORTHSRC_PATHS = ${FORTHSRCS:%=../forth/%} forth/run.fs
|
||||
FORTHSRC_PATHS = ${FORTHSRCS:%=../forth/%} run.fs
|
||||
OBJS = emul.o libz80/libz80.o
|
||||
SLATEST = ../tools/slatest
|
||||
STRIPFC = ../tools/stripfc
|
||||
@ -23,43 +23,43 @@ $(BLKUNPACK): $(BLKPACK)
|
||||
|
||||
# z80c.bin is not in the prerequisites because it's a bootstrap
|
||||
# binary that should be updated manually through make updatebootstrap.
|
||||
forth/forth0.bin: $(SLATEST)
|
||||
cp forth/z80c.bin $@
|
||||
forth0.bin: $(SLATEST)
|
||||
cp z80c.bin $@
|
||||
$(SLATEST) $@
|
||||
cat forth/pre.fs forth/emul.fs >> $@
|
||||
cat pre.fs emul.fs >> $@
|
||||
|
||||
forth/forth0-bin.h: forth/forth0.bin $(BIN2C)
|
||||
$(BIN2C) KERNEL < forth/forth0.bin | tee $@ > /dev/null
|
||||
forth0-bin.h: forth0.bin $(BIN2C)
|
||||
$(BIN2C) KERNEL < forth0.bin | tee $@ > /dev/null
|
||||
|
||||
forth/stage1: forth/stage.c $(OBJS) forth/forth0-bin.h
|
||||
$(CC) forth/stage.c $(OBJS) -o $@
|
||||
stage1: stage.c $(OBJS) forth0-bin.h
|
||||
$(CC) stage.c $(OBJS) -o $@
|
||||
|
||||
forth/stage1dbg: forth/stage.c $(OBJS) forth/forth0-bin.h
|
||||
$(CC) -DDEBUG forth/stage.c $(OBJS) -o $@
|
||||
stage1dbg: stage.c $(OBJS) forth0-bin.h
|
||||
$(CC) -DDEBUG stage.c $(OBJS) -o $@
|
||||
|
||||
# We don't really need to use stripfc, but we do it anyway to test that we
|
||||
# don't mistakenly break our code with that tool. It's easier to debug here.
|
||||
forth/core.bin: $(FORTHSRC_PATHS) forth/stage1
|
||||
cat $(FORTHSRC_PATHS) ./forth/stop.fs | $(STRIPFC) | ./forth/stage1 > $@
|
||||
core.bin: $(FORTHSRC_PATHS) stage1
|
||||
cat $(FORTHSRC_PATHS) stop.fs | $(STRIPFC) | ./stage1 > $@
|
||||
|
||||
forth/forth1.bin: forth/core.bin $(SLATEST)
|
||||
cat forth/z80c.bin forth/core.bin > $@
|
||||
forth1.bin: core.bin $(SLATEST)
|
||||
cat z80c.bin core.bin > $@
|
||||
$(SLATEST) $@
|
||||
|
||||
forth/forth1-bin.h: forth/forth1.bin $(BIN2C)
|
||||
$(BIN2C) KERNEL < forth/forth1.bin > $@
|
||||
forth1-bin.h: forth1.bin $(BIN2C)
|
||||
$(BIN2C) KERNEL < forth1.bin > $@
|
||||
|
||||
forth/stage2: forth/stage.c $(OBJS) forth/forth1-bin.h forth/blkfs-bin.h
|
||||
$(CC) -DSTAGE2 forth/stage.c $(OBJS) -o $@
|
||||
stage2: stage.c $(OBJS) forth1-bin.h blkfs-bin.h
|
||||
$(CC) -DSTAGE2 stage.c $(OBJS) -o $@
|
||||
|
||||
blkfs: $(BLKPACK)
|
||||
$(BLKPACK) ../blk > $@
|
||||
|
||||
forth/blkfs-bin.h: blkfs $(BIN2C)
|
||||
blkfs-bin.h: blkfs $(BIN2C)
|
||||
$(BIN2C) BLKFS < blkfs > $@
|
||||
|
||||
forth/forth: forth/forth.c $(OBJS) forth/forth1-bin.h blkfs
|
||||
$(CC) forth/forth.c $(OBJS) -o $@
|
||||
forth: forth.c $(OBJS) forth1-bin.h blkfs
|
||||
$(CC) forth.c $(OBJS) -o $@
|
||||
|
||||
libz80/libz80.o: libz80/z80.c
|
||||
$(MAKE) -C libz80/codegen opcodes
|
||||
@ -70,8 +70,8 @@ emul.o: emul.c
|
||||
|
||||
|
||||
.PHONY: updatebootstrap
|
||||
updatebootstrap: forth/stage2
|
||||
cat ./forth/xcomp.fs | ./forth/stage2 > ./forth/z80c.bin
|
||||
updatebootstrap: stage2
|
||||
cat xcomp.fs | ./stage2 > z80c.bin
|
||||
|
||||
.PHONY: pack
|
||||
pack:
|
||||
@ -83,5 +83,5 @@ unpack:
|
||||
|
||||
.PHONY: clean
|
||||
clean:
|
||||
rm -f $(TARGETS) emul.o forth/*-bin.h forth/forth?.bin blkfs
|
||||
rm -f $(TARGETS) emul.o *-bin.h forth?.bin blkfs
|
||||
$(MAKE) -C ../tools clean
|
||||
|
@ -2,7 +2,7 @@
|
||||
#include <stdio.h>
|
||||
#include <unistd.h>
|
||||
#include <termios.h>
|
||||
#include "../emul.h"
|
||||
#include "emul.h"
|
||||
#include "forth1-bin.h"
|
||||
|
||||
// in sync with glue.asm
|
@ -1,7 +1,7 @@
|
||||
#include <stdint.h>
|
||||
#include <stdio.h>
|
||||
#include <unistd.h>
|
||||
#include "../emul.h"
|
||||
#include "emul.h"
|
||||
#ifdef STAGE2
|
||||
#include "forth1-bin.h"
|
||||
#include "blkfs-bin.h"
|
@ -1,7 +1,7 @@
|
||||
TARGET = stage1.bin
|
||||
BASEDIR = ../..
|
||||
FDIR = $(BASEDIR)/forth
|
||||
EDIR = $(BASEDIR)/emul/forth
|
||||
EDIR = $(BASEDIR)/emul
|
||||
STAGE2 = $(EDIR)/stage2
|
||||
EMUL = $(BASEDIR)/emul/hw/rc2014/classic
|
||||
|
||||
@ -36,4 +36,3 @@ $(EMUL):
|
||||
.PHONY: emul
|
||||
emul: $(EMUL) $(TARGET)
|
||||
$(EMUL) $(TARGET)
|
||||
|
||||
|
@ -1,9 +1,7 @@
|
||||
: (c<) KEY DUP EMIT ;
|
||||
: INIT
|
||||
: _
|
||||
ACIA$
|
||||
." Collapse OS" CRLF
|
||||
( 0c == CINPTR )
|
||||
['] (c<) 0x0c RAM+ !
|
||||
;
|
||||
INIT
|
||||
|
||||
; _
|
||||
|
@ -2,5 +2,5 @@ EMULDIR = ../emul
|
||||
|
||||
.PHONY: run
|
||||
run:
|
||||
$(MAKE) -C $(EMULDIR) forth/forth
|
||||
$(MAKE) -C $(EMULDIR) all
|
||||
cd forth && ./runtests.sh
|
||||
|
@ -1,8 +1,7 @@
|
||||
#!/bin/sh -e
|
||||
|
||||
BASE=../..
|
||||
EXEC="${BASE}/emul/forth/forth"
|
||||
FDIR="${BASE}/forth"
|
||||
EXEC="${BASE}/emul/forth"
|
||||
TMP=$(mktemp)
|
||||
|
||||
chk() {
|
||||
|
Loading…
Reference in New Issue
Block a user