-
Notifications
You must be signed in to change notification settings - Fork 3
/
Makefile.orig
46 lines (34 loc) · 947 Bytes
/
Makefile.orig
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
PROG=$(shell basename $(shell pwd))
MYBMM_SRC=.
TRANSPORTS=$(shell cat $(MYBMM_SRC)/Makefile | grep ^TRANSPORTS | head -1 | awk -F= '{ print $$2 }')
SRCS=main.c module.c jk.c jk_info.c parson.c list.c utils.c $(TRANSPORTS)
OBJS=$(SRCS:.c=.o)
CFLAGS=-DJKTOOL -I$(MYBMM_SRC)
#CFLAGS+=-Wall -O2 -pipe
CFLAGS+=-Wall -g -DDEBUG
LIBS+=-ldl -lgattlib -lglib-2.0 -lpthread
#LIBS+=-ldl -lgatt -lglib-2.0 -lpthread
LDFLAGS+=-rdynamic -static
vpath %.c $(MYBMM_SRC)
.PHONY: all
all: $(PROG)
$(PROG): $(OBJS) $(DEPS)
$(CC) $(CFLAGS) $(LDFLAGS) -o $(PROG) $(OBJS) $(LIBS)
$(OBJS): Makefile
include $(MYBMM_SRC)/Makefile.dep
debug: $(PROG)
gdb ./$(PROG)
install: $(PROG)
install -m 755 -o bin -g bin $(PROG) /usr/bin/$(PROG)
clean:
rm -rf $(PROG) $(OBJS) $(CLEANFILES)
zip: $(PROG)
rm -f $(PROG)_pi_static.zip
zip $(PROG)_pi_static.zip $(PROG)
push: clean
git add -A .
git commit -m refresh
git push
pull: clean
git reset --hard
git pull