I need to create a make file which will allow the user to cho开发者_如何学Goose to create either a 64 or 32 bit build. I'm new to make and am not sure what the best way to do this would be. Does anyone have any suggestions?
Thanks
Have a look at this article. The long and short of it is to have separate output directories for each architecture, and show make how to find the source from each of them.
This answer is assumed that you using either Linux/UNIX.
LBITS := $(shell getconf LONG_BIT)
ifeq ($(LBITS),64)
# do 64 bit some stuff
else
# do 32 bit stuff here
endif
.
精彩评论