1 PROG = lzma 2 CXX = g++ -O2 -Wall 3 CXX_C = gcc -O2 -Wall 4 LIB = -lm 5 RM = rm -f 6 CFLAGS = -c -D_7ZIP_ST 7 8 ifdef SystemDrive 9 IS_MINGW = 1 10 endif 11 12 ifdef IS_MINGW 13 FILE_IO =FileIO 14 FILE_IO_2 =Windows/$(FILE_IO) 15 LIB2 = -luuid 16 else 17 FILE_IO =C_FileIO 18 FILE_IO_2 =Common/$(FILE_IO) 19 endif 20 21 OBJS = \ 22 LzmaAlone.o \ 23 Bench.o \ 24 BenchCon.o \ 25 ConsoleClose.o \ 26 LzmaDecoder.o \ 27 LzmaEncoder.o \ 28 LzmaRegister.o \ 29 CreateCoder.o \ 30 CWrappers.o \ 31 FileStreams.o \ 32 FilterCoder.o \ 33 StreamUtils.o \ 34 $(FILE_IO).o \ 35 CommandLineParser.o \ 36 CRC.o \ 37 IntToString.o \ 38 MyString.o \ 39 StringConvert.o \ 40 StringToInt.o \ 41 MyVector.o \ 42 7zCrc.o \ 43 7zCrcOpt.o \ 44 Alloc.o \ 45 Bra86.o \ 46 CpuArch.o \ 47 LzFind.o \ 48 LzmaDec.o \ 49 LzmaEnc.o \ 50 Lzma86Dec.o \ 51 Lzma86Enc.o \ 52 53 54 all: $(PROG) 55 56 $(PROG): $(OBJS) 57 $(CXX) -o $(PROG) $(LDFLAGS) $(OBJS) $(LIB) $(LIB2) 58 59 LzmaAlone.o: LzmaAlone.cpp 60 $(CXX) $(CFLAGS) LzmaAlone.cpp 61 62 Bench.o: ../../UI/Common/Bench.cpp 63 $(CXX) $(CFLAGS) ../../UI/Common/Bench.cpp 64 65 BenchCon.o: ../../UI/Console/BenchCon.cpp 66 $(CXX) $(CFLAGS) ../../UI/Console/BenchCon.cpp 67 68 ConsoleClose.o: ../../UI/Console/ConsoleClose.cpp 69 $(CXX) $(CFLAGS) ../../UI/Console/ConsoleClose.cpp 70 71 LzmaDecoder.o: ../../Compress/LzmaDecoder.cpp 72 $(CXX) $(CFLAGS) ../../Compress/LzmaDecoder.cpp 73 74 LzmaEncoder.o: ../../Compress/LzmaEncoder.cpp 75 $(CXX) $(CFLAGS) ../../Compress/LzmaEncoder.cpp 76 77 LzmaRegister.o: ../../Compress/LzmaRegister.cpp 78 $(CXX) $(CFLAGS) ../../Compress/LzmaRegister.cpp 79 80 CreateCoder.o: ../../Common/CreateCoder.cpp 81 $(CXX) $(CFLAGS) ../../Common/CreateCoder.cpp 82 83 CWrappers.o: ../../Common/CWrappers.cpp 84 $(CXX) $(CFLAGS) ../../Common/CWrappers.cpp 85 86 FileStreams.o: ../../Common/FileStreams.cpp 87 $(CXX) $(CFLAGS) ../../Common/FileStreams.cpp 88 89 FilterCoder.o: ../../Common/FilterCoder.cpp 90 $(CXX) $(CFLAGS) ../../Common/FilterCoder.cpp 91 92 StreamUtils.o: ../../Common/StreamUtils.cpp 93 $(CXX) $(CFLAGS) ../../Common/StreamUtils.cpp 94 95 $(FILE_IO).o: ../../../$(FILE_IO_2).cpp 96 $(CXX) $(CFLAGS) ../../../$(FILE_IO_2).cpp 97 98 99 CommandLineParser.o: ../../../Common/CommandLineParser.cpp 100 $(CXX) $(CFLAGS) ../../../Common/CommandLineParser.cpp 101 102 CRC.o: ../../../Common/CRC.cpp 103 $(CXX) $(CFLAGS) ../../../Common/CRC.cpp 104 105 MyWindows.o: ../../../Common/MyWindows.cpp 106 $(CXX) $(CFLAGS) ../../../Common/MyWindows.cpp 107 108 IntToString.o: ../../../Common/IntToString.cpp 109 $(CXX) $(CFLAGS) ../../../Common/IntToString.cpp 110 111 MyString.o: ../../../Common/MyString.cpp 112 $(CXX) $(CFLAGS) ../../../Common/MyString.cpp 113 114 StringConvert.o: ../../../Common/StringConvert.cpp 115 $(CXX) $(CFLAGS) ../../../Common/StringConvert.cpp 116 117 StringToInt.o: ../../../Common/StringToInt.cpp 118 $(CXX) $(CFLAGS) ../../../Common/StringToInt.cpp 119 120 MyVector.o: ../../../Common/MyVector.cpp 121 $(CXX) $(CFLAGS) ../../../Common/MyVector.cpp 122 123 7zCrc.o: ../../../../C/7zCrc.c 124 $(CXX_C) $(CFLAGS) ../../../../C/7zCrc.c 125 126 7zCrcOpt.o: ../../../../C/7zCrcOpt.c 127 $(CXX_C) $(CFLAGS) ../../../../C/7zCrcOpt.c 128 129 Alloc.o: ../../../../C/Alloc.c 130 $(CXX_C) $(CFLAGS) ../../../../C/Alloc.c 131 132 Bra86.o: ../../../../C/Bra86.c 133 $(CXX_C) $(CFLAGS) ../../../../C/Bra86.c 134 135 CpuArch.o: ../../../../C/CpuArch.c 136 $(CXX_C) $(CFLAGS) ../../../../C/CpuArch.c 137 138 LzFind.o: ../../../../C/LzFind.c 139 $(CXX_C) $(CFLAGS) ../../../../C/LzFind.c 140 141 LzmaDec.o: ../../../../C/LzmaDec.c 142 $(CXX_C) $(CFLAGS) ../../../../C/LzmaDec.c 143 144 LzmaEnc.o: ../../../../C/LzmaEnc.c 145 $(CXX_C) $(CFLAGS) ../../../../C/LzmaEnc.c 146 147 Lzma86Dec.o: ../../../../C/Lzma86Dec.c 148 $(CXX_C) $(CFLAGS) ../../../../C/Lzma86Dec.c 149 150 Lzma86Enc.o: ../../../../C/Lzma86Enc.c 151 $(CXX_C) $(CFLAGS) ../../../../C/Lzma86Enc.c 152 153 clean: 154 -$(RM) $(PROG) $(OBJS) 155 156