1 PROG = 7zDec 2 CXX = g++ 3 LIB = 4 RM = rm -f 5 CFLAGS = -c -O2 -Wall 6 7 OBJS = 7zMain.o 7zAlloc.o 7zBuf.o 7zBuf2.o 7zCrc.o 7zCrcOpt.o 7zDec.o 7zIn.o CpuArch.o LzmaDec.o Lzma2Dec.o Bra.o Bra86.o Bcj2.o Ppmd7.o Ppmd7Dec.o 7zFile.o 7zStream.o 8 9 all: $(PROG) 10 11 $(PROG): $(OBJS) 12 $(CXX) -o $(PROG) $(LDFLAGS) $(OBJS) $(LIB) 13 14 7zMain.o: 7zMain.c 15 $(CXX) $(CFLAGS) 7zMain.c 16 17 7zAlloc.o: 7zAlloc.c 18 $(CXX) $(CFLAGS) ../../7zAlloc.c 19 20 7zBuf.o: ../../7zBuf.c 21 $(CXX) $(CFLAGS) ../../7zBuf.c 22 23 7zBuf2.o: ../../7zBuf2.c 24 $(CXX) $(CFLAGS) ../../7zBuf2.c 25 26 7zCrc.o: ../../7zCrc.c 27 $(CXX) $(CFLAGS) ../../7zCrc.c 28 29 7zCrcOpt.o: ../../7zCrc.c 30 $(CXX) $(CFLAGS) ../../7zCrcOpt.c 31 32 7zDec.o: ../../7zDec.c 33 $(CXX) $(CFLAGS) -D_7ZIP_PPMD_SUPPPORT ../../7zDec.c 34 35 7zIn.o: ../../7zIn.c 36 $(CXX) $(CFLAGS) ../../7zIn.c 37 38 CpuArch.o: ../../CpuArch.c 39 $(CXX) $(CFLAGS) ../../CpuArch.c 40 41 LzmaDec.o: ../../LzmaDec.c 42 $(CXX) $(CFLAGS) ../../LzmaDec.c 43 44 Lzma2Dec.o: ../../Lzma2Dec.c 45 $(CXX) $(CFLAGS) ../../Lzma2Dec.c 46 47 Bra.o: ../../Bra.c 48 $(CXX) $(CFLAGS) ../../Bra.c 49 50 Bra86.o: ../../Bra86.c 51 $(CXX) $(CFLAGS) ../../Bra86.c 52 53 Bcj2.o: ../../Bcj2.c 54 $(CXX) $(CFLAGS) ../../Bcj2.c 55 56 Ppmd7.o: ../../Ppmd7.c 57 $(CXX) $(CFLAGS) ../../Ppmd7.c 58 59 Ppmd7Dec.o: ../../Ppmd7Dec.c 60 $(CXX) $(CFLAGS) ../../Ppmd7Dec.c 61 62 7zFile.o: ../../7zFile.c 63 $(CXX) $(CFLAGS) ../../7zFile.c 64 65 7zStream.o: ../../7zStream.c 66 $(CXX) $(CFLAGS) ../../7zStream.c 67 68 clean: 69 -$(RM) $(PROG) $(OBJS) 70 71