• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1PROG = lzma
2CXX = g++ -O2
3# -Wall -Werror -Wno-delete-non-virtual-dtor
4CXX_C = gcc -O2 -Wall -Werror
5
6ifdef SystemDrive
7IS_MINGW = 1
8endif
9
10ifdef IS_MINGW
11
12RM = del
13CFLAGS = -c
14LIB2 = -loleaut32 -luuid
15LDFLAGS = -s
16
17FILE_IO =FileIO
18FILE_IO_2 =Windows/$(FILE_IO)
19
20MT_FILES = \
21  System.o \
22  LzFindMt.o \
23  Threads.o \
24
25else
26
27RM = rm -f
28CFLAGS = -c -D_7ZIP_ST
29
30FILE_IO =C_FileIO
31FILE_IO_2 =Common/$(FILE_IO)
32
33
34endif
35
36
37OBJS = \
38  $(MT_FILES) \
39  $(FILE_IO).o \
40  LzmaAlone.o \
41  Bench.o \
42  BenchCon.o \
43  ConsoleClose.o \
44  LzmaDecoder.o \
45  LzmaEncoder.o \
46  LzmaRegister.o \
47  CreateCoder.o \
48  CWrappers.o \
49  FileStreams.o \
50  FilterCoder.o \
51  MethodProps.o \
52  StreamUtils.o \
53  CommandLineParser.o \
54  CRC.o \
55  CrcReg.o \
56  IntToString.o \
57  MyString.o \
58  MyVector.o \
59  MyWindows.o \
60  StringConvert.o \
61  StringToInt.o \
62  PropVariant.o \
63  7zCrc.o \
64  7zCrcOpt.o \
65  Alloc.o \
66  Bra86.o \
67  CpuArch.o \
68  LzFind.o \
69  LzmaDec.o \
70  LzmaEnc.o \
71  Lzma86Dec.o \
72  Lzma86Enc.o \
73
74
75all: $(PROG)
76
77$(PROG): $(OBJS)
78	$(CXX) -o $(PROG) $(LDFLAGS) $(OBJS) $(LIB2)
79
80LzmaAlone.o: LzmaAlone.cpp
81	$(CXX) $(CFLAGS) LzmaAlone.cpp
82
83Bench.o: ../../UI/Common/Bench.cpp
84	$(CXX) $(CFLAGS) ../../UI/Common/Bench.cpp
85
86BenchCon.o: ../../UI/Console/BenchCon.cpp
87	$(CXX) $(CFLAGS) ../../UI/Console/BenchCon.cpp
88
89ConsoleClose.o: ../../UI/Console/ConsoleClose.cpp
90	$(CXX) $(CFLAGS) ../../UI/Console/ConsoleClose.cpp
91
92LzmaDecoder.o: ../../Compress/LzmaDecoder.cpp
93	$(CXX) $(CFLAGS) ../../Compress/LzmaDecoder.cpp
94
95LzmaEncoder.o: ../../Compress/LzmaEncoder.cpp
96	$(CXX) $(CFLAGS) ../../Compress/LzmaEncoder.cpp
97
98LzmaRegister.o: ../../Compress/LzmaRegister.cpp
99	$(CXX) $(CFLAGS) ../../Compress/LzmaRegister.cpp
100
101CreateCoder.o: ../../Common/CreateCoder.cpp
102	$(CXX) $(CFLAGS) ../../Common/CreateCoder.cpp
103
104CWrappers.o: ../../Common/CWrappers.cpp
105	$(CXX) $(CFLAGS) ../../Common/CWrappers.cpp
106
107FileStreams.o: ../../Common/FileStreams.cpp
108	$(CXX) $(CFLAGS) ../../Common/FileStreams.cpp
109
110FilterCoder.o: ../../Common/FilterCoder.cpp
111	$(CXX) $(CFLAGS) ../../Common/FilterCoder.cpp
112
113MethodProps.o: ../../Common/MethodProps.cpp
114	$(CXX) $(CFLAGS) ../../Common/MethodProps.cpp
115
116StreamUtils.o: ../../Common/StreamUtils.cpp
117	$(CXX) $(CFLAGS) ../../Common/StreamUtils.cpp
118
119$(FILE_IO).o: ../../../$(FILE_IO_2).cpp
120	$(CXX) $(CFLAGS) ../../../$(FILE_IO_2).cpp
121
122
123CommandLineParser.o: ../../../Common/CommandLineParser.cpp
124	$(CXX) $(CFLAGS) ../../../Common/CommandLineParser.cpp
125
126CRC.o: ../../../Common/CRC.cpp
127	$(CXX) $(CFLAGS) ../../../Common/CRC.cpp
128
129CrcReg.o: ../../../Common/CrcReg.cpp
130	$(CXX) $(CFLAGS) ../../../Common/CrcReg.cpp
131
132IntToString.o: ../../../Common/IntToString.cpp
133	$(CXX) $(CFLAGS) ../../../Common/IntToString.cpp
134
135MyString.o: ../../../Common/MyString.cpp
136	$(CXX) $(CFLAGS) ../../../Common/MyString.cpp
137
138MyVector.o: ../../../Common/MyVector.cpp
139	$(CXX) $(CFLAGS) ../../../Common/MyVector.cpp
140
141MyWindows.o: ../../../Common/MyWindows.cpp
142	$(CXX) $(CFLAGS) ../../../Common/MyWindows.cpp
143
144StringConvert.o: ../../../Common/StringConvert.cpp
145	$(CXX) $(CFLAGS) ../../../Common/StringConvert.cpp
146
147StringToInt.o: ../../../Common/StringToInt.cpp
148	$(CXX) $(CFLAGS) ../../../Common/StringToInt.cpp
149
150PropVariant.o: ../../../Windows/PropVariant.cpp
151	$(CXX) $(CFLAGS) ../../../Windows/PropVariant.cpp
152
153ifdef MT_FILES
154System.o: ../../../Windows/System.cpp
155	$(CXX) $(CFLAGS) ../../../Windows/System.cpp
156endif
157
1587zCrc.o: ../../../../C/7zCrc.c
159	$(CXX_C) $(CFLAGS) ../../../../C/7zCrc.c
160
1617zCrcOpt.o: ../../../../C/7zCrcOpt.c
162	$(CXX_C) $(CFLAGS) ../../../../C/7zCrcOpt.c
163
164Alloc.o: ../../../../C/Alloc.c
165	$(CXX_C) $(CFLAGS) ../../../../C/Alloc.c
166
167Bra86.o: ../../../../C/Bra86.c
168	$(CXX_C) $(CFLAGS) ../../../../C/Bra86.c
169
170CpuArch.o: ../../../../C/CpuArch.c
171	$(CXX_C) $(CFLAGS) ../../../../C/CpuArch.c
172
173LzFind.o: ../../../../C/LzFind.c
174	$(CXX_C) $(CFLAGS) ../../../../C/LzFind.c
175
176ifdef MT_FILES
177LzFindMt.o: ../../../../C/LzFindMt.c
178	$(CXX_C) $(CFLAGS) ../../../../C/LzFindMt.c
179
180Threads.o: ../../../../C/Threads.c
181	$(CXX_C) $(CFLAGS) ../../../../C/Threads.c
182endif
183
184LzmaDec.o: ../../../../C/LzmaDec.c
185	$(CXX_C) $(CFLAGS) ../../../../C/LzmaDec.c
186
187LzmaEnc.o: ../../../../C/LzmaEnc.c
188	$(CXX_C) $(CFLAGS) ../../../../C/LzmaEnc.c
189
190Lzma86Dec.o: ../../../../C/Lzma86Dec.c
191	$(CXX_C) $(CFLAGS) ../../../../C/Lzma86Dec.c
192
193Lzma86Enc.o: ../../../../C/Lzma86Enc.c
194	$(CXX_C) $(CFLAGS) ../../../../C/Lzma86Enc.c
195
196clean:
197	-$(RM) $(PROG) $(OBJS)
198
199