blob: 53596dc0b1e70d98347ba3aa371c25e460674ca0 [file] [log] [blame]
rjw0a04f9b2022-02-10 17:43:47 +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$(warning ################# ZHOUQUNCHAO LOCAL_PATH:$(LOCAL_PATH),ROOT: $(ROOT),includedir:$(includedir),libdir:$(libdir))
19
20LOCAL_C_INCLUDES = \
21 -I$(LOCAL_PATH)/include \
22 -I$(ROOT)$(includedir)/gps_hal \
23 -I$(ROOT)$(includedir)/gps_hal/inc \
24 -I$(ROOT)$(includedir)/gps_hal/hardware \
25 -I$(ROOT)$(includedir)/liblog \
26 -I$(ROOT)$(includedir)/liblog \
27
28LOCAL_LIBS := \
29 -L. \
30 -ldl \
31 -lrt \
32 -llog \
33 -lutils \
34 -lcutils \
35 -lgnsshal \
36 -lpthread \
37# -llynq-log \
38
39$(warning libs=$(LOCAL_LIBS))
40
41CXXSRC=\
42
43SOURCES = $(wildcard *.c wildcard src/*.c)
44
45EXECUTABLE = liblynq-gnss.so
46
47COBJS=$(SOURCES:.c=.o)
48$(warning test)
49all: $(EXECUTABLE)
50$(EXECUTABLE): $(COBJS)
51 $(CXX) -shared -Wl,--no-undefined $(COBJS) $(LOCAL_LIBS) $(LOCAL_CFLAGS) $(LOCAL_C_INCLUDES) -o $@
52
53%.o: %.c
54 $(warning ----->build $<)
55 $(CC) $(LOCAL_C_INCLUDES) $(LOCAL_CFLAGS) $(LOCAL_LIBS) -o $@ -c $<
56
57.PHONY: install clean
58install:
59 mkdir -p $(ROOT)$(base_libdir)/
60 install $(EXECUTABLE) $(ROOT)$(base_libdir)/
61
62clean:
63 rm -f $(EXECUTABLE) rm -rf *.o
64 find ./ -name *.o | xargs rm -rf