Earlier quoted context omitted.
Would be nice if you could give an example, not just "use that".
Especially since scons and cmake are in no way easy to learn, imho.
A Simple Makefile for Medium-Sized C/C++ Projects
11–20 of 120 posts
Re: A Simple Makefile for Medium-Sized C/C++ Projects
#12Re: A Simple Makefile for Medium-Sized C/C++ Projects
#13Earlier quoted context omitted.
Would be nice if you could give an example, not just "use that".
Especially since scons and cmake are in no way easy to learn, imho.
I mean, a "hello world" CMakeLists.txt can be literally just this:
add_executable(hello hello.c)
And it's cross-platform, can generate Visual Studio/Xcode/... projects, etc.Re: A Simple Makefile for Medium-Sized C/C++ Projects
#14Re: A Simple Makefile for Medium-Sized C/C++ Projects
#15I do like simple makefiles. I adopted a C++-project without having much C++-knowledge, and simplifying the build setup was a big step in making it mine. Thinking that it might be nice, I tried this one instead of my own approach at a simple makefile ( https://github.com/onli/simdock/blob/master/Makefile ) and I get this error: > Makefile:16: * missing separator. Stop. Which raises kind of an important point: Simple m…
Re: A Simple Makefile for Medium-Sized C/C++ Projects
#16Re: A Simple Makefile for Medium-Sized C/C++ Projects
#17I do like simple makefiles. I adopted a C++-project without having much C++-knowledge, and simplifying the build setup was a big step in making it mine. Thinking that it might be nice, I tried this one instead of my own approach at a simple makefile ( https://github.com/onli/simdock/blob/master/Makefile ) and I get this error: > Makefile:16: * missing separator. Stop. Which raises kind of an important point: Simple m…
Which proves the point: Makefiles are at a point in life where they should be exclusively automatically generated.
The only exception are throwaway projects where you and only you use it.
Re: A Simple Makefile for Medium-Sized C/C++ Projects
#18I do like simple makefiles. I adopted a C++-project without having much C++-knowledge, and simplifying the build setup was a big step in making it mine. Thinking that it might be nice, I tried this one instead of my own approach at a simple makefile ( https://github.com/onli/simdock/blob/master/Makefile ) and I get this error: > Makefile:16: * missing separator. Stop. Which raises kind of an important point: Simple m…
Re: A Simple Makefile for Medium-Sized C/C++ Projects
#19Just use cmake or scons. In 2016, you should not hand write a single makefile ! A simple cmake/sconcs build file will be as simple as the one shown (or even simpler !) and it will definitively will be easier to integrate external dependencies if you have to.
Would be nice if you could give an example, not just "use that".
Re: A Simple Makefile for Medium-Sized C/C++ Projects
#20Just use cmake or scons. In 2016, you should not hand write a single makefile ! A simple cmake/sconcs build file will be as simple as the one shown (or even simpler !) and it will definitively will be easier to integrate external dependencies if you have to.
Would be nice if you could give an example, not just "use that".
demo.cxx demo_b.cxx CMakeLists.txt
$ cat src/CMakeLists.txt
cmake_minimum_required (VERSION 2.8.11)
project (HELLO)
add_executable (helloDemo demo.cxx demo_b.cxx)
$ mkdir bin
$ cd bin
$ cmake ../src
SNIP
$ make
$ ./helloDemo