1
0
mirror of https://github.com/cc65/cc65.git synced 2024-11-19 21:32:19 +00:00
cc65/test/float/Makefile

86 lines
2.2 KiB
Makefile

.SILENT:
CC65=../../bin/cc65
CL65=../../bin/cl65
CA65=../../bin/ca65
SIM65=../../bin/sim65
OPT=-O
TDIR=../val
all: quick
##############################################################################
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
.PHONY: quick
quick: quick.bin
$(SIM65) quick.bin
quick.c64.s: quick.c
$(CC65) $(OPT) -DCONIO -t c64 -I ./include -I ./cbmkernal --add-source -o quick.c64.s quick.c
quick.prg: quick.c64.s
$(CL65) $(OPT) -t c64 -I ./include -I ./cbmkernal -o quick.prg quick.c64.s
runc64-quick: quick.prg
x64sc -autostartprgmode 1 quick.prg
###############################################################################
# test against GCC
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
gccbasic: $(TDIR)/float-basic.c gccstubs.c
gcc $(COPT) -I ./ "-D__fastcall__= " -o float-basic $(TDIR)/float-basic.c gccstubs.c -lm
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
gccquick: quick.c gccstubs.c
gcc $(COPT) -I ./ "-D__fastcall__= " -o quick quick.c gccstubs.c -lm
rungcc-minimal: gccminimal
./float-minimal
rungcc-basic: gccbasic
./float-basic
rungcc-conv: gccconv
./float-conv
rungcc-cmp: gcccmp
./float-cmp
rungcc-misc: gccmisc
./float-misc
rungcc-quick: gccquick
./quick
rungcc: gccminimal gccconv gccbasic gcccmp gccmisc gccquick
./float-minimal
./float-basic
./float-conv
./float-cmp
./float-misc
###############################################################################
clean:
$(RM) ./float-minimal
$(RM) ./float-basic
$(RM) ./float-cmp
$(RM) ./float-conv
$(RM) ./float-misc
$(RM) ./quick
$(RM) ./quick.bin
$(RM) ./quick.s
$(RM) quick.prg
$(RM) quick.c64.s