Find the answer to your Linux question:
Results 1 to 2 of 2
Hi, I had a make file, something like that, all: cd dir1; make cd dir2; make the problem is the makefile under dir2 need some objs from dir1, so I ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    Apr 2011
    Posts
    4

    makefile -j problem


    Hi,



    I had a make file, something like that,



    all:

    cd dir1; make

    cd dir2; make



    the problem is the makefile under dir2 need some objs from dir1, so I need to set some dependency let dir2 run only after the dir1 run is done.



    how to set the dependency?



    Thanks.



    peter

  2. #2
    Just Joined!
    Join Date
    Sep 2010
    Location
    Montgomery, AL
    Posts
    27
    I believe you will have to write some subdir.mk files and then include them in your makefile like so.

    Code:
    -include sources.mk
    -include subdir.mk
    -include anyDirectory/subdir.mk
    -include objects.mk

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •