Go Back   TechArena Community > Software > Software Development
Become a Member!
Forgot your username/password?
Tags Active Topics RSS Search Mark Forums Read

Reply
 
Thread Tools Search this Thread
  #1  
Old 17-04-2009
Member
 
Join Date: Oct 2008
Posts: 47
Execution of a makefile in C

I have a TP of C to go to college, I made my little makefile and everything but I do not know how to run an automatic execution just after the compilation, from the makefile (not found on the web).

In fact what I'd like is that when the teacher looks at the tp that I sent him, that he did do "make" to compile, and one or two executions of the program will launch by their own.

What should I put in the makefile?
Reply With Quote
  #2  
Old 17-04-2009
Member
 
Join Date: May 2008
Posts: 2,008
Re: Execution of a makefile in C

The best solution would probably make a batch file that would run the makefile in the program first and then the program.
Reply With Quote
  #3  
Old 17-04-2009
Member
 
Join Date: Oct 2008
Posts: 47
Re: Execution of a makefile in C

The trick is that the teacher asked us to put everything in the makefile (well if I remember correctly ...). But what a batch file?
Reply With Quote
  #4  
Old 17-04-2009
Member
 
Join Date: May 2008
Posts: 2,008
Re: Execution of a makefile in C

Here is a link detailing how to create a Makefile:

http://www.hsrl.rutgers.edu/ug/make_help.html

Once the Makefile created, you simply type make

Than you create an executable that you will use by doing:. / Nom_executable (nom_executable is the name you will assign)
Reply With Quote
  #5  
Old 17-04-2009
Member
 
Join Date: Oct 2008
Posts: 47
Re: Execution of a makefile in C

Thank you, but I know this site and I know how to create a makefile to compile with. I may be wrong the way I asked my question. What I want: my makefile compile and run the program.

So when the teacher corrects my tp, he will "make", compile and execute the program automatically.

ie no need to do. /executable

I know this is possible because the teacher shows us examples of ongoing and it is said and c is what we demand for the tp, but I do not know how to get this result.
Reply With Quote
Reply

  TechArena Community > Software > Software Development
Tags: , , ,



Thread Tools Search this Thread
Search this Thread:

Advanced Search


Similar Threads for: "Execution of a makefile in C"
Thread Thread Starter Forum Replies Last Post
WMI execution is different in windows 7 $Lola$ Operating Systems 4 22-02-2011 08:42 PM
Linux Makefile Xiomar Operating Systems 2 29-12-2010 07:33 AM
Makefile to separate files in C Lauren Ambrose Software Development 4 05-04-2010 12:11 PM
How to Build with Makefile in gfortran? Remedy Software Development 5 13-01-2010 12:30 PM
Command line tool to convert VC project files to Makefile Harman Software Development 3 25-10-2008 05:19 PM


All times are GMT +5.5. The time now is 05:16 AM.