Add automatically lib dir make

This commit is contained in:
lionsoul 2018-10-07 20:58:54 +08:00
parent 86104eb31f
commit 253dc12917
1 changed files with 3 additions and 7 deletions

View File

@ -17,13 +17,9 @@ all: ../c/ip2region.c ../c/ip2region.h lua_ip2region.c
$(CC) $(FFLAGS) $(LIBS) ../c/ip2region.c lua_ip2region.c -fPIC -shared -o $(SO_FILE) $(CC) $(FFLAGS) $(LIBS) ../c/ip2region.c lua_ip2region.c -fPIC -shared -o $(SO_FILE)
install: install:
@if [ -d $(LIB_DIR) ];\ sudo mkdir -p $(LIB_DIR); \
then\ sudo cp $(SO_FILE) $(LIB_DIR);\
sudo cp $(SO_FILE) $(LIB_DIR);\ echo "install Ip2region to $(LIB_DIR) successfully.";\
echo "install Ip2region to $(LIB_DIR) successfully.";\
else\
echo "Sorry, $(LIB_DIR) seems not not exits.";\
fi
clean: clean:
find . -name \*.so | xargs rm -f find . -name \*.so | xargs rm -f