Passing parameter to makefile?

Hi,

How to pass parameter to makefile?
Please let me know if any one knows and also please put an example of makefile with this feature.

thanks,
Manju.

Does this help?

http://www.gnu.org/software/make/manual/make.html\#Overriding

I am picking up the makefile from Java/C/C++/Fortran Makefile

There is a variable IS_UNIX inside that makefile which differentiates the separators between unix and non-unix platforms.

  ifdef IS_UNIX
    X = :
  else
    X = \;
  endif

To run make on unix platforms you would have to pass the parameter IS_UNIX as

make IS_UNIX=1

Infact, the value need not be 1, but some value. The value depends on if you plan to use the value within the makefile.

Thanks guys for all your replies.
I got the solution.

We can pass parameter to makefile by specifying them along with there values in command line.

ex: make PARA1=1 PARA2=ABC.c

This will call makefile with 2 parameters, PARA1 is assigned value "1" and PARA2 is assigned value "ABC.c".
The same name need to be used in makefile to access these varibales ( using $(VAR_NAME) syntax)