Difference between make and gmake?
Hi!
I've been writing a small program for a school project using g++, I ran into some difficulties when I tried to configure a simple make file. For some reason, the compiler couldn't link the files properly when I used the make command with g++. I tried the same thing on the solaris machines in school but changed compiler to CC (Solaris compiler), and then everything worked just fine. It also worked fine when I used the gmake command with the g++ compiler. Is there some syntax you could use that would make everything build fine using the regular make command? I don't want to have to force people to use gmake for a regular small program. This is a great forum by the way, I've been looking for a place like this ever since I installed linux two weeks ago. Hope the machine issues get resolved:) |
You should use gmake if you have a makefile that is specific to the GNU version of make, and will not be understood by other versions of make.
Basically, I don't think it has options that you want, and if it requires gmake, then your going to need gmake to compile. |
Last time I checked the two were the same on Linux:
Code:
# ls -l /usr/bin/make |
Thanks guys!
I don't really know what happened. I had such strange errors with my makefile, I saw that the gmake and make command was the same on my system as well. The problem must have had to do with the linker working differently on Solaris CC than it does on g++. Now it works as it should on both systems.
Thanks for your answers:) |
You should post the specific error you got when you tried to build with the makefile.
If the makefile is small enough, you should post that as well. That is, if you are still having that problem. |
All times are GMT -5. The time now is 01:49 PM. |