为32位和64位构建生成文件

时间:2010-11-09 16:40:21

标签: makefile

我需要创建一个make文件,允许用户选择创建64位或32位版本。我是新手,我不确定最好的方法是什么。有没有人有任何建议?

由于

2 个答案:

答案 0 :(得分:2)

看看this article。它的长短是每个架构都有单独的输出目录,并显示如何从每个架构中找到源。

答案 1 :(得分:0)

假设您使用的是Linux / UNIX。

LBITS := $(shell getconf LONG_BIT)
ifeq ($(LBITS),64)
   # do 64 bit some stuff
else
   # do 32 bit stuff here
endif

相关问题