A
A
Anton Kashcheev2014-09-09 15:04:06
GNU Make
Anton Kashcheev, 2014-09-09 15:04:06

How to build a project with more than one makefile, each in its own folder?

Let's say we have a project.
Each logical part is divided into folders. Each folder has its own makefile, including the root one.
For example:

Project/
         Test/
              Makefile_test
              <...files...>
         Test2/
               Makefile_test2
               <...files...>
         Makefile_prj

How to launch from the side? What do you need to add to the "root" Makefile for this?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Anton Kashcheev, 2014-09-09
@kachsheev

Ha, he asked, he answered.
Makefile_prj:

all:
        make make_test
        make make_test2

make_test:
        make -C Test/ -f Makefile_test

make_test2:
        make -C Test2/ -f Makefile_test2

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question