金庆的专栏

  C++博客 :: 首页 :: 新随笔 :: 联系 :: 聚合  :: 管理 ::
  423 随笔 :: 0 文章 :: 454 评论 :: 0 Trackbacks
Premake 生成 Makefile 的缺省配置

(金庆的专栏 2017.7)

premake5.exe --os=linux gmake

生成的 Makefile 中有个 config, 用 make 生成release版本时使用以下命令:

make config=release_x64

在premake5.lua中可以如下设置,使config缺省为 release_x64:

workspace "AppWorkspace"
    configurations { "Release", "Debug" }
    platforms { "x64", "x32" }
    ...

即缺省配置为 configurations 和 platforms 的首个选项。

生成的 Makefile 中会如下初始化 config:

ifndef config
  config=release_x64
endif

这样 make 就会缺省生成 release_x64。
posted on 2017-07-31 15:00 金庆 阅读(452) 评论(0)  编辑 收藏 引用 所属分类: 1. C/C++

只有注册用户登录后才能发表评论。
网站导航: 博客园   IT新闻   BlogJava   知识库   博问   管理