前端之家收集整理的这篇文章主要介绍了
Sqlite3通过Makefile编译成动态链接库,
前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。
TARGET_LIB:=libsqlite3.so
LIBS := -lpthread -ldl
CFLAGS := -g -Wall -shared -fPIC -I. $(LIBS)
CC := mipsel-openwrt-linux-gcc #交叉编译下的编译路径
STRIP := mipsel-openwrt-linux-strip
OBJ := sqlite3.o
all: $(TARGET_LIB)
$(TARGET_LIB): $(OBJ)
@echo -e "\033[32mBuilding $(TARGET_LIB) ...\033[0m"
$(CC) $(CFLAGS) -o $(TARGET_LIB) $(OBJ)
$(STRIP) $(TARGET_LIB)
install:
cp $(TARGET_LIB) ../../lib/
cp sqlite3.h ../../include/
clean:
@echo -e "\033[32mCleaning $(TARGET_LIB) ...\033[0m"
rm -rf *.o $(TARGET_LIB)
.PHONY: all clean install
原文链接:/sqlite/200300.html