blob: f1ca7fc997c6a75c87fe8e249087ab1bfe2aed39 [file] [log] [blame]
you.chen5ef374a2023-12-26 17:25:16 +08001SHELL = /bin/sh
2RM = rm -f
3
4
5LOCAL_CFLAGS := \
6 -Wall \
7 -g \
8 -Wall \
9 -fPIC \
10 -shared \
11 -D__COMPILE_OPTION__ \
12 -D__LINUX_OS__ \
13
14CPPFLAGS=\
15 -std=c++11 \
16
17LOCAL_PATH = .
18
19LOCAL_C_INCLUDES = \
20 -I$(LOCAL_PATH)/include \
21 -I$(ROOT)$(includedir)/gps_hal \
22 -I$(ROOT)$(includedir)/gps_hal/inc \
23 -I$(ROOT)$(includedir)/gps_hal/hardware \
24 -I$(ROOT)$(includedir)/liblog \
25
26LOCAL_LIBS := \
27 -L. \
28 -ldl \
29 -lrt \
30 -llog \
31 -lutils \
32 -lcutils \
33 -lgnsshal \
34 -lpthread \
35# -llynq-log \
36
37$(warning libs=$(LOCAL_LIBS))
38
39CXXSRC=\
40
41SOURCES = $(wildcard *.c wildcard src/*.c)
42
43EXECUTABLE = liblynq-gnss.so
44
45COBJS=$(SOURCES:.c=.o)
46$(warning test)
47all: $(EXECUTABLE)
48$(EXECUTABLE): $(COBJS)
49 $(CXX) -shared -Wl,--no-undefined $(COBJS) $(LOCAL_LIBS) $(LOCAL_CFLAGS) $(LOCAL_C_INCLUDES) -o $@
50
51%.o: %.c
52 $(warning ----->build $<)
53 $(CC) $(LOCAL_C_INCLUDES) $(LOCAL_CFLAGS) $(LOCAL_LIBS) -o $@ -c $<
54
55.PHONY: install clean
56install:
57 mkdir -p $(ROOT)$(base_libdir)/
58 install $(EXECUTABLE) $(ROOT)$(base_libdir)/
59
60clean:
61 rm -f $(EXECUTABLE) rm -rf *.o
62 find ./ -name *.o | xargs rm -rf