|
1 PROG = lzma.exe |
|
2 CFLAGS = $(CFLAGS) \ |
|
3 -DCOMPRESS_MF_MT \ |
|
4 -DBENCH_MT \ |
|
5 |
|
6 LIBS = $(LIBS) oleaut32.lib user32.lib |
|
7 |
|
8 !IFDEF CPU |
|
9 LIBS = $(LIBS) bufferoverflowU.lib |
|
10 CFLAGS = $(CFLAGS) -GS- -Zc:forScope -W4 -Wp64 -DUNICODE -D_UNICODE |
|
11 !ENDIF |
|
12 |
|
13 !IFNDEF O |
|
14 !IFDEF CPU |
|
15 O=$(CPU) |
|
16 !ELSE |
|
17 O=O |
|
18 !ENDIF |
|
19 !ENDIF |
|
20 |
|
21 !IFDEF MY_STATIC_LINK |
|
22 !IFNDEF MY_SINGLE_THREAD |
|
23 CFLAGS = $(CFLAGS) -MT |
|
24 !ENDIF |
|
25 !ELSE |
|
26 CFLAGS = $(CFLAGS) -MD |
|
27 !ENDIF |
|
28 |
|
29 CFLAGS = $(CFLAGS) -nologo -EHsc -c -Fo$O/ |
|
30 CFLAGS_O1 = $(CFLAGS) -O1 |
|
31 CFLAGS_O2 = $(CFLAGS) -O2 |
|
32 |
|
33 LFLAGS = $(LFLAGS) -nologo -OPT:NOWIN98 |
|
34 |
|
35 PROGPATH = $O\$(PROG) |
|
36 |
|
37 COMPL_O1 = $(CPP) $(CFLAGS_O1) $** |
|
38 COMPL_O2 = $(CPP) $(CFLAGS_O2) $** |
|
39 COMPL = $(CPP) $(CFLAGS_O1) $** |
|
40 |
|
41 |
|
42 LZMA_OBJS = \ |
|
43 $O\LzmaAlone.obj \ |
|
44 $O\LzmaBench.obj \ |
|
45 $O\LzmaBenchCon.obj \ |
|
46 $O\LzmaRam.obj \ |
|
47 |
|
48 LZMA_OPT_OBJS = \ |
|
49 $O\LZMADecoder.obj \ |
|
50 $O\LZMAEncoder.obj \ |
|
51 |
|
52 COMMON_OBJS = \ |
|
53 $O\CommandLineParser.obj \ |
|
54 $O\CRC.obj \ |
|
55 $O\IntToString.obj \ |
|
56 $O\MyString.obj \ |
|
57 $O\StringConvert.obj \ |
|
58 $O\StringToInt.obj \ |
|
59 $O\MyVector.obj |
|
60 |
|
61 WIN_OBJS = \ |
|
62 $O\System.obj |
|
63 |
|
64 7ZIP_COMMON_OBJS = \ |
|
65 $O\InBuffer.obj \ |
|
66 $O\OutBuffer.obj \ |
|
67 $O\StreamUtils.obj \ |
|
68 |
|
69 LZ_OBJS = \ |
|
70 $O\LZOutWindow.obj \ |
|
71 |
|
72 C_OBJS = \ |
|
73 $O\Alloc.obj \ |
|
74 $O\7zCrc.obj \ |
|
75 $O\Threads.obj \ |
|
76 |
|
77 C_LZ_OBJS = \ |
|
78 $O\MatchFinder.obj \ |
|
79 $O\MatchFinderMt.obj \ |
|
80 |
|
81 OBJS = \ |
|
82 $(LZMA_OBJS) \ |
|
83 $(LZMA_OPT_OBJS) \ |
|
84 $(COMMON_OBJS) \ |
|
85 $(WIN_OBJS) \ |
|
86 $(7ZIP_COMMON_OBJS) \ |
|
87 $(LZ_OBJS) \ |
|
88 $(C_OBJS) \ |
|
89 $(C_LZ_OBJS) \ |
|
90 $O\LzmaRamDecode.obj \ |
|
91 $O\LzmaDecode.obj \ |
|
92 $O\FileStreams.obj \ |
|
93 $O\FileIO.obj \ |
|
94 $O\RangeCoderBit.obj \ |
|
95 $O\BranchX86.obj \ |
|
96 |
|
97 all: $(PROGPATH) |
|
98 |
|
99 clean: |
|
100 -del /Q $(PROGPATH) $O\*.exe $O\*.dll $O\*.obj $O\*.lib $O\*.exp $O\*.res $O\*.pch |
|
101 |
|
102 $O: |
|
103 if not exist "$O" mkdir "$O" |
|
104 |
|
105 $(PROGPATH): $O $(OBJS) |
|
106 link $(LFLAGS) -out:$(PROGPATH) $(OBJS) $(LIBS) |
|
107 |
|
108 |
|
109 $(LZMA_OBJS): $(*B).cpp |
|
110 $(COMPL) |
|
111 $(LZMA_OPT_OBJS): ../LZMA/$(*B).cpp |
|
112 $(COMPL_O2) |
|
113 $(COMMON_OBJS): ../../../Common/$(*B).cpp |
|
114 $(COMPL) |
|
115 $(WIN_OBJS): ../../../Windows/$(*B).cpp |
|
116 $(COMPL) |
|
117 $(7ZIP_COMMON_OBJS): ../../Common/$(*B).cpp |
|
118 $(COMPL) |
|
119 $(LZ_OBJS): ../LZ/$(*B).cpp |
|
120 $(COMPL) |
|
121 $O\RangeCoderBit.obj: ../RangeCoder/$(*B).cpp |
|
122 $(COMPL) |
|
123 $O\LzmaRamDecode.obj: LzmaRamDecode.c |
|
124 $(COMPL_O1) |
|
125 $O\LzmaDecode.obj: ../../../../C/Compress/Lzma/LzmaDecode.c |
|
126 $(COMPL_O2) |
|
127 $O\BranchX86.obj: ../../../../C/Compress/Branch/BranchX86.c |
|
128 $(COMPL_O2) |
|
129 $O\FileStreams.obj: ../../Common/FileStreams.cpp |
|
130 $(COMPL) |
|
131 $O\FileIO.obj: ../../../Windows/FileIO.cpp |
|
132 $(COMPL) |
|
133 $(C_OBJS): ../../../../C/$(*B).c |
|
134 $(COMPL_O2) |
|
135 $(C_LZ_OBJS): ../../../../C/Compress/Lz/$(*B).c |
|
136 $(COMPL_O2) |