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

Subversion Repositories z80soc

[/] [z80soc/] [trunk/] [V0.7.3/] [Software/] [C/] [testsys/] [Makefile] - Blame information for rev 46

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 46 rrred
PROGRAMNAME=testsys
2
 
3
ROMDIR=~/Dev/z80soc-local/hw/0.7.3/ROMdata
4
 
5
IDIR =./include
6
CC=sdcc
7
CFLAGS=-I$(IDIR)
8
 
9
ODIR=.
10
LDIR=./lib
11
 
12
LIBS=-lm
13
 
14
_DEPS = z80soc.h
15
DEPS = $(patsubst %,$(IDIR)/%,$(_DEPS))
16
 
17
_OBJ = z80soc.rel
18
OBJ = $(patsubst %,$(ODIR)/%,$(_OBJ))
19
 
20
 
21
$(ODIR)/%.rel: $(PROGRAMNAME)/%.c $(DEPS)
22
        $(CC) -mz80  $(CFLAGS) -c -o $@ $<
23
 
24
$(PROGRAMNAME): $(OBJ)
25
        sdasz80 -o crt0.rel $(PROGRAMNAME)/crt0.s
26
        $(CC) -mz80 $(CFLAGS) --code-loc 0x0100 --data-loc 0x0000 --no-std-crt0 crt0.rel $^ $(PROGRAMNAME)/$@.c
27
        touch $(ROMDIR)/rom.hex $(ROMDIR)/rom.mif $(ROMDIR)/rom.coe
28
        rm *.lst *.sym *.lk *.noi $(ROMDIR)/rom.*
29
        packihx $(PROGRAMNAME).ihx        > $(PROGRAMNAME).hex
30
        bin/hex2mif.sh $(PROGRAMNAME).ihx > $(PROGRAMNAME).mif
31
        bin/mif2coe.sh $(PROGRAMNAME).mif > $(PROGRAMNAME).coe
32
        cp $(PROGRAMNAME).hex $(ROMDIR)/rom.hex
33
        cp $(PROGRAMNAME).mif $(ROMDIR)/rom.mif
34
        cp $(PROGRAMNAME).coe $(ROMDIR)/rom.coe
35
 
36
 
37
.PHONY: clean
38
 
39
clean:
40
        rm -f *.rel *.lst *.sym *.ihx *.asm *.lk *.map *.noi
41
 

powered by: WebSVN 2.1.0

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