-
Notifications
You must be signed in to change notification settings - Fork 7
Expand file tree
/
Copy pathMakefile
More file actions
36 lines (22 loc) · 719 Bytes
/
Copy pathMakefile
File metadata and controls
36 lines (22 loc) · 719 Bytes
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
CC = gcc
C++ = g++
LINK = g++
LIBS = -L/usr/local/lib -pthread -llog4cplus -lsrt
#must add -fPIC option
CCFLAGS = $(COMPILER_FLAGS) -c -g -fPIC -Wall
C++FLAGS = $(COMPILER_FLAGS) -c -g -fPIC -Wall -std=c++11
TARGET=srt_live_server
INCLUDES = -I. -I./sys -I./net -I./logging -I./rapidjson -I./rapidjson/include
C++FILES = ./srt_live_server.cpp ./srtserver/srt_server.cpp ./srtserver/srt_handle.cpp
CFILES =
OBJFILE = $(CFILES:.c=.o) $(C++FILES:.cpp=.o)
all:$(TARGET)
$(TARGET): $(OBJFILE)
$(LINK) $^ -Wall $(LIBS) -o $@
%.o:%.c
$(CC) -o $@ $(CCFLAGS) $< $(INCLUDES)
%.o:%.cpp
$(C++) -o $@ $(C++FLAGS) $< $(INCLUDES)
clean:
rm -rf $(TARGET)
rm -rf $(OBJFILE)