程式語言 - Visual C++ 6.0 - Microsoft Fundation Class (MFC) - main.mak



OUTDIR   = Debug
TARGET   = main
CPP      = cl.exe
CXXFLAGS = /nologo /MD /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_WINDOWS" /D "_AFXDLL" /D "_MBCS" /Fo"$(OUTDIR)\\" /Fd"$(OUTDIR)\\" /FD /GZ /c

RC       = rc.exe
RCFLAGS  = /l 0x409 /fo"$(OUTDIR)\$(TARGET).res" /d "_AFXDLL"
	
LD       = link.exe
LDFLAGS  = /nologo /subsystem:windows /incremental:yes /pdb:"$(OUTDIR)\$(TARGET).pdb" /machine:I386 /out:"$(OUTDIR)\$(TARGET).exe" /pdbtype:sept

OBJS     = "$(OUTDIR)\$(TARGET).obj" "$(OUTDIR)\$(TARGET).res"

all:
	rmdir /s /q $(OUTDIR)
	mkdir "$(OUTDIR)"
	if not exist $(TARGET).rc copy NUL $(TARGET).rc
	$(CPP) $(CXXFLAGS) $(TARGET).cpp
	$(RC) $(RCFLAGS) $(TARGET).rc
	$(LD) $(LDFLAGS) $(OBJS)
	"$(OUTDIR)\$(TARGET)"