forked from ladislav-zezula/StormLib
-
Notifications
You must be signed in to change notification settings - Fork 1
/
makefile.w32
298 lines (282 loc) · 10.7 KB
/
makefile.w32
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
#####################################################################
#
# Makefile for compiling StormLib with MINGW 3.0
#
# Author: Ladislav Zezula
# Tested: Feb 03 2015
# System: Windows 8.1 64-bit
#
#####################################################################
CC = @gcc
CPP = @g++
CFLAGS = -Wall
DFLAGS = -D_7ZIP_ST
EXELFLAGS = -s -Wl,--subsystem,console -lwininet
DLLLFLAGS = -shared -lwininet
AR = ar
ARFLAGS = rcs
LIBRARY = StormLib.dll
TESTEXE = StormLib_test.exe
OBJS = src/adpcm/adpcm.o \
src/huffman/huff.o \
src/sparse/sparse.o \
src/FileStream.o \
src/SBaseCommon.o \
src/SBaseDumpData.o \
src/SBaseFileTable.o \
src/SBaseSubTypes.o \
src/SCompression.o \
src/SFileAddFile.o \
src/SFileAttributes.o \
src/SFileCompactArchive.o \
src/SFileCreateArchive.o \
src/SFileExtractFile.o \
src/SFileFindFile.o \
src/SFileGetFileInfo.o \
src/SFileListFile.o \
src/SFileOpenArchive.o \
src/SFileOpenFileEx.o \
src/SFilePatchArchives.o \
src/SFileReadFile.o \
src/SFileVerify.o
COBJS = src/libtomcrypt/src/hashes/sha1.o \
src/libtomcrypt/src/hashes/hash_memory.o \
src/libtomcrypt/src/hashes/md5.o \
src/libtomcrypt/src/misc/crypt_hash_is_valid.o \
src/libtomcrypt/src/misc/crypt_prng_descriptor.o \
src/libtomcrypt/src/misc/crypt_register_prng.o \
src/libtomcrypt/src/misc/crypt_ltc_mp_descriptor.o \
src/libtomcrypt/src/misc/crypt_find_hash.o \
src/libtomcrypt/src/misc/zeromem.o \
src/libtomcrypt/src/misc/base64_decode.o \
src/libtomcrypt/src/misc/crypt_register_hash.o \
src/libtomcrypt/src/misc/crypt_find_prng.o \
src/libtomcrypt/src/misc/crypt_prng_is_valid.o \
src/libtomcrypt/src/misc/crypt_hash_descriptor.o \
src/libtomcrypt/src/misc/crypt_libc.o \
src/libtomcrypt/src/misc/crypt_argchk.o \
src/libtomcrypt/src/math/multi.o \
src/libtomcrypt/src/math/ltm_desc.o \
src/libtomcrypt/src/math/rand_prime.o \
src/libtomcrypt/src/pk/asn1/der_decode_bit_string.o \
src/libtomcrypt/src/pk/asn1/der_decode_boolean.o \
src/libtomcrypt/src/pk/asn1/der_decode_choice.o \
src/libtomcrypt/src/pk/asn1/der_decode_ia5_string.o \
src/libtomcrypt/src/pk/asn1/der_decode_integer.o \
src/libtomcrypt/src/pk/asn1/der_decode_object_identifier.o \
src/libtomcrypt/src/pk/asn1/der_decode_octet_string.o \
src/libtomcrypt/src/pk/asn1/der_decode_printable_string.o \
src/libtomcrypt/src/pk/asn1/der_decode_sequence_ex.o \
src/libtomcrypt/src/pk/asn1/der_decode_sequence_flexi.o \
src/libtomcrypt/src/pk/asn1/der_decode_sequence_multi.o \
src/libtomcrypt/src/pk/asn1/der_decode_short_integer.o \
src/libtomcrypt/src/pk/asn1/der_decode_utctime.o \
src/libtomcrypt/src/pk/asn1/der_decode_utf8_string.o \
src/libtomcrypt/src/pk/asn1/der_encode_bit_string.o \
src/libtomcrypt/src/pk/asn1/der_encode_boolean.o \
src/libtomcrypt/src/pk/asn1/der_encode_ia5_string.o \
src/libtomcrypt/src/pk/asn1/der_encode_integer.o \
src/libtomcrypt/src/pk/asn1/der_encode_object_identifier.o \
src/libtomcrypt/src/pk/asn1/der_encode_octet_string.o \
src/libtomcrypt/src/pk/asn1/der_encode_printable_string.o \
src/libtomcrypt/src/pk/asn1/der_encode_sequence_ex.o \
src/libtomcrypt/src/pk/asn1/der_encode_sequence_multi.o \
src/libtomcrypt/src/pk/asn1/der_encode_set.o \
src/libtomcrypt/src/pk/asn1/der_encode_setof.o \
src/libtomcrypt/src/pk/asn1/der_encode_short_integer.o \
src/libtomcrypt/src/pk/asn1/der_encode_utctime.o \
src/libtomcrypt/src/pk/asn1/der_encode_utf8_string.o \
src/libtomcrypt/src/pk/asn1/der_length_bit_string.o \
src/libtomcrypt/src/pk/asn1/der_length_boolean.o \
src/libtomcrypt/src/pk/asn1/der_length_ia5_string.o \
src/libtomcrypt/src/pk/asn1/der_length_integer.o \
src/libtomcrypt/src/pk/asn1/der_length_object_identifier.o \
src/libtomcrypt/src/pk/asn1/der_length_octet_string.o \
src/libtomcrypt/src/pk/asn1/der_length_printable_string.o \
src/libtomcrypt/src/pk/asn1/der_length_sequence.o \
src/libtomcrypt/src/pk/asn1/der_length_utctime.o \
src/libtomcrypt/src/pk/asn1/der_sequence_free.o \
src/libtomcrypt/src/pk/asn1/der_length_utf8_string.o \
src/libtomcrypt/src/pk/asn1/der_length_short_integer.o \
src/libtomcrypt/src/pk/ecc/ltc_ecc_projective_dbl_point.o \
src/libtomcrypt/src/pk/ecc/ltc_ecc_mulmod.o \
src/libtomcrypt/src/pk/ecc/ltc_ecc_projective_add_point.o \
src/libtomcrypt/src/pk/ecc/ltc_ecc_map.o \
src/libtomcrypt/src/pk/ecc/ltc_ecc_points.o \
src/libtomcrypt/src/pk/ecc/ltc_ecc_mul2add.o \
src/libtomcrypt/src/pk/pkcs1/pkcs_1_v1_5_decode.o \
src/libtomcrypt/src/pk/pkcs1/pkcs_1_v1_5_encode.o \
src/libtomcrypt/src/pk/pkcs1/pkcs_1_pss_decode.o \
src/libtomcrypt/src/pk/pkcs1/pkcs_1_pss_encode.o \
src/libtomcrypt/src/pk/pkcs1/pkcs_1_mgf1.o \
src/libtomcrypt/src/pk/pkcs1/pkcs_1_oaep_decode.o \
src/libtomcrypt/src/pk/rsa/rsa_make_key.o \
src/libtomcrypt/src/pk/rsa/rsa_free.o \
src/libtomcrypt/src/pk/rsa/rsa_verify_simple.o \
src/libtomcrypt/src/pk/rsa/rsa_import.o \
src/libtomcrypt/src/pk/rsa/rsa_verify_hash.o \
src/libtomcrypt/src/pk/rsa/rsa_sign_hash.o \
src/libtomcrypt/src/pk/rsa/rsa_exptmod.o \
src/libtommath/bn_mp_exptmod_fast.o \
src/libtommath/bn_mp_jacobi.o \
src/libtommath/bn_mp_mod.o \
src/libtommath/bn_mp_signed_bin_size.o \
src/libtommath/bn_mp_invmod.o \
src/libtommath/bn_mp_is_square.o \
src/libtommath/bn_mp_neg.o \
src/libtommath/bn_mp_reduce_2k.o \
src/libtommath/bn_mp_xor.o \
src/libtommath/bn_mp_karatsuba_mul.o \
src/libtommath/bn_mp_dr_setup.o \
src/libtommath/bn_mp_mul.o \
src/libtommath/bn_mp_init_multi.o \
src/libtommath/bn_mp_clear.o \
src/libtommath/bn_s_mp_sqr.o \
src/libtommath/bn_mp_rshd.o \
src/libtommath/bn_s_mp_sub.o \
src/libtommath/bn_mp_sub.o \
src/libtommath/bn_mp_toradix.o \
src/libtommath/bn_mp_reduce.o \
src/libtommath/bn_mp_prime_is_prime.o \
src/libtommath/bn_mp_prime_next_prime.o \
src/libtommath/bn_mp_exptmod.o \
src/libtommath/bn_mp_mod_2d.o \
src/libtommath/bn_reverse.o \
src/libtommath/bn_mp_init.o \
src/libtommath/bn_fast_s_mp_sqr.o \
src/libtommath/bn_mp_sqr.o \
src/libtommath/bn_mp_cnt_lsb.o \
src/libtommath/bn_mp_clear_multi.o \
src/libtommath/bn_mp_exch.o \
src/libtommath/bn_fast_s_mp_mul_digs.o \
src/libtommath/bn_mp_grow.o \
src/libtommath/bn_mp_read_radix.o \
src/libtommath/bn_mp_mul_2.o \
src/libtommath/bn_mp_shrink.o \
src/libtommath/bn_mp_div_2.o \
src/libtommath/bn_fast_mp_invmod.o \
src/libtommath/bn_mp_prime_miller_rabin.o \
src/libtommath/bn_mp_to_unsigned_bin.o \
src/libtommath/bn_mp_prime_rabin_miller_trials.o \
src/libtommath/bn_mp_2expt.o \
src/libtommath/bn_mp_cmp_mag.o \
src/libtommath/bn_mp_to_signed_bin.o \
src/libtommath/bn_mp_get_int.o \
src/libtommath/bn_mp_montgomery_reduce.o \
src/libtommath/bn_mp_dr_reduce.o \
src/libtommath/bn_mp_fwrite.o \
src/libtommath/bn_mp_and.o \
src/libtommath/bn_mp_exteuclid.o \
src/libtommath/bn_fast_mp_montgomery_reduce.o \
src/libtommath/bn_s_mp_mul_high_digs.o \
src/libtommath/bn_mp_reduce_setup.o \
src/libtommath/bn_mp_lcm.o \
src/libtommath/bn_mp_abs.o \
src/libtommath/bn_mp_cmp.o \
src/libtommath/bn_mp_submod.o \
src/libtommath/bn_mp_div_d.o \
src/libtommath/bn_s_mp_mul_digs.o \
src/libtommath/bn_mp_mul_d.o \
src/libtommath/bn_mp_to_unsigned_bin_n.o \
src/libtommath/bn_mp_prime_random_ex.o \
src/libtommath/bn_mp_rand.o \
src/libtommath/bn_mp_div_2d.o \
src/libtommath/bn_mp_addmod.o \
src/libtommath/bn_mp_init_copy.o \
src/libtommath/bn_mp_read_unsigned_bin.o \
src/libtommath/bn_mp_toradix_n.o \
src/libtommath/bn_fast_s_mp_mul_high_digs.o \
src/libtommath/bn_mp_toom_sqr.o \
src/libtommath/bn_mp_to_signed_bin_n.o \
src/libtommath/bn_mp_reduce_2k_setup_l.o \
src/libtommath/bn_mp_div.o \
src/libtommath/bn_prime_tab.o \
src/libtommath/bn_mp_karatsuba_sqr.o \
src/libtommath/bn_mp_gcd.o \
src/libtommath/bn_mp_prime_is_divisible.o \
src/libtommath/bn_mp_set_int.o \
src/libtommath/bn_mp_prime_fermat.o \
src/libtommath/bn_mp_cmp_d.o \
src/libtommath/bn_mp_add.o \
src/libtommath/bn_mp_sub_d.o \
src/libtommath/bn_s_mp_exptmod.o \
src/libtommath/bn_mp_init_size.o \
src/libtommath/bncore.o \
src/libtommath/bn_mp_radix_smap.o \
src/libtommath/bn_mp_reduce_2k_l.o \
src/libtommath/bn_mp_montgomery_calc_normalization.o \
src/libtommath/bn_mp_mod_d.o \
src/libtommath/bn_mp_set.o \
src/libtommath/bn_mp_or.o \
src/libtommath/bn_mp_sqrt.o \
src/libtommath/bn_mp_invmod_slow.o \
src/libtommath/bn_mp_count_bits.o \
src/libtommath/bn_mp_read_signed_bin.o \
src/libtommath/bn_mp_div_3.o \
src/libtommath/bn_mp_unsigned_bin_size.o \
src/libtommath/bn_mp_mulmod.o \
src/libtommath/bn_mp_clamp.o \
src/libtommath/bn_mp_reduce_2k_setup.o \
src/libtommath/bn_mp_toom_mul.o \
src/libtommath/bn_mp_montgomery_setup.o \
src/libtommath/bn_mp_expt_d.o \
src/libtommath/bn_mp_copy.o \
src/libtommath/bn_mp_dr_is_modulus.o \
src/libtommath/bn_mp_sqrmod.o \
src/libtommath/bn_mp_reduce_is_2k_l.o \
src/libtommath/bn_mp_mul_2d.o \
src/libtommath/bn_mp_fread.o \
src/libtommath/bn_mp_init_set.o \
src/libtommath/bn_mp_add_d.o \
src/libtommath/bn_mp_zero.o \
src/libtommath/bn_s_mp_add.o \
src/libtommath/bn_mp_radix_size.o \
src/libtommath/bn_mp_init_set_int.o \
src/libtommath/bn_mp_n_root.o \
src/libtommath/bn_mp_lshd.o \
src/libtommath/bn_mp_reduce_is_2k.o \
src/bzip2/blocksort.o \
src/bzip2/bzlib.o \
src/bzip2/compress.o \
src/bzip2/crctable.o \
src/bzip2/decompress.o \
src/bzip2/huffman.o \
src/bzip2/randtable.o \
src/pklib/implode.o \
src/pklib/crc32.o \
src/pklib/explode.o \
src/zlib/crc32.o \
src/zlib/trees.o \
src/zlib/compress.o \
src/zlib/adler32.o \
src/zlib/inftrees.o \
src/zlib/inffast.o \
src/zlib/deflate.o \
src/zlib/inflate.o \
src/zlib/zutil.o \
src/lzma/C/LzFind.o \
src/lzma/C/LzmaEnc.o \
src/lzma/C/LzmaDec.o \
src/jenkins/lookup3.o
OBJS_DLL = stormlib_dll/DllMain.o
OBJS_TEST = test/StormTest.o
all: $(LIBRARY) $(TESTEXE)
#clean:
# rm -f $(COBJS) $(LIBRARY)
#install: $(LIBRARY)
# install $(LIBRARY) /usr/local/lib
# mkdir -p /usr/local/include/StormLib
# cp src/StormLib.h /usr/local/include/StormLib
# cp src/StormPort.h /usr/local/include/StormLib
$(LIBRARY): $(COBJS) $(OBJS) $(OBJS_DLL)
$(CPP) $(CFLAGS) $(DFLAGS) -o $(LIBRARY) $(COBJS) $(OBJS) $(OBJS_DLL) $(DLLLFLAGS)
$(TESTEXE): $(COBJS) $(OBJS) $(OBJS_TEST)
$(CPP) $(CFLAGS) $(DFLAGS) -o "$@" $(COBJS) $(OBJS) $(OBJS_TEST) $(EXELFLAGS)
$(COBJS): %.o: %.c
$(CC) -o $@ $(CFLAGS) $(DFLAGS) -c $<
$(OBJS): %.o: %.cpp
$(CC) -o $@ $(CFLAGS) $(DFLAGS) -c $<
$(OBJS_DLL): %.o: %.c
$(CC) -o $@ $(CFLAGS) $(DFLAGS) -c $<
$(OBJS_TEST): %.o: %.cpp
$(CPP) -o $@ $(CFLAGS) $(DFLAGS) -c $<