Use 'ao-dbg' instead of 's51' to communicate with TeleMetrum
[fw/sdcc] / support / tests / dhrystone / Makefile
index da2343ef14164d6ab196163510718a1cf0969993..62d194fa2e982ccf6e55d15d24705bac0bb9d051 100644 (file)
@@ -1,36 +1,30 @@
 # Simple Makefile for dhrystone and sdcc
+TOPDIR = ../../..
+
+PROC = z80
+
+CC = $(TOPDIR)/bin/sdcc
 
-#CC = /home/michaelh/projects/sdcc/bin/sdcc
 # -DNOENUM is here to make the results more predictable
-#CFLAGS = -mgbz80 -v --dumpall
-CC = lcc-gb
-CFLAGS = -int16 -DSDCC=1 -v
-CFLAGS += -DREG= -DNOSTRUCTASSIGN -DNOENUM -DBROKEN_SDCC=0 -DHZ=100
-LIBDIR = /home/michaelh/projects/sdcc/device/lib/gbz80/
-LD = link-gb
-AS = as-gb
+CFLAGS += -DREG= -DNOSTRUCTASSIGN -DNOENUM -V -m$(PROC) --profile --dumpall --stack-auto
 
 OBJ = dhry.o
 
-all: dhry
+all: dhry.bin
 
-dhry: $(OBJ)
-       $(LD) -n -- -z -m -k$(LIBDIR) -lz80.lib \
-       -b_CODE=0x200 dhry.gb $(LIBDIR)crt0.o $(OBJ)
-#      cat dhry.ihx | ../../makebin/makebin > dhry.rom
+dhry.ihx: dhry.c
+       $(CC) $(CFLAGS) dhry.c
 
-native:
-       gcc -g -O2 -DREG= -DNOSTRUCTASSIGN -DNOENUM -o dhry dhry.c
+dhry.gb: dhry.c
+       $(CC) $(CFLAGS) dhry.c
 
-.c.o:
-       $(CC) $(CFLAGS) $<
+dhry.c: dhry.h
 
-dhry.c:
+dhry.bin: dhry.ihx
+       cat $< | $(TOPDIR)/bin/makebin > $@
 
-clean:
-       rm -r *~ dhry
+native:
+       gcc -g -O2 -DREG= -DNOSTRUCTASSIGN -DNOENUM -o dhry dhry.c
 
-dhry.o: dhry.c
-       /usr/lib/SDK/gbz80-gb/2.1.0/bin/cpp -DINT_16_BITS -D__STDC__=1 -DZ80 -DGB -DGAMEBOY -D__LCC__ -DSDCC=1 -DREG= -DNOSTRUCTASSIGN -DNOENUM -DBROKEN_SDCC=0 -DHZ=100 -I/usr/lib/sdcc/include dhry.c dhry.i
-       /usr/lib/SDK/gbz80-gb/2.1.0/bin/rcc -target=gbz80/int16 -optimize -v dhry.i dhry.asm
-       $(AS) -plosff dhry.o dhry.asm
\ No newline at end of file
+clean:
+       rm -f *~ dhry *.o *.gb *.ihx *.rel *.dump* *.lst *.sym *.map *.asm *.bin *.gb