Thread: Makefile and Source Code

  1. #1
    Registered User
    Join Date
    Mar 2016
    Posts
    1

    Makefile and Source Code

    Hi,

    i have created a C++ project with 3 .cpp files (a main + 2 classes) and 2 .h files.
    I am required now to send a makefile that builds the application and the source code to my professor for review.
    The think is that i do not know what to send, especially for the make file.
    I am using Fedora 23 and Eclipse Mars.
    In the project there are 2 folders, a Debug and a src. In the Debug there is a makefile which i guess was auto-generated, some other files, a src folder and a file that as it says is exceccutable.
    Any idea of what do i have to sent so that my professor can build and run my project with a makefile?

    Thank you

  2. #2
    and the hat of int overfl Salem's Avatar
    Join Date
    Aug 2001
    Location
    The edge of the known universe
    Posts
    39,659
    The makefile that was generated would be a starting point.

    You might need to edit it to take into account that you have
    src/*.cpp
    src/*.h
    Debug/Makefile

    So that there is also a compatible makefile in your source directory as well.

    You test it by opening a console window, changing directory to src, and typing 'make'
    If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
    If at first you don't succeed, try writing your phone number on the exam paper.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. how to build C Source code with Makefile
    By arion programer in forum C Programming
    Replies: 5
    Last Post: 08-24-2015, 08:55 AM
  2. Replies: 1
    Last Post: 02-17-2015, 11:06 AM
  3. is object code the same as assembly source code?
    By c_weed in forum Tech Board
    Replies: 3
    Last Post: 01-05-2012, 07:25 PM
  4. Makefile errors from c code
    By jl1 in forum C Programming
    Replies: 2
    Last Post: 06-18-2010, 10:21 AM
  5. Linux G++ Makefile (Or C++ Code)
    By NOX in forum C++ Programming
    Replies: 7
    Last Post: 10-05-2009, 11:34 AM

Tags for this Thread