Makefile 594 B

1234567891011121314151617181920212223242526
  1. CC = cl.exe
  2. LINK = link.exe
  3. # 编译和链接选项
  4. CFLAGS = /nologo /W3 /EHsc /Ox /DNDEBUG /MT /I ..\TypeLibs
  5. LDFLAGS = /nologo libcmt.lib libcpmt.lib Gdi32.lib user32.lib Kernel32.lib
  6. # 源文件和最终输出
  7. SOURCE = main.cpp cdrapp.cpp
  8. OBJECT = $(SOURCE:.cpp=.obj)
  9. TARGET = app.exe
  10. all: $(TARGET)
  11. $(TARGET): $(OBJECT)
  12. $(LINK) $(LDFLAGS) /out:$(TARGET) $(OBJECT)
  13. %.obj: %.cpp
  14. $(CC) $(CFLAGS) /c $<
  15. clean:
  16. del /Q *.obj *.dll *.exe VGCoreAuto.tlh VGCoreAuto.tli
  17. ## 单行命令编译
  18. ## cl.exe /EHsc /Ox /DNDEBUG main.cpp cdrapp.cpp /Fe:app.exe Gdi32.lib user32.lib Kernel32.lib