-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathMakefile
370 lines (340 loc) · 32.9 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
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
#-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------#
# 0.2.2
# Alexey Potehin <[email protected]>, http://www.gnuplanet.ru/doc/cv
#-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------#
PROG_URL := https://github.com/progman/libhash.git
PROG_NAME := hashsum
PROG_VERSION := 0.0.5
PROG_TYPE := exe
OUT_DIR := bin
C_LIST := md5.c sha1.c sha256.c sha512.c sha3.c
CPP_LIST := crc16.cpp crc32.cpp md5.cpp sha1.cpp sha256.cpp sha512.cpp sha3_224.cpp sha3_256.cpp sha3_384.cpp sha3_512.cpp hashsum.cpp
HEADER_LIST := crc16.hpp crc32.hpp md5.h md5.hpp sha1.h sha1.hpp sha256.h sha256.hpp sha512.h sha512.hpp sha3.h sha3_224.hpp sha3_256.hpp sha3_384.hpp sha3_512.hpp
CFLAGS :=
CPPFLAGS :=
LFLAGS :=
STDC ?= -std=c99
STDCPP ?= -std=c++11
#-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------#
CC ?= gcc
CXX ?= g++
LN ?= g++
TST ?= clang
STRIP := strip --strip-unneeded -R .comment -R .GCC.command.line -R .note.gnu.gold-version
AR := ar rsc
RM := rm -rf
MKDIR := mkdir
REF := ln -sf
EXE :=
DLL := .so
LIB := .a
#-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------#
FLAGS := -pedantic -Wall -Wextra -Wno-long-long -Wunused -pipe -march=native -mtune=native -I./
FLAGS_DBG := $(FLAGS) -O0 -g3 -ggdb -pg -fmax-errors=3 -fstack-protector-all
FLAGS_REL := $(FLAGS) -O3 -g0 -fmax-errors=3 -funroll-all-loops
FLAGS_TST := $(FLAGS) -O3 -g0 --analyze -fsanitize=address -fsanitize=bounds
CFLAGS_DBG := $(FLAGS_DBG) $(CFLAGS) $(STDC)
CFLAGS_REL := $(FLAGS_REL) $(CFLAGS) $(STDC)
CFLAGS_TST := $(FLAGS_TST) $(CFLAGS) $(STDC)
CFLAGS_x32DBG.EXE := $(CFLAGS_DBG) -m32
CFLAGS_x32REL.EXE := $(CFLAGS_REL) -m32
CFLAGS_x32TST.EXE := $(CFLAGS_TST) -m32
CFLAGS_x64DBG.EXE := $(CFLAGS_DBG) -m64
CFLAGS_x64REL.EXE := $(CFLAGS_REL) -m64
CFLAGS_x64TST.EXE := $(CFLAGS_TST) -m64
CFLAGS_x32DBG.DLL := $(CFLAGS_x32DBG.EXE) -fPIC
CFLAGS_x32REL.DLL := $(CFLAGS_x32REL.EXE) -fPIC
CFLAGS_x64DBG.DLL := $(CFLAGS_x64DBG.EXE) -fPIC
CFLAGS_x64REL.DLL := $(CFLAGS_x64REL.EXE) -fPIC
CPPFLAGS_DBG := $(FLAGS_DBG) $(CPPFLAGS) $(STDCPP)
CPPFLAGS_REL := $(FLAGS_REL) $(CPPFLAGS) $(STDCPP)
CPPFLAGS_TST := $(FLAGS_TST) $(CPPFLAGS) $(STDCPP)
CPPFLAGS_x32DBG.EXE := $(CPPFLAGS_DBG) -m32
CPPFLAGS_x32REL.EXE := $(CPPFLAGS_REL) -m32
CPPFLAGS_x32TST.EXE := $(CPPFLAGS_TST) -m32
CPPFLAGS_x64DBG.EXE := $(CPPFLAGS_DBG) -m64
CPPFLAGS_x64REL.EXE := $(CPPFLAGS_REL) -m64
CPPFLAGS_x64TST.EXE := $(CPPFLAGS_TST) -m64
CPPFLAGS_x32DBG.DLL := $(CPPFLAGS_x32DBG.EXE) -fPIC
CPPFLAGS_x32REL.DLL := $(CPPFLAGS_x32REL.EXE) -fPIC
CPPFLAGS_x64DBG.DLL := $(CPPFLAGS_x64DBG.EXE) -fPIC
CPPFLAGS_x64REL.DLL := $(CPPFLAGS_x64REL.EXE) -fPIC
#-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------#
LFLAGS_DBG := $(LFLAGS) -g3 -Wl,--gc-sections -Wl,--as-needed -ggdb
LFLAGS_REL := $(LFLAGS) -g0 -Wl,--gc-sections -Wl,--as-needed -s
LFLAGS_x32DBG.EXE := $(LFLAGS_DBG) -m32
LFLAGS_x32REL.EXE := $(LFLAGS_REL) -m32
LFLAGS_x64DBG.EXE := $(LFLAGS_DBG) -m64
LFLAGS_x64REL.EXE := $(LFLAGS_REL) -m64
LFLAGS_x32DBG.DLL := $(LFLAGS_x32DBG.EXE) -nostartfiles -shared
LFLAGS_x32REL.DLL := $(LFLAGS_x32REL.EXE) -nostartfiles -shared
LFLAGS_x64DBG.DLL := $(LFLAGS_x64DBG.EXE) -nostartfiles -shared
LFLAGS_x64REL.DLL := $(LFLAGS_x64REL.EXE) -nostartfiles -shared
#-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------#
VPATH := $(dir $(C_LIST) $(CPP_LIST))
O_x32DBG.EXE_LIST := $(addprefix $(OUT_DIR)/, $(notdir $(addsuffix .x32dbg.exe.o, $(basename $(C_LIST)))))
O_x32REL.EXE_LIST := $(addprefix $(OUT_DIR)/, $(notdir $(addsuffix .x32rel.exe.o, $(basename $(C_LIST)))))
O_x32TST.EXE_LIST := $(addprefix $(OUT_DIR)/, $(notdir $(addsuffix .x32tst.exe.o, $(basename $(C_LIST)))))
O_x64DBG.EXE_LIST := $(addprefix $(OUT_DIR)/, $(notdir $(addsuffix .x64dbg.exe.o, $(basename $(C_LIST)))))
O_x64REL.EXE_LIST := $(addprefix $(OUT_DIR)/, $(notdir $(addsuffix .x64rel.exe.o, $(basename $(C_LIST)))))
O_x64TST.EXE_LIST := $(addprefix $(OUT_DIR)/, $(notdir $(addsuffix .x64tst.exe.o, $(basename $(C_LIST)))))
O_x32DBG.DLL_LIST := $(addprefix $(OUT_DIR)/, $(notdir $(addsuffix .x32dbg.dll.o, $(basename $(C_LIST)))))
O_x32REL.DLL_LIST := $(addprefix $(OUT_DIR)/, $(notdir $(addsuffix .x32rel.dll.o, $(basename $(C_LIST)))))
O_x64DBG.DLL_LIST := $(addprefix $(OUT_DIR)/, $(notdir $(addsuffix .x64dbg.dll.o, $(basename $(C_LIST)))))
O_x64REL.DLL_LIST := $(addprefix $(OUT_DIR)/, $(notdir $(addsuffix .x64rel.dll.o, $(basename $(C_LIST)))))
O_x32DBG.LIB_LIST := $(addprefix $(OUT_DIR)/, $(notdir $(addsuffix .x32dbg.lib.o, $(basename $(C_LIST)))))
O_x32REL.LIB_LIST := $(addprefix $(OUT_DIR)/, $(notdir $(addsuffix .x32rel.lib.o, $(basename $(C_LIST)))))
O_x64DBG.LIB_LIST := $(addprefix $(OUT_DIR)/, $(notdir $(addsuffix .x64dbg.lib.o, $(basename $(C_LIST)))))
O_x64REL.LIB_LIST := $(addprefix $(OUT_DIR)/, $(notdir $(addsuffix .x64rel.lib.o, $(basename $(C_LIST)))))
OPP_x32DBG.EXE_LIST := $(addprefix $(OUT_DIR)/, $(notdir $(addsuffix .x32dbg.exe.opp, $(basename $(CPP_LIST)))))
OPP_x32REL.EXE_LIST := $(addprefix $(OUT_DIR)/, $(notdir $(addsuffix .x32rel.exe.opp, $(basename $(CPP_LIST)))))
OPP_x32TST.EXE_LIST := $(addprefix $(OUT_DIR)/, $(notdir $(addsuffix .x32tst.exe.opp, $(basename $(CPP_LIST)))))
OPP_x64DBG.EXE_LIST := $(addprefix $(OUT_DIR)/, $(notdir $(addsuffix .x64dbg.exe.opp, $(basename $(CPP_LIST)))))
OPP_x64REL.EXE_LIST := $(addprefix $(OUT_DIR)/, $(notdir $(addsuffix .x64rel.exe.opp, $(basename $(CPP_LIST)))))
OPP_x64TST.EXE_LIST := $(addprefix $(OUT_DIR)/, $(notdir $(addsuffix .x64tst.exe.opp, $(basename $(CPP_LIST)))))
OPP_x32DBG.DLL_LIST := $(addprefix $(OUT_DIR)/, $(notdir $(addsuffix .x32dbg.dll.opp, $(basename $(CPP_LIST)))))
OPP_x32REL.DLL_LIST := $(addprefix $(OUT_DIR)/, $(notdir $(addsuffix .x32rel.dll.opp, $(basename $(CPP_LIST)))))
OPP_x64DBG.DLL_LIST := $(addprefix $(OUT_DIR)/, $(notdir $(addsuffix .x64dbg.dll.opp, $(basename $(CPP_LIST)))))
OPP_x64REL.DLL_LIST := $(addprefix $(OUT_DIR)/, $(notdir $(addsuffix .x64rel.dll.opp, $(basename $(CPP_LIST)))))
OPP_x32DBG.LIB_LIST := $(addprefix $(OUT_DIR)/, $(notdir $(addsuffix .x32dbg.lib.opp, $(basename $(CPP_LIST)))))
OPP_x32REL.LIB_LIST := $(addprefix $(OUT_DIR)/, $(notdir $(addsuffix .x32rel.lib.opp, $(basename $(CPP_LIST)))))
OPP_x64DBG.LIB_LIST := $(addprefix $(OUT_DIR)/, $(notdir $(addsuffix .x64dbg.lib.opp, $(basename $(CPP_LIST)))))
OPP_x64REL.LIB_LIST := $(addprefix $(OUT_DIR)/, $(notdir $(addsuffix .x64rel.lib.opp, $(basename $(CPP_LIST)))))
#-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------#
.PHONY: help
help:
@echo "use make [x32 | x32dbg | x32test | x64 | x64dbg | x64test | clean]";
#-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------#
.PHONY: clean
clean:
@echo "clean";
@if [ -e $(OUT_DIR) ]; then \
rm -rf $(OUT_DIR); \
fi
#-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------#
.PHONY: $(OUT_DIR)
$(OUT_DIR) :
@if [ ! -e $(OUT_DIR) ]; then \
(mkdir $(OUT_DIR);) \
fi
#-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------#
$(OUT_DIR)/%.x32dbg.exe.o : %.c $(HEADER_LIST) Makefile | $(OUT_DIR)
@$(CC) $< -c $(CFLAGS_x32DBG.EXE) -o $(OUT_DIR)/$(notdir $@) -D'PROG_URL="$(PROG_URL)"' -D'PROG_NAME="$(PROG_NAME)"' -D'PROG_VERSION="$(PROG_VERSION)"' -D'PROG_TYPE="$(PROG_TYPE)"' -D'PROG_TARGET="x32dbg"' -D'PROG_FULL_NAME="$(PROG_NAME)-x32dbg-$(PROG_VERSION)"' -D'FLAG_DEBUG="1"'
$(OUT_DIR)/%.x32rel.exe.o : %.c $(HEADER_LIST) Makefile | $(OUT_DIR)
@$(CC) $< -c $(CFLAGS_x32REL.EXE) -o $(OUT_DIR)/$(notdir $@) -D'PROG_URL="$(PROG_URL)"' -D'PROG_NAME="$(PROG_NAME)"' -D'PROG_VERSION="$(PROG_VERSION)"' -D'PROG_TYPE="$(PROG_TYPE)"' -D'PROG_TARGET="x32"' -D'PROG_FULL_NAME="$(PROG_NAME)-x32-$(PROG_VERSION)"'
$(OUT_DIR)/%.x32tst.exe.o : %.c $(HEADER_LIST) Makefile | $(OUT_DIR)
@$(TST) $< -c $(CFLAGS_x32TST.EXE) -o $(OUT_DIR)/$(notdir $@) -D'PROG_URL="$(PROG_URL)"' -D'PROG_NAME="$(PROG_NAME)"' -D'PROG_VERSION="$(PROG_VERSION)"' -D'PROG_TYPE="$(PROG_TYPE)"' -D'PROG_TARGET="x32"' -D'PROG_FULL_NAME="$(PROG_NAME)-x32-$(PROG_VERSION)"'
$(OUT_DIR)/%.x64dbg.exe.o : %.c $(HEADER_LIST) Makefile | $(OUT_DIR)
@$(CC) $< -c $(CFLAGS_x64DBG.EXE) -o $(OUT_DIR)/$(notdir $@) -D'PROG_URL="$(PROG_URL)"' -D'PROG_NAME="$(PROG_NAME)"' -D'PROG_VERSION="$(PROG_VERSION)"' -D'PROG_TYPE="$(PROG_TYPE)"' -D'PROG_TARGET="x64dbg"' -D'PROG_FULL_NAME="$(PROG_NAME)-x64dbg-$(PROG_VERSION)"' -D'FLAG_DEBUG="1"'
$(OUT_DIR)/%.x64rel.exe.o : %.c $(HEADER_LIST) Makefile | $(OUT_DIR)
@$(CC) $< -c $(CFLAGS_x64REL.EXE) -o $(OUT_DIR)/$(notdir $@) -D'PROG_URL="$(PROG_URL)"' -D'PROG_NAME="$(PROG_NAME)"' -D'PROG_VERSION="$(PROG_VERSION)"' -D'PROG_TYPE="$(PROG_TYPE)"' -D'PROG_TARGET="x64"' -D'PROG_FULL_NAME="$(PROG_NAME)-x64-$(PROG_VERSION)"'
$(OUT_DIR)/%.x64tst.exe.o : %.c $(HEADER_LIST) Makefile | $(OUT_DIR)
@$(TST) $< -c $(CFLAGS_x64TST.EXE) -o $(OUT_DIR)/$(notdir $@) -D'PROG_URL="$(PROG_URL)"' -D'PROG_NAME="$(PROG_NAME)"' -D'PROG_VERSION="$(PROG_VERSION)"' -D'PROG_TYPE="$(PROG_TYPE)"' -D'PROG_TARGET="x64"' -D'PROG_FULL_NAME="$(PROG_NAME)-x64-$(PROG_VERSION)"'
$(OUT_DIR)/%.x32dbg.dll.o : %.c $(HEADER_LIST) Makefile | $(OUT_DIR)
@$(CC) $< -c $(CFLAGS_x32DBG.DLL) -o $(OUT_DIR)/$(notdir $@) -D'PROG_URL="$(PROG_URL)"' -D'PROG_NAME="$(PROG_NAME)"' -D'PROG_VERSION="$(PROG_VERSION)"' -D'PROG_TYPE="$(PROG_TYPE)"' -D'PROG_TARGET="x32dbg"' -D'PROG_FULL_NAME="$(PROG_NAME)-x32dbg-$(PROG_VERSION)"' -D'FLAG_DEBUG="1"'
$(OUT_DIR)/%.x32rel.dll.o : %.c $(HEADER_LIST) Makefile | $(OUT_DIR)
@$(CC) $< -c $(CFLAGS_x32REL.DLL) -o $(OUT_DIR)/$(notdir $@) -D'PROG_URL="$(PROG_URL)"' -D'PROG_NAME="$(PROG_NAME)"' -D'PROG_VERSION="$(PROG_VERSION)"' -D'PROG_TYPE="$(PROG_TYPE)"' -D'PROG_TARGET="x32"' -D'PROG_FULL_NAME="$(PROG_NAME)-x32-$(PROG_VERSION)"'
$(OUT_DIR)/%.x64dbg.dll.o : %.c $(HEADER_LIST) Makefile | $(OUT_DIR)
@$(CC) $< -c $(CFLAGS_x64DBG.DLL) -o $(OUT_DIR)/$(notdir $@) -D'PROG_URL="$(PROG_URL)"' -D'PROG_NAME="$(PROG_NAME)"' -D'PROG_VERSION="$(PROG_VERSION)"' -D'PROG_TYPE="$(PROG_TYPE)"' -D'PROG_TARGET="x64dbg"' -D'PROG_FULL_NAME="$(PROG_NAME)-x64dbg-$(PROG_VERSION)"' -D'FLAG_DEBUG="1"'
$(OUT_DIR)/%.x64rel.dll.o : %.c $(HEADER_LIST) Makefile | $(OUT_DIR)
@$(CC) $< -c $(CFLAGS_x64REL.DLL) -o $(OUT_DIR)/$(notdir $@) -D'PROG_URL="$(PROG_URL)"' -D'PROG_NAME="$(PROG_NAME)"' -D'PROG_VERSION="$(PROG_VERSION)"' -D'PROG_TYPE="$(PROG_TYPE)"' -D'PROG_TARGET="x64"' -D'PROG_FULL_NAME="$(PROG_NAME)-x64-$(PROG_VERSION)"'
$(OUT_DIR)/%.x32dbg.lib.o : %.c $(HEADER_LIST) Makefile | $(OUT_DIR)
@$(CC) $< -c $(CFLAGS_x32DBG.EXE) -o $(OUT_DIR)/$(notdir $@) -D'PROG_URL="$(PROG_URL)"' -D'PROG_NAME="$(PROG_NAME)"' -D'PROG_VERSION="$(PROG_VERSION)"' -D'PROG_TYPE="$(PROG_TYPE)"' -D'PROG_TARGET="x32dbg"' -D'PROG_FULL_NAME="$(PROG_NAME)-x32dbg-$(PROG_VERSION)"' -D'FLAG_DEBUG="1"'
$(OUT_DIR)/%.x32rel.lib.o : %.c $(HEADER_LIST) Makefile | $(OUT_DIR)
@$(CC) $< -c $(CFLAGS_x32REL.EXE) -o $(OUT_DIR)/$(notdir $@) -D'PROG_URL="$(PROG_URL)"' -D'PROG_NAME="$(PROG_NAME)"' -D'PROG_VERSION="$(PROG_VERSION)"' -D'PROG_TYPE="$(PROG_TYPE)"' -D'PROG_TARGET="x32"' -D'PROG_FULL_NAME="$(PROG_NAME)-x32-$(PROG_VERSION)"'
$(OUT_DIR)/%.x64dbg.lib.o : %.c $(HEADER_LIST) Makefile | $(OUT_DIR)
@$(CC) $< -c $(CFLAGS_x64DBG.EXE) -o $(OUT_DIR)/$(notdir $@) -D'PROG_URL="$(PROG_URL)"' -D'PROG_NAME="$(PROG_NAME)"' -D'PROG_VERSION="$(PROG_VERSION)"' -D'PROG_TYPE="$(PROG_TYPE)"' -D'PROG_TARGET="x64dbg"' -D'PROG_FULL_NAME="$(PROG_NAME)-x64dbg-$(PROG_VERSION)"' -D'FLAG_DEBUG="1"'
$(OUT_DIR)/%.x64rel.lib.o : %.c $(HEADER_LIST) Makefile | $(OUT_DIR)
@$(CC) $< -c $(CFLAGS_x64REL.EXE) -o $(OUT_DIR)/$(notdir $@) -D'PROG_URL="$(PROG_URL)"' -D'PROG_NAME="$(PROG_NAME)"' -D'PROG_VERSION="$(PROG_VERSION)"' -D'PROG_TYPE="$(PROG_TYPE)"' -D'PROG_TARGET="x64"' -D'PROG_FULL_NAME="$(PROG_NAME)-x64-$(PROG_VERSION)"'
#-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------#
$(OUT_DIR)/%.x32dbg.exe.opp : %.cpp $(HEADER_LIST) Makefile | $(OUT_DIR)
@$(CXX) $< -c $(CPPFLAGS_x32DBG.EXE) -o $(OUT_DIR)/$(notdir $@) -D'PROG_URL="$(PROG_URL)"' -D'PROG_NAME="$(PROG_NAME)"' -D'PROG_VERSION="$(PROG_VERSION)"' -D'PROG_TYPE="$(PROG_TYPE)"' -D'PROG_TARGET="x32dbg"' -D'PROG_FULL_NAME="$(PROG_NAME)-x32dbg-$(PROG_VERSION)"' -D'FLAG_DEBUG="1"'
$(OUT_DIR)/%.x32rel.exe.opp : %.cpp $(HEADER_LIST) Makefile | $(OUT_DIR)
@$(CXX) $< -c $(CPPFLAGS_x32REL.EXE) -o $(OUT_DIR)/$(notdir $@) -D'PROG_URL="$(PROG_URL)"' -D'PROG_NAME="$(PROG_NAME)"' -D'PROG_VERSION="$(PROG_VERSION)"' -D'PROG_TYPE="$(PROG_TYPE)"' -D'PROG_TARGET="x32"' -D'PROG_FULL_NAME="$(PROG_NAME)-x32-$(PROG_VERSION)"'
$(OUT_DIR)/%.x32tst.exe.opp : %.cpp $(HEADER_LIST) Makefile | $(OUT_DIR)
@$(TST) $< -c $(CPPFLAGS_x32TST.EXE) -o $(OUT_DIR)/$(notdir $@) -D'PROG_URL="$(PROG_URL)"' -D'PROG_NAME="$(PROG_NAME)"' -D'PROG_VERSION="$(PROG_VERSION)"' -D'PROG_TYPE="$(PROG_TYPE)"' -D'PROG_TARGET="x32"' -D'PROG_FULL_NAME="$(PROG_NAME)-x32-$(PROG_VERSION)"'
$(OUT_DIR)/%.x64dbg.exe.opp : %.cpp $(HEADER_LIST) Makefile | $(OUT_DIR)
@$(CXX) $< -c $(CPPFLAGS_x64DBG.EXE) -o $(OUT_DIR)/$(notdir $@) -D'PROG_URL="$(PROG_URL)"' -D'PROG_NAME="$(PROG_NAME)"' -D'PROG_VERSION="$(PROG_VERSION)"' -D'PROG_TYPE="$(PROG_TYPE)"' -D'PROG_TARGET="x64dbg"' -D'PROG_FULL_NAME="$(PROG_NAME)-x64dbg-$(PROG_VERSION)"' -D'FLAG_DEBUG="1"'
$(OUT_DIR)/%.x64rel.exe.opp : %.cpp $(HEADER_LIST) Makefile | $(OUT_DIR)
@$(CXX) $< -c $(CPPFLAGS_x64REL.EXE) -o $(OUT_DIR)/$(notdir $@) -D'PROG_URL="$(PROG_URL)"' -D'PROG_NAME="$(PROG_NAME)"' -D'PROG_VERSION="$(PROG_VERSION)"' -D'PROG_TYPE="$(PROG_TYPE)"' -D'PROG_TARGET="x64"' -D'PROG_FULL_NAME="$(PROG_NAME)-x64-$(PROG_VERSION)"'
$(OUT_DIR)/%.x64tst.exe.opp : %.cpp $(HEADER_LIST) Makefile | $(OUT_DIR)
@$(TST) $< -c $(CPPFLAGS_x64TST.EXE) -o $(OUT_DIR)/$(notdir $@) -D'PROG_URL="$(PROG_URL)"' -D'PROG_NAME="$(PROG_NAME)"' -D'PROG_VERSION="$(PROG_VERSION)"' -D'PROG_TYPE="$(PROG_TYPE)"' -D'PROG_TARGET="x64"' -D'PROG_FULL_NAME="$(PROG_NAME)-x64-$(PROG_VERSION)"'
$(OUT_DIR)/%.x32dbg.dll.opp : %.cpp $(HEADER_LIST) Makefile | $(OUT_DIR)
@$(CXX) $< -c $(CPPFLAGS_x32DBG.DLL) -o $(OUT_DIR)/$(notdir $@) -D'PROG_URL="$(PROG_URL)"' -D'PROG_NAME="$(PROG_NAME)"' -D'PROG_VERSION="$(PROG_VERSION)"' -D'PROG_TYPE="$(PROG_TYPE)"' -D'PROG_TARGET="x32dbg"' -D'PROG_FULL_NAME="$(PROG_NAME)-x32dbg-$(PROG_VERSION)"' -D'FLAG_DEBUG="1"'
$(OUT_DIR)/%.x32rel.dll.opp : %.cpp $(HEADER_LIST) Makefile | $(OUT_DIR)
@$(CXX) $< -c $(CPPFLAGS_x32REL.DLL) -o $(OUT_DIR)/$(notdir $@) -D'PROG_URL="$(PROG_URL)"' -D'PROG_NAME="$(PROG_NAME)"' -D'PROG_VERSION="$(PROG_VERSION)"' -D'PROG_TYPE="$(PROG_TYPE)"' -D'PROG_TARGET="x32"' -D'PROG_FULL_NAME="$(PROG_NAME)-x32-$(PROG_VERSION)"'
$(OUT_DIR)/%.x64dbg.dll.opp : %.cpp $(HEADER_LIST) Makefile | $(OUT_DIR)
@$(CXX) $< -c $(CPPFLAGS_x64DBG.DLL) -o $(OUT_DIR)/$(notdir $@) -D'PROG_URL="$(PROG_URL)"' -D'PROG_NAME="$(PROG_NAME)"' -D'PROG_VERSION="$(PROG_VERSION)"' -D'PROG_TYPE="$(PROG_TYPE)"' -D'PROG_TARGET="x64dbg"' -D'PROG_FULL_NAME="$(PROG_NAME)-x64dbg-$(PROG_VERSION)"' -D'FLAG_DEBUG="1"'
$(OUT_DIR)/%.x64rel.dll.opp : %.cpp $(HEADER_LIST) Makefile | $(OUT_DIR)
@$(CXX) $< -c $(CPPFLAGS_x64REL.DLL) -o $(OUT_DIR)/$(notdir $@) -D'PROG_URL="$(PROG_URL)"' -D'PROG_NAME="$(PROG_NAME)"' -D'PROG_VERSION="$(PROG_VERSION)"' -D'PROG_TYPE="$(PROG_TYPE)"' -D'PROG_TARGET="x64"' -D'PROG_FULL_NAME="$(PROG_NAME)-x64-$(PROG_VERSION)"'
$(OUT_DIR)/%.x32dbg.lib.opp : %.cpp $(HEADER_LIST) Makefile | $(OUT_DIR)
@$(CXX) $< -c $(CPPFLAGS_x32DBG.EXE) -o $(OUT_DIR)/$(notdir $@) -D'PROG_URL="$(PROG_URL)"' -D'PROG_NAME="$(PROG_NAME)"' -D'PROG_VERSION="$(PROG_VERSION)"' -D'PROG_TYPE="$(PROG_TYPE)"' -D'PROG_TARGET="x32dbg"' -D'PROG_FULL_NAME="$(PROG_NAME)-x32dbg-$(PROG_VERSION)"' -D'FLAG_DEBUG="1"'
$(OUT_DIR)/%.x32rel.lib.opp : %.cpp $(HEADER_LIST) Makefile | $(OUT_DIR)
@$(CXX) $< -c $(CPPFLAGS_x32REL.EXE) -o $(OUT_DIR)/$(notdir $@) -D'PROG_URL="$(PROG_URL)"' -D'PROG_NAME="$(PROG_NAME)"' -D'PROG_VERSION="$(PROG_VERSION)"' -D'PROG_TYPE="$(PROG_TYPE)"' -D'PROG_TARGET="x32"' -D'PROG_FULL_NAME="$(PROG_NAME)-x32-$(PROG_VERSION)"'
$(OUT_DIR)/%.x64dbg.lib.opp : %.cpp $(HEADER_LIST) Makefile | $(OUT_DIR)
@$(CXX) $< -c $(CPPFLAGS_x64DBG.EXE) -o $(OUT_DIR)/$(notdir $@) -D'PROG_URL="$(PROG_URL)"' -D'PROG_NAME="$(PROG_NAME)"' -D'PROG_VERSION="$(PROG_VERSION)"' -D'PROG_TYPE="$(PROG_TYPE)"' -D'PROG_TARGET="x64dbg"' -D'PROG_FULL_NAME="$(PROG_NAME)-x64dbg-$(PROG_VERSION)"' -D'FLAG_DEBUG="1"'
$(OUT_DIR)/%.x64rel.lib.opp : %.cpp $(HEADER_LIST) Makefile | $(OUT_DIR)
@$(CXX) $< -c $(CPPFLAGS_x64REL.EXE) -o $(OUT_DIR)/$(notdir $@) -D'PROG_URL="$(PROG_URL)"' -D'PROG_NAME="$(PROG_NAME)"' -D'PROG_VERSION="$(PROG_VERSION)"' -D'PROG_TYPE="$(PROG_TYPE)"' -D'PROG_TARGET="x64"' -D'PROG_FULL_NAME="$(PROG_NAME)-x64-$(PROG_VERSION)"'
#-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------#
$(OUT_DIR)/$(PROG_NAME)-x32dbg-$(PROG_VERSION)$(EXE) : $(O_x32DBG.EXE_LIST) $(OPP_x32DBG.EXE_LIST)
@$(LN) $(O_x32DBG.EXE_LIST) $(OPP_x32DBG.EXE_LIST) $(LFLAGS_x32DBG.EXE) -o $(OUT_DIR)/$(PROG_NAME)-x32dbg-$(PROG_VERSION)$(EXE)
@objdump -Dslx $(OUT_DIR)/$(PROG_NAME)-x32dbg-$(PROG_VERSION) > $(OUT_DIR)/$(PROG_NAME)-x32dbg-$(PROG_VERSION).dump;
#-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------#
$(OUT_DIR)/$(PROG_NAME)-x32dbg-$(PROG_VERSION)$(DLL) : $(O_x32DBG.DLL_LIST) $(OPP_x32DBG.DLL_LIST)
@$(LN) $(O_x32DBG.DLL_LIST) $(OPP_x32DBG.DLL_LIST) $(LFLAGS_x32DBG.DLL) -o $(OUT_DIR)/$(PROG_NAME)-x32dbg-$(PROG_VERSION)$(DLL)
@$(STRIP) $(OUT_DIR)/$(PROG_NAME)-x32dbg-$(PROG_VERSION)$(DLL)
#-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------#
$(OUT_DIR)/$(PROG_NAME)-x32dbg-$(PROG_VERSION)$(LIB) : $(O_x32DBG.LIB_LIST) $(OPP_x32DBG.LIB_LIST)
@$(AR) $(OUT_DIR)/$(PROG_NAME)-x32dbg-$(PROG_VERSION)$(LIB) $(O_x32DBG.LIB_LIST) $(OPP_x32DBG.LIB_LIST)
@$(STRIP) $(OUT_DIR)/$(PROG_NAME)-x32dbg-$(PROG_VERSION)$(LIB)
#-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------#
$(OUT_DIR)/$(PROG_NAME)-x32-$(PROG_VERSION)$(EXE) : $(O_x32REL.EXE_LIST) $(OPP_x32REL.EXE_LIST)
@$(LN) $(O_x32REL.EXE_LIST) $(OPP_x32REL.EXE_LIST) $(LFLAGS_x32REL.EXE) -o $(OUT_DIR)/$(PROG_NAME)-x32-$(PROG_VERSION)$(EXE)
@$(STRIP) $(OUT_DIR)/$(PROG_NAME)-x32-$(PROG_VERSION)$(EXE)
#-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------#
$(OUT_DIR)/$(PROG_NAME)-x32-$(PROG_VERSION)$(DLL) : $(O_x32REL.DLL_LIST) $(OPP_x32REL.DLL_LIST)
@$(LN) $(O_x32REL.DLL_LIST) $(OPP_x32REL.DLL_LIST) $(LFLAGS_x32REL.DLL) -o $(OUT_DIR)/$(PROG_NAME)-x32-$(PROG_VERSION)$(DLL)
@$(STRIP) $(OUT_DIR)/$(PROG_NAME)-x32-$(PROG_VERSION)$(DLL)
#-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------#
$(OUT_DIR)/$(PROG_NAME)-x32-$(PROG_VERSION)$(LIB) : $(O_x32REL.LIB_LIST) $(OPP_x32REL.LIB_LIST)
@$(AR) $(OUT_DIR)/$(PROG_NAME)-x32-$(PROG_VERSION)$(LIB) $(O_x32REL.LIB_LIST) $(OPP_x32REL.LIB_LIST)
@$(STRIP) $(OUT_DIR)/$(PROG_NAME)-x32-$(PROG_VERSION)$(LIB)
#-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------#
$(OUT_DIR)/$(PROG_NAME)-x64dbg-$(PROG_VERSION)$(EXE) : $(O_x64DBG.EXE_LIST) $(OPP_x64DBG.EXE_LIST)
@$(LN) $(O_x64DBG.EXE_LIST) $(OPP_x64DBG.EXE_LIST) $(LFLAGS_x64DBG.EXE) -o $(OUT_DIR)/$(PROG_NAME)-x64dbg-$(PROG_VERSION)$(EXE)
@objdump -Dslx $(OUT_DIR)/$(PROG_NAME)-x64dbg-$(PROG_VERSION) > $(OUT_DIR)/$(PROG_NAME)-x64dbg-$(PROG_VERSION).dump;
#-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------#
$(OUT_DIR)/$(PROG_NAME)-x64dbg-$(PROG_VERSION)$(DLL) : $(O_x64DBG.DLL_LIST) $(OPP_x64DBG.DLL_LIST)
@$(LN) $(O_x64DBG.DLL_LIST) $(OPP_x64DBG.DLL_LIST) $(LFLAGS_x64DBG.DLL) -o $(OUT_DIR)/$(PROG_NAME)-x64dbg-$(PROG_VERSION)$(DLL)
@$(STRIP) $(OUT_DIR)/$(PROG_NAME)-x64dbg-$(PROG_VERSION)$(DLL)
#-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------#
$(OUT_DIR)/$(PROG_NAME)-x64dbg-$(PROG_VERSION)$(LIB) : $(O_x64DBG.LIB_LIST) $(OPP_x64DBG.LIB_LIST)
@$(AR) $(OUT_DIR)/$(PROG_NAME)-x64dbg-$(PROG_VERSION)$(LIB) $(O_x64DBG.LIB_LIST) $(OPP_x64DBG.LIB_LIST)
@$(STRIP) $(OUT_DIR)/$(PROG_NAME)-x64dbg-$(PROG_VERSION)$(LIB)
#-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------#
$(OUT_DIR)/$(PROG_NAME)-x64-$(PROG_VERSION)$(EXE) : $(O_x64REL.EXE_LIST) $(OPP_x64REL.EXE_LIST)
@$(LN) $(O_x64REL.EXE_LIST) $(OPP_x64REL.EXE_LIST) $(LFLAGS_x64REL.EXE) -o $(OUT_DIR)/$(PROG_NAME)-x64-$(PROG_VERSION)$(EXE)
@$(STRIP) $(OUT_DIR)/$(PROG_NAME)-x64-$(PROG_VERSION)$(EXE)
#-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------#
$(OUT_DIR)/$(PROG_NAME)-x64-$(PROG_VERSION)$(DLL) : $(O_x64REL.DLL_LIST) $(OPP_x64REL.DLL_LIST)
@$(LN) $(O_x64REL.DLL_LIST) $(OPP_x64REL.DLL_LIST) $(LFLAGS_x64REL.DLL) -o $(OUT_DIR)/$(PROG_NAME)-x64-$(PROG_VERSION)$(DLL)
@$(STRIP) $(OUT_DIR)/$(PROG_NAME)-x64-$(PROG_VERSION)$(DLL)
#-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------#
$(OUT_DIR)/$(PROG_NAME)-x64-$(PROG_VERSION)$(LIB) : $(O_x64REL.LIB_LIST) $(OPP_x64REL.LIB_LIST)
@$(AR) $(OUT_DIR)/$(PROG_NAME)-x64-$(PROG_VERSION)$(LIB) $(O_x64REL.LIB_LIST) $(OPP_x64REL.LIB_LIST)
@$(STRIP) $(OUT_DIR)/$(PROG_NAME)-x64-$(PROG_VERSION)$(LIB)
#-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------#
.PHONY: x32dbg.exe
x32dbg.exe: $(OUT_DIR)/$(PROG_NAME)-x32dbg-$(PROG_VERSION)$(EXE)
@$(REF) $(PROG_NAME)-x32dbg-$(PROG_VERSION)$(EXE) $(OUT_DIR)/$(PROG_NAME)$(EXE)
@echo "ready $(PROG_NAME)-x32dbg-$(PROG_VERSION)$(EXE)";
#-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------#
.PHONY: x32dbg.dll
x32dbg.dll: $(OUT_DIR)/$(PROG_NAME)-x32dbg-$(PROG_VERSION)$(DLL)
@$(REF) $(PROG_NAME)-x32dbg-$(PROG_VERSION)$(DLL) $(OUT_DIR)/$(PROG_NAME)$(DLL)
@echo "ready $(PROG_NAME)-x32dbg-$(PROG_VERSION)$(DLL)";
#-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------#
.PHONY: x32dbg.lib
x32dbg.lib: $(OUT_DIR)/$(PROG_NAME)-x32dbg-$(PROG_VERSION)$(LIB)
@$(REF) $(PROG_NAME)-x32dbg-$(PROG_VERSION)$(LIB) $(OUT_DIR)/$(PROG_NAME)$(LIB)
@echo "ready $(PROG_NAME)-x32dbg-$(PROG_VERSION)$(LIB)";
#-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------#
.PHONY: x32dbg
x32dbg:
@if [ "$(PROG_TYPE)" = "exe" ]; then \
${MAKE} -s x32dbg.exe; \
fi
@if [ "$(PROG_TYPE)" = "dll" ]; then \
${MAKE} -s x32dbg.dll; \
fi
@if [ "$(PROG_TYPE)" = "lib" ]; then \
${MAKE} -s x32dbg.lib; \
fi
#-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------#
.PHONY: x32.exe
x32.exe: $(OUT_DIR)/$(PROG_NAME)-x32-$(PROG_VERSION)$(EXE)
@$(REF) $(PROG_NAME)-x32-$(PROG_VERSION)$(EXE) $(OUT_DIR)/$(PROG_NAME)$(EXE)
@echo "ready $(PROG_NAME)-x32-$(PROG_VERSION)$(EXE)";
#-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------#
.PHONY: x32.dll
x32.dll: $(OUT_DIR)/$(PROG_NAME)-x32-$(PROG_VERSION)$(DLL)
@$(REF) $(PROG_NAME)-x32-$(PROG_VERSION)$(DLL) $(OUT_DIR)/$(PROG_NAME)$(DLL)
@echo "ready $(PROG_NAME)-x32-$(PROG_VERSION)$(DLL)";
#-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------#
.PHONY: x32.lib
x32.lib: $(OUT_DIR)/$(PROG_NAME)-x32-$(PROG_VERSION)$(LIB)
@$(REF) $(PROG_NAME)-x32-$(PROG_VERSION)$(LIB) $(OUT_DIR)/$(PROG_NAME)$(LIB)
@echo "ready $(PROG_NAME)-x32-$(PROG_VERSION)$(LIB)";
#-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------#
.PHONY: x32
x32:
@if [ "$(PROG_TYPE)" = "exe" ]; then \
${MAKE} -s x32.exe; \
fi
@if [ "$(PROG_TYPE)" = "dll" ]; then \
${MAKE} -s x32.dll; \
fi
@if [ "$(PROG_TYPE)" = "lib" ]; then \
${MAKE} -s x32.lib; \
fi
#-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------#
.PHONY: x32test
x32test: $(O_x32TST.EXE_LIST) $(OPP_x32TST.EXE_LIST)
#-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------#
.PHONY: x64dbg.exe
x64dbg.exe: $(OUT_DIR)/$(PROG_NAME)-x64dbg-$(PROG_VERSION)$(EXE)
@$(REF) $(PROG_NAME)-x64dbg-$(PROG_VERSION)$(EXE) $(OUT_DIR)/$(PROG_NAME)$(EXE)
@echo "ready $(PROG_NAME)-x64dbg-$(PROG_VERSION)$(EXE)";
#-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------#
.PHONY: x64dbg.dll
x64dbg.dll: $(OUT_DIR)/$(PROG_NAME)-x64dbg-$(PROG_VERSION)$(DLL)
@$(REF) $(PROG_NAME)-x64dbg-$(PROG_VERSION)$(DLL) $(OUT_DIR)/$(PROG_NAME)$(DLL)
@echo "ready $(PROG_NAME)-x64dbg-$(PROG_VERSION)$(DLL)";
#-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------#
.PHONY: x64dbg.lib
x64dbg.lib: $(OUT_DIR)/$(PROG_NAME)-x64dbg-$(PROG_VERSION)$(LIB)
@$(REF) $(PROG_NAME)-x64dbg-$(PROG_VERSION)$(LIB) $(OUT_DIR)/$(PROG_NAME)$(LIB)
@echo "ready $(PROG_NAME)-x64dbg-$(PROG_VERSION)$(LIB)";
#-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------#
.PHONY: x64dbg
x64dbg:
@if [ "$(PROG_TYPE)" = "exe" ]; then \
${MAKE} -s x64dbg.exe; \
fi
@if [ "$(PROG_TYPE)" = "dll" ]; then \
${MAKE} -s x64dbg.dll; \
fi
@if [ "$(PROG_TYPE)" = "lib" ]; then \
${MAKE} -s x64dbg.lib; \
fi
#-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------#
.PHONY: x64.exe
x64.exe: $(OUT_DIR)/$(PROG_NAME)-x64-$(PROG_VERSION)$(EXE)
@$(REF) $(PROG_NAME)-x64-$(PROG_VERSION)$(EXE) $(OUT_DIR)/$(PROG_NAME)$(EXE)
@echo "ready $(PROG_NAME)-x64-$(PROG_VERSION)$(EXE)";
#-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------#
.PHONY: x64.dll
x64.dll: $(OUT_DIR)/$(PROG_NAME)-x64-$(PROG_VERSION)$(DLL)
@$(REF) $(PROG_NAME)-x64-$(PROG_VERSION)$(DLL) $(OUT_DIR)/$(PROG_NAME)$(DLL)
@echo "ready $(PROG_NAME)-x64-$(PROG_VERSION)$(DLL)";
#-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------#
.PHONY: x64.lib
x64.lib: $(OUT_DIR)/$(PROG_NAME)-x64-$(PROG_VERSION)$(LIB)
@$(REF) $(PROG_NAME)-x64-$(PROG_VERSION)$(LIB) $(OUT_DIR)/$(PROG_NAME)$(LIB)
@echo "ready $(PROG_NAME)-x64-$(PROG_VERSION)$(LIB)";
#-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------#
.PHONY: x64
x64:
@if [ "$(PROG_TYPE)" = "exe" ]; then \
${MAKE} -s x64.exe; \
fi
@if [ "$(PROG_TYPE)" = "dll" ]; then \
${MAKE} -s x64.dll; \
fi
@if [ "$(PROG_TYPE)" = "lib" ]; then \
${MAKE} -s x64.lib; \
fi
#-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------#
.PHONY: x64test
x64test: $(O_x64TST.EXE_LIST) $(OPP_x64TST.EXE_LIST)
#-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------#