forked from Edward-Wu/srt-live-server
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
74 lines (64 loc) · 2.19 KB
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
SHELL = /bin/sh
MAIN_NAME=sls
CLIENT_NAME=slc
INC_PATH = -I./ -I../ -I./slscore -I./include
LIB_PATH = -L ./lib
LIBRARY_FILE = -lpthread -lz -lsrt -lssl -lcrypto -ldl
BIN_PATH = ./bin
INSTALL_PREFIX = /usr/local/sls
DEBUG = -g
CFLAGS += $(DEBUG)
LOG_PATH = ./logs
OUTPUT_PATH = ./obj
OBJS = $(OUTPUT_PATH)/SLSLog.o \
$(OUTPUT_PATH)/common.o\
$(OUTPUT_PATH)/conf.o\
$(OUTPUT_PATH)/SLSThread.o\
$(OUTPUT_PATH)/SLSEpollThread.o\
$(OUTPUT_PATH)/SLSManager.o\
$(OUTPUT_PATH)/SLSGroup.o\
$(OUTPUT_PATH)/SLSRole.o\
$(OUTPUT_PATH)/SLSListener.o\
$(OUTPUT_PATH)/SLSRoleList.o\
$(OUTPUT_PATH)/SLSSrt.o\
$(OUTPUT_PATH)/SLSPublisher.o\
$(OUTPUT_PATH)/SLSPlayer.o\
$(OUTPUT_PATH)/SLSRecycleArray.o\
$(OUTPUT_PATH)/SLSMapData.o\
$(OUTPUT_PATH)/SLSMapPublisher.o\
$(OUTPUT_PATH)/SLSRelay.o\
$(OUTPUT_PATH)/SLSPuller.o\
$(OUTPUT_PATH)/SLSPusher.o\
$(OUTPUT_PATH)/SLSRelayManager.o\
$(OUTPUT_PATH)/SLSPullerManager.o\
$(OUTPUT_PATH)/SLSPusherManager.o\
$(OUTPUT_PATH)/SLSMapRelay.o\
$(OUTPUT_PATH)/SLSClient.o\
$(OUTPUT_PATH)/TCPRole.o\
$(OUTPUT_PATH)/SLSArray.o\
$(OUTPUT_PATH)/HttpRoleList.o\
$(OUTPUT_PATH)/HttpClient.o\
$(OUTPUT_PATH)/SLSSyncClock.o\
$(OUTPUT_PATH)/TSFileTimeReader.o
CORE_PATH = slscore
COMMON_FILES = common.hpp
all: $(OBJS)
mkdir -p ${LOG_PATH}
mkdir -p ${OUTPUT_PATH}
mkdir -p ${BIN_PATH}
${CXX} -o ${BIN_PATH}/${MAIN_NAME} srt-live-server.cpp $(OBJS) $(CFLAGS) $(INC_PATH) $(LIB_PATH) $(LIBRARY_FILE)
${CXX} -o ${BIN_PATH}/${CLIENT_NAME} srt-live-client.cpp $(OBJS) $(CFLAGS) $(INC_PATH) $(LIB_PATH) $(LIBRARY_FILE)
#******************************************************************************#
# Build successful ! #
#******************************************************************************#
$(OUTPUT_PATH)/%.o: ./$(CORE_PATH)/%.cpp
${CXX} -c $(CFLAGS) $< -o $@ $(INC_FLAGS)
install:
mkdir -p $(INSTALL_PREFIX)
install -m 755 $(BIN_PATH)/* $(INSTALL_PREFIX)
cp sls.conf $(INSTALL_PREFIX)/
ln -fs $(INSTALL_PREFIX)/sls /usr/local/bin
ln -fs $(INSTALL_PREFIX)/slc /usr/local/bin
clean:
rm -f $(OUTPUT_PATH)/*.o
rm -rf $(BIN_PATH)/*