help with makefiles

This is a discussion on help with makefiles within the C Programming forums, part of the General Programming Boards category; i am trying to use a makefile this is the one i am using i need to add ~erbacher/crypt.o and ...

  1. #1
    Registered User
    Join Date
    Apr 2003
    Posts
    19

    help with makefiles

    i am trying to use a makefile

    this is the one i am using
    i need to add ~erbacher/crypt.o
    and i dont know how to do that
    it is a file our teacher put on the system becouse
    the one there doesnt work
    how do i add this to this makefile

    ive been using
    gcc main.c ~erbacher/crypt.o -lsocket -lnsl

    manualy and it works fine but i cant figure out
    how to put it into the makefile


    .SUFFIXES: .c .o
    CC = gcc
    CFLAGS = -g
    .c.o:
    $(CC) $(CFLAGS) -c $<
    all: co 402connect
    402connect: main.o
    gcc -lsocket -lnsl main.o -o 402connect
    clean:
    rm -f *.o core
    co:
    co main.c

    please help if u can
    metsman20

  2. #2
    Registered User
    Join Date
    Apr 2003
    Posts
    19
    thanks using home/folder/erbacher/crypt.o worked

    sorry about cross posting first time here
    didnt know i couldnt
    figured dif people read dif boards
    sorry thanks again
    metsman20

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Makefiles, GCC's -ggdb option, and Valgrind
    By Jesdisciple in forum C Programming
    Replies: 5
    Last Post: 03-14-2009, 05:25 PM
  2. Makefiles
    By TriKri in forum Windows Programming
    Replies: 3
    Last Post: 03-30-2008, 07:57 AM
  3. Benefits of makefiles
    By Ganoosh in forum C++ Programming
    Replies: 2
    Last Post: 06-27-2005, 10:42 PM
  4. programming linux with gcc, emacs, and makefiles
    By Captain Penguin in forum Linux Programming
    Replies: 1
    Last Post: 11-02-2002, 12:04 PM
  5. Help with Makefiles
    By WebmasterMattD in forum Linux Programming
    Replies: 3
    Last Post: 05-24-2002, 09:51 AM

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