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 LzFindMt.o \ 22 Threads.o \ 23 24else 25 26RM = rm -f 27CFLAGS = -c -D_7ZIP_ST 28 29FILE_IO =C_FileIO 30FILE_IO_2 =Common/$(FILE_IO) 31 32 33endif 34 35 36OBJS = \ 37 $(MT_FILES) \ 38 $(FILE_IO).o \ 39 LzmaAlone.o \ 40 Bench.o \ 41 BenchCon.o \ 42 ConsoleClose.o \ 43 LzmaDecoder.o \ 44 LzmaEncoder.o \ 45 LzmaRegister.o \ 46 CreateCoder.o \ 47 CWrappers.o \ 48 FileStreams.o \ 49 FilterCoder.o \ 50 MethodProps.o \ 51 StreamUtils.o \ 52 CommandLineParser.o \ 53 CRC.o \ 54 CrcReg.o \ 55 IntToString.o \ 56 MyString.o \ 57 MyVector.o \ 58 MyWindows.o \ 59 StringConvert.o \ 60 StringToInt.o \ 61 PropVariant.o \ 62 System.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 153System.o: ../../../Windows/System.cpp 154 $(CXX) $(CFLAGS) ../../../Windows/System.cpp 155 1567zCrc.o: ../../../../C/7zCrc.c 157 $(CXX_C) $(CFLAGS) ../../../../C/7zCrc.c 158 1597zCrcOpt.o: ../../../../C/7zCrcOpt.c 160 $(CXX_C) $(CFLAGS) ../../../../C/7zCrcOpt.c 161 162Alloc.o: ../../../../C/Alloc.c 163 $(CXX_C) $(CFLAGS) ../../../../C/Alloc.c 164 165Bra86.o: ../../../../C/Bra86.c 166 $(CXX_C) $(CFLAGS) ../../../../C/Bra86.c 167 168CpuArch.o: ../../../../C/CpuArch.c 169 $(CXX_C) $(CFLAGS) ../../../../C/CpuArch.c 170 171LzFind.o: ../../../../C/LzFind.c 172 $(CXX_C) $(CFLAGS) ../../../../C/LzFind.c 173 174ifdef MT_FILES 175LzFindMt.o: ../../../../C/LzFindMt.c 176 $(CXX_C) $(CFLAGS) ../../../../C/LzFindMt.c 177 178Threads.o: ../../../../C/Threads.c 179 $(CXX_C) $(CFLAGS) ../../../../C/Threads.c 180endif 181 182LzmaDec.o: ../../../../C/LzmaDec.c 183 $(CXX_C) $(CFLAGS) ../../../../C/LzmaDec.c 184 185LzmaEnc.o: ../../../../C/LzmaEnc.c 186 $(CXX_C) $(CFLAGS) ../../../../C/LzmaEnc.c 187 188Lzma86Dec.o: ../../../../C/Lzma86Dec.c 189 $(CXX_C) $(CFLAGS) ../../../../C/Lzma86Dec.c 190 191Lzma86Enc.o: ../../../../C/Lzma86Enc.c 192 $(CXX_C) $(CFLAGS) ../../../../C/Lzma86Enc.c 193 194clean: 195 -$(RM) $(PROG) $(OBJS) 196