Pro/E二次开发之旅(3)定制自己的protoolkit程序时makefiles的编写方法

开发protoolkit应用程序时,makefiles的制作很关键,下面简单叙述下makefiles文件的编写方法:(已protoolkit的测试文件make_install作为模板)

1、从protoolkit的安装目录下的obj文件夹下找到make_install这个文件,将它拷贝到你的开发的程序的文件目录下,重命名它,并对其一下内容进行必要的修改:

• Change the macro MAKEFILENAME to refer to the makefile by its new name.(改写MAKEFILENAME新的应用程序名称)
• Change the macros EXE and EXE_DLL to define output file names more suitable for your own application.(改写EXE和EXE_DLL为新的生成文件的名称)
• Change the macro PROTOOL_SRC to refer to the loadpoint of Pro/TOOLKIT.(改写PROTOOL_SRC为本机的protoolkit的安装目录)
• Change the macro OBJS to refer to the object files that will result from compiling your Pro/TOOLKIT source files.(改写OBJS的名称)
• Add targets for those object files. These contain instructions for compiling your C source files. The form of these target definitions can be copied from the ones in the original makefile.(改写C程序的资源文件名)
They generally take the following form:
myfile.o: myfile.c
  $(CC) $(CFLAGS) myfile.c(myfile.o中的myfile即为上述中改写OBJS的名称的名称,myfile.c中的myfile改写成C程序的资源文件名)
Note: The second line must start with a tab character.(上面代码中的第二行必须以Tab开头)

 

此外,如果原来开发的protoolkit应用程序改版了,makefiles文件也需要重新编写来生成相应的exe文件或者dll文件,makefiles文件是用protoolkit进行Pro/E二次开发的关键,一定要仔细掌握其编写和改写方法。

转载于:https://www.cnblogs.com/alexworks/articles/1687608.html

  • 0
    点赞
  • 4
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值