-
Notifications
You must be signed in to change notification settings - Fork 11
/
Makefile
44 lines (29 loc) · 816 Bytes
/
Makefile
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
OBJS = main.rel BH1750.rel delay.rel DHT11.rel DS18B20.rel i2c.rel PWM3.rel serial.rel timer0.rel
CC = sdcc-sdcc
CFLAGS = -mmcs51
USB = 0
all : main.ihx
main.rel: main.c
$(CC) -c main.c
BH1750.rel: BH1750.c BH1750.h
$(CC) $(CFLAGS) -c BH1750.c
delay.rel: delay.c delay.h
$(CC) $(CFLAGS) -c delay.c
DHT11.rel: DHT11.c DHT11.h
$(CC) $(CFLAGS) -c DHT11.c
DS18B20.rel: DS18B20.c DS18B20.h
$(CC) $(CFLAGS) -c DS18B20.c
i2c.rel: i2c.c i2c.h
$(CC) $(CFLAGS) -c i2c.c
PWM3.rel: PWM3.c PWM3.h
$(CC) $(CFLAGS) -c PWM3.c
serial.rel: serial.c serial.h
$(CC) $(CFLAGS) -c serial.c
timer0.rel: timer0.c timer0.h
$(CC) $(CFLAGS) -c timer0.c
main.ihx: $(OBJS)
$(CC) $(CFLAGS) $(OBJS)
clean:
\rm *.rel *.asm *.lst *.rst *.sym *.ihx *.map *.mem *.lk
install:
stcgal -p /dev/ttyUSB$(USB) -P stc15 main.ihx