因为系统上装有vc6、vb6、vc2008、masm9,全部是绿色安装,编译时常是手工,用MAKEFILE感觉更方便一点,小记在这里备忘。
SRCDIR=g:/abc
CCP=cl.exe
LINKER=link.exe
RC=rc.exe
PATH=$(PATH);g:/vc2008/bin
OBJS=/
one.obj
LIBS=/
kernel32.lib user32.lib gdi32.lib comdlg32.lib shell32.lib
end: one.exe
PAUSE
one.exe: begin $(OBJS)
begin:
set INCLUDE=g:/vc2008/include;g:/vc2008/PlatformSDK/include
set LIB=g:/vc2008/lib;g:/vc2008/PlatformSDK/lib
{$(SRCDIR)/}.cpp.obj:
$(CCP) /MD /c /EHsc /Fo$(SRCDIR)/ $<
{$(SRCDIR)/}.obj.exe:
$(LINKER) /subsystem:windows /OUT:$(SRCDIR)/one.exe $(LIBS) $<