help with makefile

This is a discussion on help with makefile within the C Programming forums, part of the General Programming Boards category; Here is my makefile: i2p: lexer.o parser.o emitter.o symbol.o init.o error.o main.o gcc -o convert lexer.o parser.o emitter.o symbol.o init.o ...

  1. #1
    Registered User
    Join Date
    Sep 2003
    Posts
    15

    help with makefile

    Here is my makefile:

    i2p: lexer.o parser.o emitter.o symbol.o init.o error.o main.o
    gcc -o convert lexer.o parser.o emitter.o symbol.o init.o

    lexer.o: lexer.c global.h
    gcc -c lexer.c

    parser.o: parser.c global.h
    gcc -c parser.c

    emitter.o: emitter.c global.h
    gcc -c emitter.c

    symbol.o: symbol.c global.h
    gcc -c symbol.c

    init.o: init.c global.h
    gcc -c init.c

    After I do $make i2p, how do I run the executable..I dont see any executable files being created...

  2. #2
    ATH0 quzah's Avatar
    Join Date
    Oct 2001
    Posts
    14,826
    gcc -o convert lexer.o parser.o emitter.o symbol.o init.o
    It's in there. I'll assume you're on a *nix system. Try:

    ./convert

    Quzah.
    Hope is the first step on the road to disappointment.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Makefile Problem: None rule to make target
    By chris24300 in forum Linux Programming
    Replies: 25
    Last Post: 06-17-2009, 10:45 AM
  2. Building a project using a Makefile
    By starcatcher in forum Windows Programming
    Replies: 2
    Last Post: 11-23-2008, 11:50 PM
  3. unix makefile won't work but works in Dev C++
    By jk1998 in forum C++ Programming
    Replies: 1
    Last Post: 06-09-2007, 04:54 PM
  4. makefile blues....
    By WaterNut in forum C Programming
    Replies: 6
    Last Post: 05-30-2005, 09:22 PM
  5. Need help with Makefile
    By xshapirox in forum C++ Programming
    Replies: 14
    Last Post: 09-28-2004, 04:32 PM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21