-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathmakefile
38 lines (25 loc) · 805 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
INCLUDE = -I$(PROJ_DIR)./
CC=gcc
CFLAGS= -c -Wall -g -std=gnu99
LIBS = -lm
DEFS +=
all: upgrade.bin broadcast.bin
upgrade.bin: upgrade.o conf.o cJSON.o
$(CC) upgrade.o conf.o cJSON.o $(LIBS) -o upgrade.bin
# rule for file "upgrade.o".
main.o: upgrade.c
$(CC) $(CFLAGS) $(INCLUDE) $(DEFS) $(PROJ_DIR)upgrade.c
# rule for file "conf.o".
conf.o: conf.h conf.c
$(CC) $(CFLAGS) $(INCLUDE) $(DEFS) $(PROJ_DIR)conf.c
# rule for file "cJSON.o".
cJSON.o: cJSON.h cJSON.c
$(CC) $(CFLAGS) $(INCLUDE) $(DEFS) $(PROJ_DIR)cJSON.c
broadcast.bin: broadcast.o
$(CC) broadcast.o $(LIBS) -o broadcast.bin
# rule for file "broadcast.o".
broadcast.o: broadcast.c
$(CC) $(CFLAGS) $(INCLUDE) $(DEFS) $(PROJ_DIR)broadcast.c
# rule for cleaning files generated during compilations.
clean:
/bin/rm -f *.bin *.o