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