-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathMakefile
36 lines (29 loc) · 868 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
CC = gcc
INCDIR = inc
LIBDIR = lib
LORADIR = libloragw/inc
default: libparson.a libloragw.a libinterface_lora.a
rm interface_lora.o
python setup.py build_ext --inplace && rm -f lorthon.c && rm -Rf build
mkdir -p output
cp lorthon.so tst/lorthon.so
mv lorthon.so output/lorthon.so
libloragw.a:
$(MAKE) -C libloragw
libparson.a:
$(MAKE) -C parson
libinterface_lora.a: interface_lora.o
ar rcs $@ $^
mv libinterface_lora.a $(LIBDIR)/libinterface_lora.a
interface_lora.o: src/interface_lora.c inc/interface_lora.h
$(CC) -c $< -I$(INCDIR) -I$(LORADIR) -L. $(LIBDIR)/libparson.a $(LIBDIR)/libloragw.a
clean:
rm -f $(LIBDIR)/libinterface_lora.a
rm -f $(LIBDIR)/libparson.a
rm -f $(LIBDIR)/libloragw.a
rm -f output/lorthon.so
rm -f tst/lorthon.so
rm -f interface_lora.o
rm -f lorthon.so
cd libloragw && $(MAKE) clean
cd parson && $(MAKE) clean