blob: 08587b806ae31d5a6c215db37455ca26b3c8c33d (
plain)
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
|
CSRCS=nrfdfu.c util.c zip.c ble.c manifest.c dfu.c
PROG=nrfdfu
OPT=-g
CPROTO=cproto
ZIP_INCLUDES=$(shell pkg-config --cflags libzip)
ZIP_LIBS=$(shell pkg-config --libs libzip)
JSON_C_INCLUDES=$(shell pkg-config --cflags json-c)
JSON_C_LIBS=$(shell pkg-config --libs json-c)
BLUEZ_INCLUDES=$(shell pkg-config --cflags bluez)
BLUEZ_LIBS=$(shell pkg-config --libs bluez)
INCLUDES=${ZIP_INCLUDES} ${JSON_C_INCLUDES} ${BLUEZ_INCLUDES}
LIBS=${ZIP_LIBS} ${JSON_C_LIBS} ${BLUEZ_LIBS}
CPPFLAGS=${DEFINES} ${INCLUDES}
CFLAGS=${OPT}
OBJS=${CSRCS:%.c=%.o}
all: ${PROG}
${PROG}:${OBJS}
${CC} ${CFLAGS} ${LDFLAGS} -o ${PROG} ${OBJS} ${LIBS}
protos:
echo > prototypes.h
${CPROTO} ${CPPFLAGS} -e -v ${CSRCS} > prototypes.new
mv prototypes.new prototypes.h
clean:
/bin/rm -f ${OBJS}
|