-
Notifications
You must be signed in to change notification settings - Fork 83
/
Makefile
58 lines (42 loc) · 1.4 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
# Copyright (c) 1999 Apple Computer, Inc. All rights reserved.
#
TARGET = ./SRProxy
C++ = g++
CC = gcc
INCLUDE_FLAG = -include
INCPATH = -I./include
LIBPATH = -lpthread -lz -L./so -lXUdpRpc -lARtcStrm -lSipCall -lXAudCodecSo -lARtmKit -lRtxpChan -lboringssl
CCFLAGS += -Wall -D_GNU_SOURCE -DNDEBUG -O2 -DPOSIX -DNO_DL -DFEATURE_ENABLE_SSL -DLOGGING=1 -D__STDC_FORMAT_MACROS -D__STDC_CONSTANT_MACROS -std=c++11
LFLAGS = -w -lrt -ldl
# EACH DIRECTORY WITH HEADERS MUST BE APPENDED IN THIS MANNER TO THE CCFLAGS
C++FLAGS = $(CCFLAGS)
CFILES =
CPPFILES = \
./src/config.cpp \
./src/main.cpp \
./src/RtcCall.cpp \
./src/RtmToSip.cpp \
./src/SipCallToRtc.cpp \
./src/SipRtcMgr.cpp \
./src/SipRtcStats.cpp \
./src/SipToRtm.cpp \
./src/Timer10Ms.cpp \
./src/XAutoLock.cpp \
./src/XCritSec.cpp \
./src/XThreadBase.cpp \
./src/XUtil.cpp
CCFILES =
all: $(TARGET)
$(TARGET): $(CFILES:.c=.o) $(CCFILES:.cc=.o) $(CPPFILES:.cpp=.o)
$(CXX) $(LFLAGS) $(CFILES:.c=.o) $(CCFILES:.cc=.o) $(CPPFILES:.cpp=.o) -o $(TARGET) $(LIBPATH)
install:
install -m 664 SRProxy ../out/Linux
clean:
rm -f $(TARGET) $(CFILES:.c=.o) $(CCFILES:.cc=.o) $(CPPFILES:.cpp=.o)
.SUFFIXES: .cpp .cc .c .o
.cpp.o:
$(C++) -c -o $*.o $(DEFINES) $(C++FLAGS) $*.cpp $(INCPATH)
.cc.o:
$(C++) -c -o $*.o $(DEFINES) $(C++FLAGS) $*.cc $(INCPATH)
.c.o:
$(CC) -c -o $*.o $(DEFINES) $(CCFLAGS) $*.c $(INCPATH)