OpenCores
URL https://opencores.org/ocsvn/tv80/tv80/trunk

Subversion Repositories tv80

[/] [tv80/] [trunk/] [tests/] [Makefile] - Blame information for rev 95

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 2 ghutchis
# Makefile for Z80 C/Assembly files
2 32 ghutchis
# SDCC_HOME environment variable should be set to SDCC install location
3 2 ghutchis
 
4 32 ghutchis
SDCC_ROOT=$(SDCC_HOME)
5 2 ghutchis
CC=$(SDCC_ROOT)/bin/sdcc -mz80
6
AS=$(SDCC_ROOT)/bin/as-z80
7
LD=$(SDCC_ROOT)/bin/link-z80
8
IHEX2MEM=../scripts/ihex2mem.py
9 32 ghutchis
LINK_OPTIONS=-- -m -j -x -b_CODE=0x0200 -b_DATA=0x8000 -k$(SDCC_ROOT)/device/lib/z80 -k$(SDCC_ROOT)/lib/z80 -lz80
10 2 ghutchis
AS_LINK_OPTIONS=-bBOOT_VEC=0x0000 -bINT_VEC=0x0038
11
C_LINK_OPTIONS=$(SDCC_ROOT)/share/sdcc/lib/z80/crt0.o
12
 
13
%.vmem : %.ihx
14
        $(IHEX2MEM) $^ $@
15
 
16
%.ihx : %.c
17
        $(CC) $^
18 89 ghutchis
        rm -f $*.asm
19 2 ghutchis
 
20
%.o   : %.asm
21 89 ghutchis
        $(AS) -l -o $*.o $^
22 2 ghutchis
 
23 95 ghutchis
#hello.ihx : hello.c bintr_crt0.o
24
#       $(CC) $^ --no-std-crt0 bintr_crt0.o
25
otir.ihx : otir.o
26
        $(CC) --no-std-crt0 $^
27
 
28 2 ghutchis
%.ihx : %.o
29 89 ghutchis
        #$(LD) $(LINK_OPTIONS) $(AS_LINK_OPTIONS) -i $* $^ -e
30 95 ghutchis
        $(CC) $^
31 2 ghutchis
 
32 32 ghutchis
bintr.ihx : bintr.c bintr_crt0.o
33
        $(CC) --no-std-crt0 bintr.c bintr_crt0.o
34
 
35 77 ghutchis
rc4.o : rc4.c
36
        $(CC) -c -I. $^
37
 
38
rc4test.o : rc4test.c
39
        $(CC) -c -I. $^
40
 
41
rc4test.ihx : rc4test.o rc4.o
42
        $(CC) $^
43
 
44 2 ghutchis
clean :
45
        rm -f *.map
46
        rm -f *.mem
47
        rm -f *.rel
48
        rm -f *.rst
49
        rm -f *.sym
50
        rm -f *.o
51
        rm -f *.lnk
52
        rm -f *.ihx
53
        rm -f *.lst
54
        rm -f *.vmem
55
 

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.