what is the distinguish between gmake and make?

I am working on solaris 9. and use gmake to compile and linke c/c++ program.
anybody can tell me the distinguish between gmake and make? :confused:

different software licenses, and gmake has a few extended features.

On linux gmake and make often are the same:

$ gmake --version
GNU Make 3.80
Copyright (C) 2002 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.
There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A
PARTICULAR PURPOSE.
$ make --version
GNU Make 3.80
Copyright (C) 2002 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.
There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A
PARTICULAR PURPOSE.

shenzhen{bzhu}$ gmake -version
GNU Make version 3.71, by Richard Stallman and Roland McGrath.
Copyright (C) 1988, 89, 90, 91, 92, 93, 94 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.
There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A
PARTICULAR PURPOSE.

shenzhen{bzhu}$ make -version
GNU Make 3.80
Copyright (C) 2002 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.
There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A
PARTICULAR PURPOSE.

But when compile program, they maybe have no difference. right?

It's strange that you have 2 different versions of one product from one vendor. It's a problem that is waiting to happen

There shouldn't be too many differences in the output of the different versions. But you might want to clean that up so that you have a single version on your system. Use 'pkginfo | grep -i make' to get the names of both the packages, and then pkgrm the version that is not required.

Solaris always includes the Sun (CCS) make, it is used among other things to build NIS maps. Howerver it does not include c or c++ compilers.

gcc and g++ or rather makefiles designed to work with them tend to work a lot better with gmake than solaris make, so most people who use gcc also install some or all of the other components of the gnu build chain.

So, gmake or make are tools to interpret makefile. The real c/c++ compilor is specified in makefile. for example: in my project makefile, there are such lines:
$(TAG)/%.o: %.c
$(CC) $(CFLAGS) $(DEBUG) -c $< -o $@

$(TAG)/%.o: %.C
$(CXX) $(CXXFLAGS) $(DEBUG) -c $< -o $@

$(TAG)/%.o: %.cpp
$(CXX) $(CXXFLAGS) $(DEBUG) -c $< -o $@

Please put code in code tags, leaving it outside destroys the formatting.

I'm sorry, I didn't realize you wanted a explanation of makefiles rather than what you asked for, the differences between two implimentations of make.

Those are suffix rules, describing how to make .o files from .c files.

$(CC) is a variable. You can change it to tell it to use different compilers.

yes,

CC is the c compiler
CXX is c++ compiler

gmake has some extended features like macro identification.. for instance the following macro ".cpp.o" can be understood by gmake but make doesnt..