lh | e3922f9 | 2024-11-05 02:40:56 -0800 | [diff] [blame] | 1 | SHELL = /bin/sh |
| 2 | RM = rm -f |
| 3 | |
| 4 | LOCAL_CFLAGS := -Wall \ |
| 5 | -g -Os \ |
| 6 | -std=gnu++14 \ |
| 7 | -flto \ |
| 8 | -fPIC \ |
| 9 | -D__LINUX_OS__ \ |
| 10 | |
| 11 | |
| 12 | |
| 13 | LOCAL_PATH = . |
| 14 | $(warning ################# LEI ROOT: $(ROOT),includedir:$(includedir),LOCAL_PATH:$(LOCAL_PATH)) |
| 15 | LOCAL_C_INCLUDES = \ |
| 16 | -I. \ |
| 17 | -I./include \ |
| 18 | -I$(LOCAL_PATH)/include \ |
| 19 | -I$(LOCAL_PATH) \ |
| 20 | -I$(ROOT)$(includedir)/ \ |
| 21 | -I$(ROOT)$(includedir)/include \ |
| 22 | |
| 23 | |
| 24 | LOCAL_LIBS := \ |
| 25 | -L. \ |
| 26 | -ldl \ |
| 27 | -lstdc++ \ |
| 28 | -llog \ |
| 29 | -lcutils \ |
| 30 | -lutils \ |
| 31 | -lbinder \ |
| 32 | -lpthread \ |
| 33 | -llynq-uci \ |
| 34 | -llynq-misc \ |
| 35 | |
| 36 | SOURCES = ./lynq_sdk_ready.cpp |
| 37 | |
| 38 | EXECUTABLE = liblynq-sdk-ready.so |
| 39 | |
| 40 | OBJECTS=$(SOURCES:.cpp=.o) |
| 41 | |
| 42 | |
| 43 | .PHONY: build clean |
| 44 | all: build |
| 45 | $(EXECUTABLE): $(OBJECTS) |
| 46 | $(CXX) -shared -Wl,--no-undefined $(OBJECTS) $(LOCAL_LIBS) $(LOCAL_CFLAGS) $(LOCAL_C_INCLUDES) -o $@ |
| 47 | |
| 48 | %.o : %.cpp |
| 49 | $(CXX) $(LOCAL_C_INCLUDES) $(LOCAL_CFLAGS) $(LOCAL_LIBS) -o $@ -c $< |
| 50 | |
| 51 | build: $(EXECUTABLE) |
| 52 | $(warning ########## build $(EXECUTABLE) ##########) |
| 53 | |
| 54 | .PHONY: clean |
| 55 | clean: |
| 56 | $(RM) $(OBJECTS) $(EXECUTABLE) |