Thread: Makefile for a single file

  1. #1
    Registered User
    Join Date
    Feb 2013
    Posts
    58

    Question Makefile for a single file

    Hi,

    I'm trying to create a Makefile for a single fie ( mycod.c)
    Could you please help me with the syntax?

    thanks

  2. #2
    Registered User
    Join Date
    Aug 2005
    Location
    Austria
    Posts
    1,990
    Code:
    mycod: mycod.c
            gcc -o mycod mycod.c
    Kurt

  3. #3
    Registered User
    Join Date
    Mar 2011
    Posts
    546
    be sure to use a tab for indentation, not spaces

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Building a class in a single file
    By Amoxaphobic in forum C++ Programming
    Replies: 5
    Last Post: 11-10-2011, 02:34 PM
  2. How to Modify Makefile to Build a Map File
    By wkhan69 in forum C Programming
    Replies: 1
    Last Post: 11-09-2011, 07:04 PM
  3. Compiling and running a single file
    By harrymason_100 in forum C++ Programming
    Replies: 4
    Last Post: 02-05-2006, 06:54 PM
  4. Storing resources into a single file
    By LuckY in forum Game Programming
    Replies: 20
    Last Post: 08-14-2004, 11:28 PM
  5. Single EXE file with BGI's
    By Unregistered in forum A Brief History of Cprogramming.com
    Replies: 1
    Last Post: 03-12-2002, 02:45 AM