|
From: | John Graham-Cumming |
Subject: | Re: need help with the Makefile |
Date: | Thu, 08 Sep 2005 20:51:27 +0200 |
User-agent: | Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.6) Gecko/20040208 Thunderbird/0.5 Mnenhy/0.6.0.104 |
address@hidden wrote:
Did anybody got the chance to take a look at following request ?
Not so far. I'll try to answer your questions but they are a little hard to understand.
1. in common.mk, how do I set variables for different platforms and different OS versions(for the same platform)
You should do something to determine what platform you are on and then use a conditional such as ifeq to decide which variables to set. You might like to take a look at the article I wrote for DDJ on Cross Plaforms Builds (a copy of it can be found on this page: http://www.electric-cloud.com/resources/)
2. is there any way to set target specific variables(CFLAGS/LDFLAGS/INCLUDE) instead of passing them at the command line to $(MAKE). As CFLAGS list is long.
I think we'll be able to answer this if you define what you mean by a target. If you mean target in the GNU Make sense (e.g. name of file to the left of :) then the answer is yes. So have FOO have value bar for the target targ you would write:
targ: FOO=bar John.
[Prev in Thread] | Current Thread | [Next in Thread] |