BINARY = $(BUILDDIR)sample#BINARY=./build/sample
all :dir sample package
#第一步骤:创建build目录
#第二步骤:
#第三步骤:打包
ROOTDIR = $(CURDIR)/../ #ROOTDIR=当前路径退一级
toolchain := $(ROOTDIR)toolchain/ # toolchain变量=当前路径退一级/toolchain
xqlibs := $(ROOTDIR)/ # xqlibs变量= 当前路径退一级/
CXX = $(toolchain)/bin/mipsel-openwrt-linux-uclibc-g++ #CXX变量=当前路径退一级进toolchain/bin/mipsel-openwrt-linux-uclibc-g++
CC =$(toolchain)/bin/mipsel-openwrt-linux-uclibc-gcc #CXX变量=当前路径退一级进toolchain/bin/mipsel-openwrt-linux-uclibc-gcc
LIB_DIR = -L$(xqlibs)/lib/ -Wl,-rpath-link,$(toolchain)/lib/ #LIB_DIR = -L当前路径退一级//lib/ -Wl,-rpath-link,当前路径退一级进toolchain/lib/
CXXFLAGS += -I$(xqlibs)/include/ #-I当前路径退一级进include
LDFLAGS = -Wall -O2 -lxmrouter \
-lthrift -lssl -lcrypto -lconfig++ -ljson-c -lboost_atomic \
-lboost_system -lboost_filesystem -lthriftnb -levent -lcurl -lz -lboost_thread -lpthread \
-lroutermain
dir :
mkdir -p $(BUILDDIR) #mkdir -p ./build/创建build目录
sample :
$(CXX) $(CXXFLAGS) Notifier.h Notifier.cpp $(LIB_DIR) $(LDFLAGS) -g -gdwarf-2 -o $(BINARY)
#g++ 当前目录退一级进include,参数I编译Notifier.h Notifier.cpp ,后面就看不懂了
clean:
rm -r build
package:#把start_script复制到build(就是那个跟可执行文件在一起的地方),然后打包
cp start_script build/
../plugin_packager_x64
sample后面的东西们就实在看不懂了,g++后面可以跟那么多参数么
求解释,
2 个解决方案
#1
g++ --help 看解释
#2
g++ -v --help
#1
g++ --help 看解释
#2
g++ -v --help