Subversion Repositories Bart

Rev

Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
1 mjames 1
# $Header: c:/cvsroot/bart/makefile,v 1.2 2004/03/09 00:45:19 mjames Exp $
2
# $Log: makefile,v $
3
# Revision 1.2  2004/03/09 00:45:19  mjames
4
# Corrected mistakes, made task numbers visible
5
#
6
# Revision 1.1.1.1  2004/03/03 22:54:33  mjames
7
# no message
8
#
9
#
10
CC51 = sdcc
11
AS51 = asx8051
12
LD51 = aslink
13
CPP51 = sdcpp
14
 
15
 
16
 
17
CFLAGS = --debug   -DDEBUG_MODE 
18
# -DSIMULATOR_BUILD --idata-loc 0x40
19
C51FLAGS =  --debug --model-large -D_8051 -DMICROCONTROLLER_T89C51RD2\
20
 $(DATA_FLAGS) -DDEBUG_MODE  --int-long-reent --nooverlay --idata-loc 0x3c --peep-asm  \
21
-DSIMULATOR_BUILD -DSOFT_FLOW
22
#C51FLAGS = --debug --model-large -D_8051 -DMICROCONTROLLER_T89C51RD2\
23
 --int-long-reent --\
24
 --peep-asm --nooverlay
25
 
26
L51FLAGS =  -Wl,-m -Wl,-u
27
 
28
ASFLAGS = 
29
 
30
INCLUDEDIR =/sdcc/include
31
.SUFFIXES:
32
 
33
#.SUFFIXES : .lib .rel .c .asm
34
.SUFFIXES : .lib .rel .o .c .asm 
35
 
36
SRCS= rt_serial.c rt_task.c
37
 
38
 
39
 
40
OBJS:=$(SRCS:.c=.rel)
41
DEPENDS=$(SRCS:.c=.d)
42
 
43
DELS:=$(DEPENDS)
44
DELS+=$(SRCS:.c=.asm)
45
DELS+=$(SRCS:.c=.lst) 
46
DELS+=$(SRCS:.c=.rel)
47
DELS+=$(SRCS:.c=.rst)
48
DELS+=$(SRCS:.c=.sym)
49
DELS+=$(SRCS:.c=.adb)
50
 
51
RELS=$(SRCS:.c=.rel)
52
 
53
 
54
all:  bart.rel
55
 
56
bart.rel: $(RELS)
57
	sdcclib -a  bart.lib rt_serial.rel
58
	sdcclib -a  bart.lib rt_task.rel
59
 
60
 
61
 
62
clean:
63
	rm -f $(OBJS) $(DELS)
64
 
65
 
66
.c.rel:
67
	$(CC51) -c $(C51FLAGS) -I $(INCLUDEDIR)   $*.c 
68
	$(AS51) $(ASFLAGS) $*.asm 
69
 
70
.asm.rel:
71
	$(CPP51) $*.asm > $*.asm1
72
	$(AS51) $(ASFLAGS) $*.asm1
73
 
74
 
75
$(DEPENDS):makefile
76
 
77
-include $(DEPENDS)
78
 
79
# Make rule without using -MMD which sdcc doesnt support
80
%.d:%.c
81
	@echo Making dependency for $<
82
	@echo $<:  > $@
83
	-@grep "#include *\"" < $< | sed "s/#include[ ]*\"\(\w*.h\)\"/	\1\\\/" >> $@
84
	@echo \	makefile >> $@
85
	@cat $@
86
 
87
 
88
# Make rule without using -MMD which sdcc doesnt support
89
%.d:%.c
90
	@echo Making dependency for $<
91
	@echo $<:  > $@
92
	-@grep "#include *\"" < $< | sed "s/#include[ ]*\"\(\w*.h\)\"/	\1\\\/" >> $@
93
	@echo \	makefile >> $@
94
	@echo >> $@
95
	@echo $(<:.c=.rel): makefile >> $@
96
	@cat $@
97
 
98
 
99
 
100