Makefile 1.6 KB

1234567891011121314151617181920212223242526272829303132333435363738
  1. # Makefile 适合 MSVC2022 namke
  2. # 编译器和链接器
  3. CC = cl.exe
  4. LINK = link.exe
  5. # 编译和链接选项
  6. CFLAGS = /nologo /W3 /EHsc /Ox /DNDEBUG /I..\TypeLibs
  7. LDFLAGS = /nologo /DLL Gdi32.lib user32.lib Kernel32.lib
  8. # 源文件和资源文件
  9. SOURCE = ToolsBox.cpp cdrapp.cpp cdrapi.cpp cdrPDF2Clip.cpp
  10. RC_FILE = ToolsBox.rc
  11. RESOURCES = ToolsBox.res
  12. # 目标文件
  13. OBJECT = $(SOURCE:.cpp=.obj)
  14. # 最终输出
  15. TARGET = lycpg64.dll
  16. all: $(TARGET)
  17. $(TARGET): $(OBJECT) $(RESOURCES)
  18. $(LINK) $(LDFLAGS) /out:$@ $(OBJECT) $(RESOURCES)
  19. $(RESOURCES): $(RC_FILE)
  20. rc.exe /fo$@ $(RC_FILE)
  21. .cpp.obj:
  22. $(CC) $(CFLAGS) /c $<
  23. clean:
  24. del *.obj *.res *.dll *.orig VGCoreAuto.tlh VGCoreAuto.tli lycpg64.lib lycpg64.exp
  25. install:
  26. copy /y lycpg64.dll "C:\Program Files\Corel\CorelDRAW Graphics Suite 2020\Draw\Plugins64\lycpg64.cpg"
  27. .PHONY: all clean