2022-06-19 23:54:03 +00:00
|
|
|
|
2022-09-17 22:33:48 +00:00
|
|
|
.SILENT:
|
|
|
|
|
2022-07-21 00:06:47 +00:00
|
|
|
CC65=../../bin/cc65
|
|
|
|
CL65=../../bin/cl65
|
|
|
|
CA65=../../bin/ca65
|
|
|
|
SIM65=../../bin/sim65
|
|
|
|
|
2022-11-12 01:03:23 +00:00
|
|
|
OPT=-O
|
2022-06-19 23:54:03 +00:00
|
|
|
|
2022-11-12 01:03:23 +00:00
|
|
|
TDIR=../val
|
2022-06-19 23:54:03 +00:00
|
|
|
|
2022-11-12 01:03:23 +00:00
|
|
|
all: quick
|
2022-09-17 22:36:30 +00:00
|
|
|
|
2022-06-19 23:54:03 +00:00
|
|
|
##############################################################################
|
2022-09-13 21:26:09 +00:00
|
|
|
|
2022-11-12 01:03:23 +00:00
|
|
|
quick.bin: quick.c
|
|
|
|
$(CC65) $(OPT) -t sim6502 --add-source -o quick.s quick.c
|
|
|
|
# gdb --args $(CC65) $(OPT) -t sim6502 --add-source -o quick.s quick.c
|
|
|
|
$(CL65) $(OPT) -t sim6502 -o quick.bin quick.s
|
2022-09-13 21:26:09 +00:00
|
|
|
|
2022-11-12 01:03:23 +00:00
|
|
|
.PHONY: quick
|
2022-09-17 22:33:48 +00:00
|
|
|
|
2022-11-12 01:03:23 +00:00
|
|
|
quick: quick.bin
|
|
|
|
$(SIM65) quick.bin
|
2022-09-17 22:33:48 +00:00
|
|
|
|
2022-11-12 01:03:23 +00:00
|
|
|
quick.c64.s: quick.c
|
2022-07-21 00:06:47 +00:00
|
|
|
$(CC65) $(OPT) -DCONIO -t c64 -I ./include -I ./cbmkernal --add-source -o quick.c64.s quick.c
|
2022-11-12 01:03:23 +00:00
|
|
|
quick.prg: quick.c64.s
|
|
|
|
$(CL65) $(OPT) -t c64 -I ./include -I ./cbmkernal -o quick.prg quick.c64.s
|
2022-09-17 22:33:48 +00:00
|
|
|
|
|
|
|
runc64-quick: quick.prg
|
2022-06-19 23:54:03 +00:00
|
|
|
x64sc -autostartprgmode 1 quick.prg
|
|
|
|
###############################################################################
|
2022-09-17 22:33:48 +00:00
|
|
|
# test against GCC
|
|
|
|
|
2022-11-12 01:03:23 +00:00
|
|
|
COPT=-m32 -mpc32
|
|
|
|
|
|
|
|
gccminimal: $(TDIR)/float-minimal.c gccstubs.c
|
|
|
|
gcc $(COPT) -I ./ "-D__fastcall__= " -o float-minimal $(TDIR)/float-minimal.c gccstubs.c -lm
|
2022-11-18 00:52:18 +00:00
|
|
|
gccbasic-const-const: $(TDIR)/float-basic-const-const.c gccstubs.c
|
|
|
|
gcc $(COPT) -I ./ "-D__fastcall__= " -o float-basic-const-const $(TDIR)/float-basic-const-const.c gccstubs.c -lm
|
|
|
|
gccbasic-var-const: $(TDIR)/float-basic-var-const.c gccstubs.c
|
|
|
|
gcc $(COPT) -I ./ "-D__fastcall__= " -o float-basic-var-const $(TDIR)/float-basic-var-const.c gccstubs.c -lm
|
|
|
|
gccbasic-const-var: $(TDIR)/float-basic-const-var.c gccstubs.c
|
|
|
|
gcc $(COPT) -I ./ "-D__fastcall__= " -o float-basic-const-var $(TDIR)/float-basic-const-var.c gccstubs.c -lm
|
|
|
|
gccbasic-var-var: $(TDIR)/float-basic-var-var.c gccstubs.c
|
|
|
|
gcc $(COPT) -I ./ "-D__fastcall__= " -o float-basic-var-var $(TDIR)/float-basic-var-var.c gccstubs.c -lm
|
2022-11-12 01:03:23 +00:00
|
|
|
gccconv: $(TDIR)/float-conv.c gccstubs.c
|
|
|
|
gcc $(COPT) -I ./ "-D__fastcall__= " -o float-conv $(TDIR)/float-conv.c gccstubs.c -lm
|
|
|
|
gcccmp: $(TDIR)/float-cmp.c gccstubs.c
|
|
|
|
gcc $(COPT) -I ./ "-D__fastcall__= " -o float-cmp $(TDIR)/float-cmp.c gccstubs.c -lm
|
|
|
|
gccmisc: $(TDIR)/float-misc.c gccstubs.c
|
|
|
|
gcc $(COPT) -I ./ "-D__fastcall__= " -o float-misc $(TDIR)/float-misc.c gccstubs.c -lm
|
2022-09-17 22:33:48 +00:00
|
|
|
gccquick: quick.c gccstubs.c
|
2022-11-12 01:03:23 +00:00
|
|
|
gcc $(COPT) -I ./ "-D__fastcall__= " -o quick quick.c gccstubs.c -lm
|
2022-06-19 23:54:03 +00:00
|
|
|
|
2022-09-17 22:33:48 +00:00
|
|
|
rungcc-minimal: gccminimal
|
|
|
|
./float-minimal
|
2022-11-18 00:52:18 +00:00
|
|
|
rungcc-basic: gccbasic-const-const gccbasic-var-const gccbasic-const-var gccbasic-var-var
|
|
|
|
./float-basic-const-const
|
|
|
|
./float-basic-var-const
|
|
|
|
./float-basic-const-var
|
|
|
|
./float-basic-var-var
|
2022-09-17 22:33:48 +00:00
|
|
|
rungcc-conv: gccconv
|
|
|
|
./float-conv
|
|
|
|
rungcc-cmp: gcccmp
|
|
|
|
./float-cmp
|
|
|
|
rungcc-misc: gccmisc
|
|
|
|
./float-misc
|
|
|
|
rungcc-quick: gccquick
|
|
|
|
./quick
|
2022-06-19 23:54:03 +00:00
|
|
|
|
2022-11-12 01:03:23 +00:00
|
|
|
rungcc: gccminimal gccconv gccbasic gcccmp gccmisc gccquick
|
|
|
|
./float-minimal
|
2022-09-17 22:33:48 +00:00
|
|
|
./float-basic
|
|
|
|
./float-conv
|
|
|
|
./float-cmp
|
|
|
|
./float-misc
|
2022-09-13 21:26:09 +00:00
|
|
|
|
2022-06-19 23:54:03 +00:00
|
|
|
###############################################################################
|
|
|
|
|
|
|
|
clean:
|
2022-09-17 22:33:48 +00:00
|
|
|
$(RM) ./float-minimal
|
|
|
|
$(RM) ./float-basic
|
|
|
|
$(RM) ./float-cmp
|
|
|
|
$(RM) ./float-conv
|
|
|
|
$(RM) ./float-misc
|
|
|
|
$(RM) ./quick
|
2022-11-12 01:03:23 +00:00
|
|
|
$(RM) ./quick.bin
|
|
|
|
$(RM) ./quick.s
|
2022-06-19 23:54:03 +00:00
|
|
|
|
2022-11-12 01:03:23 +00:00
|
|
|
$(RM) quick.prg
|
2022-06-19 23:54:03 +00:00
|
|
|
$(RM) quick.c64.s
|
2022-11-17 18:16:39 +00:00
|
|
|
$(RM) quick.s
|