-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathMakefile
106 lines (87 loc) · 5.73 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
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
# This file was auto-generated by Polybuild
ifndef OS
OS := $(shell uname)
endif
obj_ext := .o
ifeq ($(OS),Windows_NT)
obj_ext := .obj
out_ext := .exe
endif
compiler := $(CXX)
compilation_flags := -Wall -std=c++17 -O3 -pthread
libraries := -lfltk -lsqlite3 -lssl -lcrypto
ifeq ($(OS),Windows_NT)
compilation_flags := -Wall -std=c++17 -O3 -pthread -static-libgcc -static-libstdc++ -static
libraries := -lfltk -lsqlite3 -lssl -lcrypto -lz -lgdi32 -lws2_32 -lcrypt32 -lcomctl32 -lole32 -luuid
endif
default: freedom$(out_ext)
.PHONY: default
obj/main_0$(obj_ext): ./main.cpp ./Polyweb/polyweb.hpp ./Polyweb/Polynet/polynet.hpp ./Polyweb/Polynet/string.hpp ./Polyweb/Polynet/secure_sockets.hpp ./Polyweb/Polynet/smart_sockets.hpp ./Polyweb/string.hpp ./Polyweb/threadpool.hpp ./adblock.hpp ./bans.hpp ./pages.hpp ./util.hpp
@printf '\033[1m[POLYBUILD]\033[0m Compiling $@ from $<...\n'
@mkdir -p obj
@$(compiler) -c $< $(compilation_flags) -o $@
@printf '\033[1m[POLYBUILD]\033[0m Finished compiling $@ from $<!\n'
obj/pages_0$(obj_ext): ./pages.cpp ./pages.hpp ./Polyweb/polyweb.hpp ./Polyweb/Polynet/polynet.hpp ./Polyweb/Polynet/string.hpp ./Polyweb/Polynet/secure_sockets.hpp ./Polyweb/Polynet/smart_sockets.hpp ./Polyweb/string.hpp ./Polyweb/threadpool.hpp ./bans.hpp ./util.hpp
@printf '\033[1m[POLYBUILD]\033[0m Compiling $@ from $<...\n'
@mkdir -p obj
@$(compiler) -c $< $(compilation_flags) -o $@
@printf '\033[1m[POLYBUILD]\033[0m Finished compiling $@ from $<!\n'
obj/adblock_0$(obj_ext): ./adblock.cpp ./adblock.hpp ./Polyweb/Polynet/string.hpp ./Polyweb/polyweb.hpp ./Polyweb/Polynet/polynet.hpp ./Polyweb/Polynet/secure_sockets.hpp ./Polyweb/Polynet/smart_sockets.hpp ./Polyweb/string.hpp ./Polyweb/threadpool.hpp
@printf '\033[1m[POLYBUILD]\033[0m Compiling $@ from $<...\n'
@mkdir -p obj
@$(compiler) -c $< $(compilation_flags) -o $@
@printf '\033[1m[POLYBUILD]\033[0m Finished compiling $@ from $<!\n'
obj/bans_0$(obj_ext): ./bans.cpp ./bans.hpp ./Polyweb/Polynet/string.hpp ./sqlite.hpp ./util.hpp ./Polyweb/Polynet/polynet.hpp
@printf '\033[1m[POLYBUILD]\033[0m Compiling $@ from $<...\n'
@mkdir -p obj
@$(compiler) -c $< $(compilation_flags) -o $@
@printf '\033[1m[POLYBUILD]\033[0m Finished compiling $@ from $<!\n'
obj/string_0$(obj_ext): Polyweb/string.cpp Polyweb/string.hpp Polyweb/Polynet/string.hpp
@printf '\033[1m[POLYBUILD]\033[0m Compiling $@ from $<...\n'
@mkdir -p obj
@$(compiler) -c $< $(compilation_flags) -o $@
@printf '\033[1m[POLYBUILD]\033[0m Finished compiling $@ from $<!\n'
obj/client_0$(obj_ext): Polyweb/client.cpp Polyweb/polyweb.hpp Polyweb/Polynet/polynet.hpp Polyweb/Polynet/string.hpp Polyweb/Polynet/secure_sockets.hpp Polyweb/Polynet/smart_sockets.hpp Polyweb/string.hpp Polyweb/threadpool.hpp
@printf '\033[1m[POLYBUILD]\033[0m Compiling $@ from $<...\n'
@mkdir -p obj
@$(compiler) -c $< $(compilation_flags) -o $@
@printf '\033[1m[POLYBUILD]\033[0m Finished compiling $@ from $<!\n'
obj/polyweb_0$(obj_ext): Polyweb/polyweb.cpp Polyweb/polyweb.hpp Polyweb/Polynet/polynet.hpp Polyweb/Polynet/string.hpp Polyweb/Polynet/secure_sockets.hpp Polyweb/Polynet/smart_sockets.hpp Polyweb/string.hpp Polyweb/threadpool.hpp
@printf '\033[1m[POLYBUILD]\033[0m Compiling $@ from $<...\n'
@mkdir -p obj
@$(compiler) -c $< $(compilation_flags) -o $@
@printf '\033[1m[POLYBUILD]\033[0m Finished compiling $@ from $<!\n'
obj/websocket_0$(obj_ext): Polyweb/websocket.cpp Polyweb/polyweb.hpp Polyweb/Polynet/polynet.hpp Polyweb/Polynet/string.hpp Polyweb/Polynet/secure_sockets.hpp Polyweb/Polynet/smart_sockets.hpp Polyweb/string.hpp Polyweb/threadpool.hpp
@printf '\033[1m[POLYBUILD]\033[0m Compiling $@ from $<...\n'
@mkdir -p obj
@$(compiler) -c $< $(compilation_flags) -o $@
@printf '\033[1m[POLYBUILD]\033[0m Finished compiling $@ from $<!\n'
obj/server_0$(obj_ext): Polyweb/server.cpp Polyweb/polyweb.hpp Polyweb/Polynet/polynet.hpp Polyweb/Polynet/string.hpp Polyweb/Polynet/secure_sockets.hpp Polyweb/Polynet/smart_sockets.hpp Polyweb/string.hpp Polyweb/threadpool.hpp
@printf '\033[1m[POLYBUILD]\033[0m Compiling $@ from $<...\n'
@mkdir -p obj
@$(compiler) -c $< $(compilation_flags) -o $@
@printf '\033[1m[POLYBUILD]\033[0m Finished compiling $@ from $<!\n'
obj/polynet_0$(obj_ext): Polyweb/Polynet/polynet.cpp Polyweb/Polynet/polynet.hpp Polyweb/Polynet/string.hpp Polyweb/Polynet/secure_sockets.hpp
@printf '\033[1m[POLYBUILD]\033[0m Compiling $@ from $<...\n'
@mkdir -p obj
@$(compiler) -c $< $(compilation_flags) -o $@
@printf '\033[1m[POLYBUILD]\033[0m Finished compiling $@ from $<!\n'
obj/secure_sockets_0$(obj_ext): Polyweb/Polynet/secure_sockets.cpp Polyweb/Polynet/secure_sockets.hpp Polyweb/Polynet/polynet.hpp Polyweb/Polynet/string.hpp
@printf '\033[1m[POLYBUILD]\033[0m Compiling $@ from $<...\n'
@mkdir -p obj
@$(compiler) -c $< $(compilation_flags) -o $@
@printf '\033[1m[POLYBUILD]\033[0m Finished compiling $@ from $<!\n'
freedom$(out_ext): obj/main_0$(obj_ext) obj/pages_0$(obj_ext) obj/adblock_0$(obj_ext) obj/bans_0$(obj_ext) obj/string_0$(obj_ext) obj/client_0$(obj_ext) obj/polyweb_0$(obj_ext) obj/websocket_0$(obj_ext) obj/server_0$(obj_ext) obj/polynet_0$(obj_ext) obj/secure_sockets_0$(obj_ext)
@printf '\033[1m[POLYBUILD]\033[0m Building $@...\n'
@$(compiler) $^ $(static_libraries) $(compilation_flags) $(libraries) -o $@
@printf '\033[1m[POLYBUILD]\033[0m Finished building $@!\n'
clean:
@printf '\033[1m[POLYBUILD]\033[0m Deleting freedom$(out_ext) and obj...\n'
@rm -rf freedom$(out_ext) obj
@printf '\033[1m[POLYBUILD]\033[0m Finished deleting freedom$(out_ext) and obj!\n'
.PHONY: clean
install:
@printf '\033[1m[POLYBUILD]\033[0m Copying freedom$(out_ext) to /usr/local/bin...\n'
@cp freedom$(out_ext) /usr/local/bin
@printf '\033[1m[POLYBUILD]\033[0m Finished copying freedom to /usr/local/bin!\n'
.PHONY: install