Results 1 to 5 of 5

Thread: Execution of a makefile in C

  1. #1
    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?

  2. #2
    Join Date
    May 2008
    Posts
    2,012

    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.

  3. #3
    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?

  4. #4
    Join Date
    May 2008
    Posts
    2,012

    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)

  5. #5
    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.

Similar Threads

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

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Page generated in 1,750,871,008.77343 seconds with 16 queries