SHELL = /bin/sh | |
RM = rm -f | |
LOCAL_CFLAGS := -Wall \ | |
-std=gnu++14 \ | |
-g -Os \ | |
-flto \ | |
-fPIC \ | |
ifeq ($(strip $(TARGET_PLATFORM)), T106) | |
LOCAL_CFLAGS += -DBINDER_IPC_32BIT=1 -DHAVE_ENDIAN_H -DHAVE_PTHREADS -DHAVE_SYS_UIO_H -DHAVE_POSIX_FILEMAP -DHAVE_STRLCPY -DHAVE_PRCTL -DHAVE_MEMSET16 -DHAVE_MEMSET32 -DANDROID_SMP=0 | |
endif | |
LOCAL_CFLAGS += -Werror=format-security | |
$(warning ################# rock ROOT: $(ROOT),includedir:$(includedir),) | |
LOCAL_PATH = . | |
LOCAL_C_INCLUDES = \ | |
-I. \ | |
-I$(LOCAL_PATH)/include \ | |
-I$(ROOT)$(includedir)/logger \ | |
-I$(ROOT)$(includedir)/liblog \ | |
-I$(ROOT)$(includedir)/glib-2.0 \ | |
-I$(ROOT)$(libdir)/glib-2.0/include \ | |
-I$(ROOT)$(includedir) \ | |
LOCAL_LIBS := \ | |
-L. \ | |
-ldl \ | |
-lstdc++ \ | |
-llynq-log \ | |
-llynq-fota \ | |
SOURCES = lynq-fota-backup.cpp | |
EXECUTABLE = lynq-fota-backup | |
OBJECTS=$(SOURCES:.cpp=.o) | |
all: $(EXECUTABLE) | |
$(EXECUTABLE): $(OBJECTS) | |
$(CXX) $(OBJECTS) $(LOCAL_LIBS) $(LOCAL_CFLAGS) $(LOCAL_C_INCLUDES) -o $@ | |
%.o : %.cpp | |
$(CXX) $(LOCAL_C_INCLUDES) $(LOCAL_CFLAGS) $(LOCAL_LIBS) -o $@ -c $< | |
.PHONY: clean | |
clean: | |
$(RM) $(OBJECTS) $(EXECUTABLE) | |
$(RM) $(OBJECTS_TOOL) $(EXECUTABLE) | |