We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
#auto add thread predefine and faster code #https://stackoverflow.com/questions/23250863/difference-between-pthread-and-lpthread-while-compiling
TARGET1 = rtsp_server TARGET2 = rtsp_pusher TARGET3 = rtsp_h264_file
CROSS_COMPILE = CXX = $(CROSS_COMPILE)g++ CC = $(CROSS_COMPILE)gcc #STRIP = $(CROSS_COMPILE)strip
INC = -I$(shell pwd)/src/ -I$(shell pwd)/src/net -I$(shell pwd)/src/xop -I$(shell pwd)/src/3rdpart LIB =
#DEUBG = -D_DEBUG #LD_FLAGS = -lrt -pthread -lpthread -ldl -lm $(DEBUG) #CXX_FLAGS = -std=c++11 #O_FLAG = -O2 CXX_FLAGS = -O3 -g -fPIC -pthread -fmessage-length=0 -std=c++14 LD_FLAGS = -ldl -lm -lrt -lpthread OBJS_PATH = objs
SRC1 = $(notdir $(wildcard ./src/net/*.cpp)) OBJS1 = $(patsubst %.cpp,$(OBJS_PATH)/%.o,$(SRC1))
SRC2 = $(notdir $(wildcard ./src/xop/*.cpp)) OBJS2 = $(patsubst %.cpp,$(OBJS_PATH)/%.o,$(SRC2))
SRC3 = $(notdir $(wildcard ./example/rtsp_server.cpp)) OBJS3 = $(patsubst %.cpp,$(OBJS_PATH)/%.o,$(SRC3))
SRC4 = $(notdir $(wildcard ./example/rtsp_pusher.cpp)) OBJS4 = $(patsubst %.cpp,$(OBJS_PATH)/%.o,$(SRC4))
SRC5 = $(notdir $(wildcard ./example/rtsp_h264_file.cpp)) OBJS5 = $(patsubst %.cpp,$(OBJS_PATH)/%.o,$(SRC5))
$(OBJS_PATH)/%.o : ./example/%.cpp $(CXX) $(CXX_FLAGS) $(INC) -c $< -o $@ $(OBJS_PATH)/%.o : ./src/net/%.cpp $(CXX) $(CXX_FLAGS) $(INC) -c $< -o $@ $(OBJS_PATH)/%.o : ./src/xop/%.cpp $(CXX) $(CXX_FLAGS) $(INC) -c $< -o $@
$(TARGET1) : $(OBJS1) $(OBJS2) $(OBJS3) $(CXX) $(CXX_FLAGS) $^ -o $@ $(LD_FLAGS) $(TARGET2) : $(OBJS1) $(OBJS2) $(OBJS4) $(CXX) $(CXX_FLAGS) $^ -o $@ $(LD_FLAGS) $(TARGET3) : $(OBJS1) $(OBJS2) $(OBJS5) $(CXX) $(CXX_FLAGS) $^ -o $@ $(LD_FLAGS)
BUILD_DIR: @-mkdir -p $(OBJS_PATH)
all: BUILD_DIR $(TARGET1) $(TARGET2) $(TARGET3)
clean: -rm -rf $(OBJS_PATH) $(TARGET1) $(TARGET2) $(TARGET3)
The text was updated successfully, but these errors were encountered:
No branches or pull requests
#auto add thread predefine and faster code
#https://stackoverflow.com/questions/23250863/difference-between-pthread-and-lpthread-while-compiling
TARGET1 = rtsp_server
TARGET2 = rtsp_pusher
TARGET3 = rtsp_h264_file
CROSS_COMPILE =
CXX = $(CROSS_COMPILE)g++
CC = $(CROSS_COMPILE)gcc
#STRIP = $(CROSS_COMPILE)strip
INC = -I$(shell pwd)/src/ -I$(shell pwd)/src/net -I$(shell pwd)/src/xop -I$(shell pwd)/src/3rdpart
LIB =
#DEUBG = -D_DEBUG
#LD_FLAGS = -lrt -pthread -lpthread -ldl -lm $(DEBUG)
#CXX_FLAGS = -std=c++11
#O_FLAG = -O2
CXX_FLAGS = -O3 -g -fPIC -pthread -fmessage-length=0 -std=c++14
LD_FLAGS = -ldl -lm -lrt -lpthread
OBJS_PATH = objs
SRC1 =$(notdir $ (wildcard ./src/net/*.cpp))$(patsubst %.cpp,$ (OBJS_PATH)/%.o,$(SRC1))
OBJS1 =
SRC2 =$(notdir $ (wildcard ./src/xop/*.cpp))$(patsubst %.cpp,$ (OBJS_PATH)/%.o,$(SRC2))
OBJS2 =
SRC3 =$(notdir $ (wildcard ./example/rtsp_server.cpp))$(patsubst %.cpp,$ (OBJS_PATH)/%.o,$(SRC3))
OBJS3 =
SRC4 =$(notdir $ (wildcard ./example/rtsp_pusher.cpp))$(patsubst %.cpp,$ (OBJS_PATH)/%.o,$(SRC4))
OBJS4 =
SRC5 =$(notdir $ (wildcard ./example/rtsp_h264_file.cpp))$(patsubst %.cpp,$ (OBJS_PATH)/%.o,$(SRC5))
OBJS5 =
$(OBJS_PATH)/%.o : ./example/%.cpp
$(CXX) $ (CXX_FLAGS) $(INC) -c $ < -o $@
$(CXX) $ (CXX_FLAGS) $(INC) -c $ < -o $@
$(CXX) $ (CXX_FLAGS) $(INC) -c $ < -o $@
$(OBJS_PATH)/%.o : ./src/net/%.cpp
$(OBJS_PATH)/%.o : ./src/xop/%.cpp
BUILD_DIR:
@-mkdir -p $(OBJS_PATH)
all: BUILD_DIR$(TARGET1) $ (TARGET2) $(TARGET3)
clean:$(OBJS_PATH) $ (TARGET1) $(TARGET2) $ (TARGET3)
-rm -rf
The text was updated successfully, but these errors were encountered: