-
Notifications
You must be signed in to change notification settings - Fork 0
/
makefile
31 lines (24 loc) · 885 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
PYTHON_VERSION = 3.10
COMPILER = clang
COMPILER_FLAGS = -fpic -c
LINKER_FLAGS = -shared -Wl,--trace-symbol=tcp_ip_addr,--verbose
PYTHON_INCLUDE = /usr/include/python$(PYTHON_VERSION)
all: edc sbp gps
edc:
swig -python edc.i
$(COMPILER) $(COMPILER_FLAGS) $(PYTHON_INCLUDE) edc.c edc_wrap.c
$(COMPILER) $(LINKER_FLAGS) edc.o edc_wrap.o -o _edc.so
sbp:
swig -python sbp.i
$(COMPILER) $(COMPILER_FLAGS) $(PYTHON_INCLUDE) sbp.c sbp_wrap.c
$(COMPILER) $(LINKER_FLAGS) sbp.o sbp_wrap.o -o _sbp.so edc.o
gps:
swig -python gps.i
$(COMPILER) $(COMPILER_FLAGS) $(PYTHON_INCLUDE) gps.c gps_wrap.c
$(COMPILER) $(LINKER_FLAGS) gps.o gps_wrap.o -o _gps.so edc.o sbp.o
gpsmain:
swig -python main.i
$(COMPILER) $(COMPILER_FLAGS) $(PYTHON_INCLUDE) main.c main_wrap.c
$(COMPILER) $(LINKER_FLAGS) main.o main_wrap.o -o _gpsmain.so gps.o sbp.o edc.o
clean:
rm -f *.o *.so *_wrap.c *.py