1LIBS = $(LIBS) oleaut32.lib ole32.lib 2 3!IFNDEF MY_NO_UNICODE 4CFLAGS = $(CFLAGS) -DUNICODE -D_UNICODE 5!ENDIF 6 7# CFLAGS = $(CFLAGS) -FAsc -Fa$O/Asm/ 8 9!IFNDEF O 10!IFDEF CPU 11O=$(CPU) 12!ELSE 13O=O 14!ENDIF 15!ENDIF 16 17!IF "$(CPU)" == "AMD64" 18MY_ML = ml64 -Dx64 19!ELSEIF "$(CPU)" == "ARM" 20MY_ML = armasm 21!ELSE 22MY_ML = ml 23!ENDIF 24 25 26!IFDEF UNDER_CE 27RFLAGS = $(RFLAGS) -dUNDER_CE 28!IFDEF MY_CONSOLE 29LFLAGS = $(LFLAGS) /ENTRY:mainACRTStartup 30!ENDIF 31!ELSE 32!IFNDEF NEW_COMPILER 33LFLAGS = $(LFLAGS) -OPT:NOWIN98 34!ENDIF 35CFLAGS = $(CFLAGS) -Gr 36LIBS = $(LIBS) user32.lib advapi32.lib shell32.lib 37!ENDIF 38 39!IF "$(CPU)" == "ARM" 40COMPL_ASM = $(MY_ML) $** $O/$(*B).obj 41!ELSE 42COMPL_ASM = $(MY_ML) -c -Fo$O/ $** 43!ENDIF 44 45CFLAGS = $(CFLAGS) -nologo -c -Fo$O/ -W4 -WX -EHsc -Gy -GR- 46 47!IFDEF MY_STATIC_LINK 48!IFNDEF MY_SINGLE_THREAD 49CFLAGS = $(CFLAGS) -MT 50!ENDIF 51!ELSE 52CFLAGS = $(CFLAGS) -MD 53!ENDIF 54 55!IFDEF NEW_COMPILER 56CFLAGS = $(CFLAGS) -GS- -Zc:forScope 57!IFNDEF UNDER_CE 58CFLAGS = $(CFLAGS) -MP2 59!ENDIF 60!ELSE 61CFLAGS = $(CFLAGS) 62!ENDIF 63 64CFLAGS_O1 = $(CFLAGS) -O1 65CFLAGS_O2 = $(CFLAGS) -O2 66 67LFLAGS = $(LFLAGS) -nologo -OPT:REF -OPT:ICF 68 69!IFNDEF UNDER_CE 70LFLAGS = $(LFLAGS) /LARGEADDRESSAWARE 71!ENDIF 72 73!IFDEF DEF_FILE 74LFLAGS = $(LFLAGS) -DLL -DEF:$(DEF_FILE) 75!ENDIF 76 77MY_SUB_SYS_VER=6.0 78!IFDEF MY_CONSOLE 79# LFLAGS = $(LFLAGS) /SUBSYSTEM:console,$(MY_SUB_SYS_VER) 80!ELSE 81# LFLAGS = $(LFLAGS) /SUBSYSTEM:windows,$(MY_SUB_SYS_VER) 82!ENDIF 83 84PROGPATH = $O\$(PROG) 85 86COMPL_O1 = $(CC) $(CFLAGS_O1) $** 87COMPL_O2 = $(CC) $(CFLAGS_O2) $** 88COMPL_PCH = $(CC) $(CFLAGS_O1) -Yc"StdAfx.h" -Fp$O/a.pch $** 89COMPL = $(CC) $(CFLAGS_O1) -Yu"StdAfx.h" -Fp$O/a.pch $** 90 91COMPLB = $(CC) $(CFLAGS_O1) -Yu"StdAfx.h" -Fp$O/a.pch $< 92# COMPLB_O2 = $(CC) $(CFLAGS_O2) -Yu"StdAfx.h" -Fp$O/a.pch $< 93COMPLB_O2 = $(CC) $(CFLAGS_O2) $< 94 95CCOMPL_PCH = $(CC) $(CFLAGS_O2) -Yc"Precomp.h" -Fp$O/a.pch $** 96CCOMPL_USE = $(CC) $(CFLAGS_O2) -Yu"Precomp.h" -Fp$O/a.pch $** 97CCOMPL = $(CC) $(CFLAGS_O2) $** 98CCOMPLB = $(CC) $(CFLAGS_O2) $< 99 100 101all: $(PROGPATH) 102 103clean: 104 -del /Q $(PROGPATH) $O\*.exe $O\*.dll $O\*.obj $O\*.lib $O\*.exp $O\*.res $O\*.pch $O\*.asm 105 106$O: 107 if not exist "$O" mkdir "$O" 108$O/Asm: 109 if not exist "$O/Asm" mkdir "$O/Asm" 110 111$(PROGPATH): $O $O/Asm $(OBJS) $(DEF_FILE) 112 link $(LFLAGS) -out:$(PROGPATH) $(OBJS) $(LIBS) 113 114!IFNDEF NO_DEFAULT_RES 115$O\resource.res: $(*B).rc 116 rc $(RFLAGS) -fo$@ $** 117!ENDIF 118$O\StdAfx.obj: $(*B).cpp 119 $(COMPL_PCH) 120