]> git.gag.com Git - fw/sdcc/blob - support/tests/dhrystone/Makefile
* Got dhrystone working - 83/s on a 4MHz Z80!
[fw/sdcc] / support / tests / dhrystone / Makefile
1 # Simple Makefile for dhrystone and sdcc
2
3 CC = /home/michaelh/projects/sdcc/bin/sdcc
4 # -DNOENUM is here to make the results more predictable
5 CFLAGS = -mz80 -v
6 CFLAGS += -DREG= -DNOSTRUCTASSIGN -DNOENUM -DBROKEN_SDCC=1
7 LIBDIR = /home/michaelh/projects/sdcc/device/lib/z80/
8 LD = link-z80
9
10 OBJ = dhry.o
11
12 all: dhry
13
14 dhry: $(OBJ)
15         $(LD) -n -- -i -j -k$(LIBDIR) -lz80.lib \
16         -b_CODE=0x200 -b_DATA=0xc000 dhry.ihx $(LIBDIR)crt0.o $(OBJ)
17         cat dhry.ihx | ../../makebin/makebin > dhry.rom
18
19 native:
20         gcc -g -O2 -DREG= -DNOSTRUCTASSIGN -DNOENUM -o dhry dhry.c
21
22 .c.o:
23         $(CC) $(CFLAGS) $<
24
25 dhry.c: $(CC)
26
27 clean:
28         rm -r *~ dhry
29