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

Subversion Repositories tv80

[/] [tv80/] [trunk/] [sc_env/] [app_localcfg/] [zsrc/] [Makefile] - Blame information for rev 113

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

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

powered by: WebSVN 2.1.0

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