1 LIBS = $(LIBS) oleaut32.lib ole32.lib 2 3 !IFDEF CPU 4 !IFNDEF NO_BUFFEROVERFLOWU 5 LIBS = $(LIBS) bufferoverflowU.lib 6 !ENDIF 7 !ENDIF 8 9 10 !IFNDEF O 11 !IFDEF CPU 12 O=$(CPU) 13 !ELSE 14 O=O 15 !ENDIF 16 !ENDIF 17 18 !IF "$(CPU)" == "AMD64" 19 MY_ML = ml64 -Dx64 20 !ELSEIF "$(CPU)" == "ARM" 21 MY_ML = armasm 22 !ELSE 23 MY_ML = ml 24 !ENDIF 25 26 27 !IFDEF UNDER_CE 28 RFLAGS = $(RFLAGS) -dUNDER_CE 29 !IFDEF MY_CONSOLE 30 LFLAGS = $(LFLAGS) /ENTRY:mainACRTStartup 31 !ENDIF 32 !ELSE 33 !IFNDEF NEW_COMPILER 34 LFLAGS = $(LFLAGS) -OPT:NOWIN98 35 !ENDIF 36 CFLAGS = $(CFLAGS) -Gr 37 LIBS = $(LIBS) user32.lib advapi32.lib shell32.lib 38 !ENDIF 39 40 !IF "$(CPU)" == "ARM" 41 COMPL_ASM = $(MY_ML) $** $O/$(*B).obj 42 !ELSE 43 COMPL_ASM = $(MY_ML) -c -Fo$O/ $** 44 !ENDIF 45 46 CFLAGS = $(CFLAGS) -nologo -c -Fo$O/ -WX -EHsc -Gy -GR- 47 48 !IFDEF MY_STATIC_LINK 49 !IFNDEF MY_SINGLE_THREAD 50 CFLAGS = $(CFLAGS) -MT 51 !ENDIF 52 !ELSE 53 CFLAGS = $(CFLAGS) -MD 54 !ENDIF 55 56 !IFDEF NEW_COMPILER 57 CFLAGS = $(CFLAGS) -W4 -GS- -Zc:forScope 58 !ELSE 59 CFLAGS = $(CFLAGS) -W3 60 !ENDIF 61 62 CFLAGS_O1 = $(CFLAGS) -O1 63 CFLAGS_O2 = $(CFLAGS) -O2 64 65 LFLAGS = $(LFLAGS) -nologo -OPT:REF -OPT:ICF 66 67 !IFDEF DEF_FILE 68 LFLAGS = $(LFLAGS) -DLL -DEF:$(DEF_FILE) 69 !ENDIF 70 71 PROGPATH = $O\$(PROG) 72 73 COMPL_O1 = $(CC) $(CFLAGS_O1) $** 74 COMPL_O2 = $(CC) $(CFLAGS_O2) $** 75 COMPL_PCH = $(CC) $(CFLAGS_O1) -Yc"StdAfx.h" -Fp$O/a.pch $** 76 COMPL = $(CC) $(CFLAGS_O1) -Yu"StdAfx.h" -Fp$O/a.pch $** 77 78 all: $(PROGPATH) 79 80 clean: 81 -del /Q $(PROGPATH) $O\*.exe $O\*.dll $O\*.obj $O\*.lib $O\*.exp $O\*.res $O\*.pch 82 83 $O: 84 if not exist "$O" mkdir "$O" 85 86 $(PROGPATH): $O $(OBJS) $(DEF_FILE) 87 link $(LFLAGS) -out:$(PROGPATH) $(OBJS) $(LIBS) 88 89 !IFNDEF NO_DEFAULT_RES 90 $O\resource.res: $(*B).rc 91 rc $(RFLAGS) -fo$@ $** 92 !ENDIF 93 $O\StdAfx.obj: $(*B).cpp 94 $(COMPL_PCH) 95