create a symbolic link in a MakeFile

This is a discussion on create a symbolic link in a MakeFile within the Tech Board forums, part of the Community Boards category; Hi, I have a question regarding MakeFile Let us say I have two directories: first directory: /a/src/dbt/sch second directory: /a/src/mdls/fcl/mst/ ...

  1. #1
    Registered User
    Join Date
    Apr 2011
    Posts
    42

    create a symbolic link in a MakeFile

    Hi,

    I have a question regarding MakeFile

    Let us say I have two directories:

    first directory: /a/src/dbt/sch

    second directory: /a/src/mdls/fcl/mst/

    Now, the main program is present in "first directory". But, it needs definitions from a file, call it "test.c" that is present in "second directory".

    How can I create a symbolic link to "test.c" in a MakeFile in first directory, so that I do not receive compilation errors.

    It might be a simple question, but this is rather new for me.

    Any input, is welcome.

    Thanks,

  2. #2
    and the Hat of Guessing tabstop's Avatar
    Join Date
    Nov 2007
    Posts
    14,185
    I'm not sure why you are reaching straight for "making symbolic links" when "specifying the proper directory" seems like a lot simpler way to go.

    Given that your other file is "test.c", I assume this means that you're not trying to do #include, but rather need to compile and link the other file in to your executable. In that case just specify ../../mdls/fcl/mst/test.c as a prerequisite.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. automake does not create Makefile.in
    By useless79 in forum Tech Board
    Replies: 0
    Last Post: 02-20-2011, 03:05 AM
  2. Distinguish symbolic link from file (stat function)
    By mario++ in forum C Programming
    Replies: 10
    Last Post: 05-07-2010, 04:26 PM
  3. Create Link List for object
    By winsonlee in forum C++ Programming
    Replies: 6
    Last Post: 08-05-2004, 01:57 PM
  4. create dir in makefile
    By rotis23 in forum Linux Programming
    Replies: 5
    Last Post: 11-15-2002, 03:10 AM
  5. using MAKE with makefile to create executable file
    By sballew in forum C Programming
    Replies: 1
    Last Post: 11-19-2001, 11:49 AM

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