-
Notifications
You must be signed in to change notification settings - Fork 2
/
makefile
81 lines (56 loc) · 3.17 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
75
76
77
78
79
80
81
CFLAGS = -Wall -std=c++14 -pthread -D_FILE_OFFSET_BITS=64
LARGS = -pthread
LIBS = -lupnp -lixml -lpthread
CC = g++
OBJECTS = ChildProcess.o Config.o ConnectionManagerService.o ContentDirectoryService.o DirectoryMonitor.o ExternalAVHandler.o ExternalStatusHandler.o FileAVHandler.o HttpRequest.o HttpStatusHandler.o Logging.o main.o MemoryStore.o Server.o Stream.o Transcoder.o util.o
build_bin: CFLAGS += -O3
build_bin: build_objs upnp_live
build_objs: $(OBJECTS)
http_test : src/test.cpp src/util.cpp src/util.h src/HttpRequest.cpp src/HttpRequest.h src/HttpStatusHandler.cpp src/HttpStatusHandler.h src/StatusHandler.h
g++ -std=c++14 -g src/util.cpp src/HttpStatusHandler.cpp src/HttpRequest.cpp src/test.cpp -lupnp -lixml -g -rdynamic -o http_test
util_test : src/test_util.cpp src/util.h src/util.cpp src/Logging.h src/Logging.cpp
g++ -std=c++14 -g src/test_util.cpp src/util.cpp src/Logging.cpp -g -rdynamic -o util_test
upnp_live : $(OBJECTS)
$(CC) $(LARGS) $(OBJECTS) $(LIBS) -o upnp_live
ChildProcess.o : src/ChildProcess.cpp src/ChildProcess.h
$(CC) -c $(CFLAGS) src/ChildProcess.cpp -o ChildProcess.o
Config.o : src/Config.cpp src/Config.h src/Version.h src/InitOptions.h
$(CC) -c $(CFLAGS) src/Config.cpp -o Config.o
ConnectionManagerService.o : src/ConnectionManagerService.cpp src/ConnectionManagerService.h
$(CC) -c $(CFLAGS) src/ConnectionManagerService.cpp -o ConnectionManagerService.o
ContentDirectoryService.o : src/ContentDirectoryService.cpp src/ContentDirectoryService.h
$(CC) -c $(CFLAGS) src/ContentDirectoryService.cpp -o ContentDirectoryService.o
DirectoryMonitor.o : src/DirectoryMonitor.cpp src/DirectoryMonitor.h
$(CC) -c $(CFLAGS) src/DirectoryMonitor.cpp -o DirectoryMonitor.o
ExternalAVHandler.o : src/ExternalAVHandler.cpp src/ExternalAVHandler.h
$(CC) -c $(CFLAGS) src/ExternalAVHandler.cpp -o ExternalAVHandler.o
ExternalStatusHandler.o : src/ExternalStatusHandler.cpp src/ExternalStatusHandler.h
$(CC) -c $(CFLAGS) src/ExternalStatusHandler.cpp -o ExternalStatusHandler.o
FileAVHandler.o : src/FileAVHandler.cpp src/FileAVHandler.h
$(CC) -c $(CFLAGS) src/FileAVHandler.cpp -o FileAVHandler.o
HttpRequest.o : src/HttpRequest.cpp src/HttpRequest.h
$(CC) -c $(CFLAGS) src/HttpRequest.cpp -o HttpRequest.o
HttpStatusHandler.o : src/HttpStatusHandler.cpp src/HttpStatusHandler.h
$(CC) -c $(CFLAGS) src/HttpStatusHandler.cpp -o HttpStatusHandler.o
Logging.o : src/Logging.cpp src/Logging.h
$(CC) -c $(CFLAGS) src/Logging.cpp -o Logging.o
main.o : src/main.cpp src/InitOptions.h
$(CC) -c $(CFLAGS) src/main.cpp -o main.o
MemoryStore.o : src/MemoryStore.cpp src/MemoryStore.h
$(CC) -c $(CFLAGS) src/MemoryStore.cpp -o MemoryStore.o
Server.o : src/Server.cpp src/Server.h
$(CC) -c $(CFLAGS) src/Server.cpp -o Server.o
Stream.o : src/Stream.cpp src/Stream.h
$(CC) -c $(CFLAGS) src/Stream.cpp -o Stream.o
Transcoder.o : src/Transcoder.cpp src/Transcoder.h
$(CC) -c $(CFLAGS) src/Transcoder.cpp -o Transcoder.o
util.o : src/util.cpp src/util.h
$(CC) -c $(CFLAGS) src/util.cpp -o util.o
debug: CFLAGS += -g -DUPNP_LIVE_DEBUG
debug: LARGS += -g -rdynamic
debug: build_objs upnp_live
tests: http_test util_test
.PHONY : clean
clean :
rm -f *.o
rm -f upnp_live http_test util_test