File: Makefile

package info (click to toggle)
cc1111 2.9.0-4
  • links: PTS
  • area: main
  • in suites: jessie, jessie-kfreebsd
  • size: 38,692 kB
  • ctags: 132,262
  • sloc: ansic: 442,650; cpp: 37,006; sh: 10,334; makefile: 5,511; asm: 5,279; yacc: 2,953; lisp: 1,524; perl: 807; awk: 493; python: 468; lex: 447
file content (60 lines) | stat: -rw-r--r-- 991 bytes parent folder | download | duplicates (10)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60

#DO_GCC=1
DO_Z80=1
#DO_MCS51=1

ifdef DO_GCC
CC = gcc -Wall -g
endif

ifdef DO_Z80
OBJEXT=o
CC = sdcc
MFLAGS = --debug -mz80
endif

ifdef DO_MCS51
OBJEXT=rel
CC = sdcc
MFLAGS = --debug --model-small --stack-after-data
#CFLAGS = -V
#MFLAGS = --debug --model-large --stack-after-data
#LFLAGS = --xram-loc 0x4000 --code-loc 0x0000
endif


#OBJECTS = test3.c itoa.$(OBJEXT) crc.$(OBJEXT)
OBJECTS = test3.c itoa.$(OBJEXT)

all: test3.ihx

ifdef DO_MCS51
an429.ihx : an429.c
	sdcc --model-small an429.c

test2.ihx : test2.c
	sdcc --model-small test2.c
endif

%.$(OBJEXT): %.c
	$(CC) -c $(CFLAGS) $(MFLAGS) $<

itoa.rel : itoa.c
	$(CC) -c $(CFLAGS) $(MFLAGS) itoa.c

#crc.rel : crc.c
#	$(CC) -c $(CFLAGS) $(MFLAGS) crc.c

test3.ihx: $(OBJECTS)
	$(CC) $(MFLAGS) $(LFLAGS) $(OBJECTS)

test3.bin: test3.ihx
	makebin < test3.ihx > test3.bin

clean:
	rm -f core *~ \#* *.asm *.cdb *.rel *.hex *.ihx *.lst *.map *.o \
		*.rst *.sym *.lnk *.lib *.bin

testser: test3.ihx
	s51 -Sout=serial.log test3.ihx