darenn
darenn

Reputation: 479

Makefile output folder

I have a makefile and all I want to do is to make my executable go to the folder created in the one I have all the files in. So let's say I have a folder in which there are some .cpp files, I create a folder in this folder called OUTPUT (during compilation) and I want my exec made out of those cpp files to go into this folder. How do i do that?
Thanks in advance!

Upvotes: 0

Views: 1027

Answers (1)

Beta
Beta

Reputation: 99172

OUTPUT/exec: foo.cpp bar.cpp baz.cpp
    g++ $^ -o $@

Refinements are possible, but this will get you started.

Upvotes: 1

Related Questions