| SHELL = /bin/sh | |
| RM = rm -f | |
| LOCAL_CFLAGS := \ | |
| -Wall \ | |
| -g \ | |
| -Wall \ | |
| -fPIC \ | |
| -shared \ | |
| -D__COMPILE_OPTION__ \ | |
| -D__LINUX_OS__ \ | |
| CPPFLAGS=\ | |
| -std=c++11 \ | |
| LOCAL_PATH = . | |
| LOCAL_C_INCLUDES = \ | |
| -I$(LOCAL_PATH)/include \ | |
| -I$(ROOT)$(includedir)/gps_hal \ | |
| -I$(ROOT)$(includedir)/gps_hal/inc \ | |
| -I$(ROOT)$(includedir)/gps_hal/hardware \ | |
| -I$(ROOT)$(includedir)/liblog \ | |
| LOCAL_LIBS := \ | |
| -L. \ | |
| -ldl \ | |
| -lrt \ | |
| -llog \ | |
| -lutils \ | |
| -lcutils \ | |
| -lgnsshal \ | |
| -lpthread \ | |
| # -llynq-log \ | |
| $(warning libs=$(LOCAL_LIBS)) | |
| CXXSRC=\ | |
| SOURCES = $(wildcard *.c wildcard src/*.c) | |
| EXECUTABLE = liblynq-gnss.so | |
| COBJS=$(SOURCES:.c=.o) | |
| $(warning test) | |
| all: $(EXECUTABLE) | |
| $(EXECUTABLE): $(COBJS) | |
| $(CXX) -shared -Wl,--no-undefined $(COBJS) $(LOCAL_LIBS) $(LOCAL_CFLAGS) $(LOCAL_C_INCLUDES) -o $@ | |
| %.o: %.c | |
| $(warning ----->build $<) | |
| $(CC) $(LOCAL_C_INCLUDES) $(LOCAL_CFLAGS) $(LOCAL_LIBS) -o $@ -c $< | |
| .PHONY: install clean | |
| install: | |
| mkdir -p $(ROOT)$(base_libdir)/ | |
| install $(EXECUTABLE) $(ROOT)$(base_libdir)/ | |
| clean: | |
| rm -f $(EXECUTABLE) rm -rf *.o | |
| find ./ -name *.o | xargs rm -rf |