what is the distinguish between gmake and make?


 
Thread Tools Search this Thread
Top Forums Programming what is the distinguish between gmake and make?
# 8  
Old 07-21-2006
we use gmake to compile&linke c/c++ program

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 $@
# 9  
Old 07-21-2006
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.
# 10  
Old 07-21-2006
yes,

CC is the c compiler
CXX is c++ compiler
# 11  
Old 10-10-2008
gmake has some extended features like macro identification.. for instance the following macro ".cpp.o" can be understood by gmake but make doesnt..
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Solaris

Make and gmake issues

Hello I am working on a CPP code written for SUN CC 5.5 and make we used make to compile the code then it compilation went smooth now i am using gmake: I have a make file like this WSROOT=.. include $(WSROOT)/etc/wsmkinclude.common all: @for subdir in */Makefile; \ do \... (1 Reply)
Discussion started by: Revathi R
1 Replies

2. Programming

Make and gmake issues

Hello I am working on a CPP code written for SUN CC 5.5 and make we used make to compile the code then it compilation went smooth now i am using gmake: I have a make file like this WSROOT=.. include $(WSROOT)/etc/wsmkinclude.common all: @for subdir in */Makefile; \ do \... (1 Reply)
Discussion started by: Revathi R
1 Replies

3. SCO

Distinguish between file systems

Hello, is there any command in SCO unix by which I can check if the file system is HTFS or DTFS? Thanks (1 Reply)
Discussion started by: Mick
1 Replies

4. UNIX for Advanced & Expert Users

How to uniquely distinguish between two USB ports??

Hi all, I am facing a problem while writing a shell script. My machine has two USB ports- left port and right port. whenever I connect USBS to both the ports, entry is generated as /sys/block/sdc and /sys/block/sdd and I mount the USBs to a particular directory. But I need to know... (3 Replies)
Discussion started by: Pkumar Sachin
3 Replies

5. UNIX for Advanced & Expert Users

how to distinguish entry/exit of a syscall when using ptrace?

Hi all, I am using ptrace to keep track of clone syscalls in a program. However, I found that the traced syscall cant be paired. for example, there are some syscalls that have entry, but without exit showing up in the traced sequences. So, is there anyway to distinguish the entry and exit of a... (0 Replies)
Discussion started by: tristartom
0 Replies

6. HP-UX

how to distinguish dvd rom or hard disk

Class I H/W Path Driver S/W State H/W Type Description ============================================================================ disk 0 0/0/2/0.0.0.0 sdisk CLAIMED DEVICE EAC DVD-ROM DW-224EV /dev/dsk/c0t0d0 ... (1 Reply)
Discussion started by: alert0919
1 Replies

7. UNIX for Advanced & Expert Users

build - make -gmake: execvp: mcu: Permission denied

Hi All, sorry it was application related.. i am deleting it Thanks & Regards Shihab (0 Replies)
Discussion started by: shihabvk
0 Replies

8. HP-UX

Perl, gmake and make software

Hi, I'm searching website where there is software for HP-UX operating system in free download because I must install Perl, Make and Gmake on HP-UX server. Have you goods URL for me ? Thank you very much! bye Staaan (2 Replies)
Discussion started by: staaan
2 Replies

9. HP-UX

how to distinguish different files while ftp?

how to distinguish different files and choose a mode while ftp?means which modes ascii or binary for zip(.gz) ,.txt,.sh,.dat and executable as well as movie files. (1 Reply)
Discussion started by: megh
1 Replies

10. AIX

distinguish the extension of a file

Hello, In a script shell, I have a variable containing the name of a file and I would like to distinguish the name from the extention of the file. For example, the file 'myfile.txt' is in a variable called $VAR. How can I obtain 2 variables, one with 'myfile' and the other with 'txt' ? Thank you (2 Replies)
Discussion started by: tbeghain
2 Replies
Login or Register to Ask a Question