makefile 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475
  1. PROG = 7zDec.exe
  2. !IFDEF CPU
  3. LIBS = $(LIBS) bufferoverflowU.lib
  4. CFLAGS = $(CFLAGS) -GS- -Zc:forScope -WX -GS- -Gy -W4
  5. !ENDIF
  6. !IFNDEF O
  7. !IFDEF CPU
  8. O=$(CPU)
  9. !ELSE
  10. O=O
  11. !ENDIF
  12. !ENDIF
  13. CFLAGS = $(CFLAGS) -nologo -c -Fo$O/ -D_LZMA_IN_CB
  14. CFLAGS_O1 = $(CFLAGS) -O1
  15. CFLAGS_O2 = $(CFLAGS) -O2
  16. LFLAGS = $(LFLAGS) -nologo -OPT:NOWIN98 -OPT:REF
  17. PROGPATH = $O\$(PROG)
  18. COMPL_O1 = $(CPP) $(CFLAGS_O1) $**
  19. COMPL_O2 = $(CPP) $(CFLAGS_O2) $**
  20. COMPL = $(CPP) $(CFLAGS_O1) $**
  21. C_OBJS = \
  22. $O\7zCrc.obj \
  23. 7Z_OBJS = \
  24. $O\7zAlloc.obj \
  25. $O\7zBuffer.obj \
  26. $O\7zDecode.obj \
  27. $O\7zExtract.obj \
  28. $O\7zHeader.obj \
  29. $O\7zIn.obj \
  30. $O\7zItem.obj \
  31. $O\7zMain.obj \
  32. $O\7zMethodID.obj \
  33. OBJS = \
  34. $(7Z_OBJS) \
  35. $O\LzmaDecode.obj \
  36. $O\BranchX86.obj \
  37. $O\BranchX86_2.obj \
  38. $(C_OBJS) \
  39. all: $(PROGPATH)
  40. clean:
  41. -del /Q $(PROGPATH) $O\*.exe $O\*.dll $O\*.obj $O\*.lib $O\*.exp $O\*.res $O\*.pch
  42. $O:
  43. if not exist "$O" mkdir "$O"
  44. $(PROGPATH): $O $(OBJS)
  45. link $(LFLAGS) -out:$(PROGPATH) $(OBJS) $(LIBS)
  46. $(7Z_OBJS): $(*B).c
  47. $(COMPL)
  48. $O\LzmaDecode.obj: ../../Compress/Lzma/$(*B).c
  49. $(COMPL_O2)
  50. $O\BranchX86.obj: ../../Compress/Branch/$(*B).c
  51. $(COMPL_O2)
  52. $O\BranchX86_2.obj: ../../Compress/Branch/$(*B).c
  53. $(COMPL_O2)
  54. $(C_OBJS): ../../$(*B).c
  55. $(COMPL_O2)