make[1]: Entering directory error message
make -s suppresses other makefile messages also which might be important for developers. If you want to suppress “Entering/Leaving directory messages” only run make with make –no-print-directory
make -s suppresses other makefile messages also which might be important for developers. If you want to suppress “Entering/Leaving directory messages” only run make with make –no-print-directory
As I myself am very curious about answers to your first question unfortunately I am not able to give you any good advice here. To at least give you an answer to your second question: This is the somewhat semi-automatic way I use to manually add missing or adjust changed declarations in out of sync … Read more
According to this bugreport, install(TARGETS) command flow accepts only targets created within the same directory. So you need either move the add_library() call into the top-level directory, or split install(TARGETS) call into per-target ones, and move each of them into the corresponding subdirectory. Since CMake 3.13 install(TARGETS) can work even with targets created in other … Read more
You can have the all target do nothing if a variable is not set: ifeq ($(SOME_VAR),) $(info SOME_VAR not set!) all: else all: target1 target2 targetetc endif
A simple make will build the first target in the list, which is put-files. make all will build the target all. If you want all to be the default, then move it to the top of the list. To understand what the .PHONY does, see http://www.gnu.org/s/hello/manual/make/Phony-Targets.html
Rather than a phony target (which as @cmotley points out, is working exactly as it should) what you might use when you want to avoid extra work is an “empty target”: The empty target is a variant of the phony target; it is used to hold recipes for an action that you request explicitly from … Read more
Posting for future reference, a solution I found was to install g++-multilib. I had the same incompatible problem relating to -lstdc++ on g++ version 4.6.1 On further probing: g++-multilib is a dummy package which installed g++4.6-multilib which in turn installed the appropriate libstdc++.so under the /usr/lib/gcc/x86_64-linux-gnu/4.6/32 folder.
Use make -d or make –debug[=flags] options: ‘-d’ Print debugging information in addition to normal processing. The debugging information says which files are being considered for remaking, which file-times are being compared and with what results, which files actually need to be remade, which implicit rules are considered and which are applied—everything interesting about how … Read more
This is compiler specific. GCC uses -Dcpp_variable=VALUE or just -Dcpp_variable Microsoft’s compilers use /D
Check out the override directive. You will probably need to modify the makefile once, but it should do what you want. Example makefile: override CFLAGS += -Wall app: main.c gcc $(CFLAGS) -o app main.c Example command lines: $ make gcc -Wall -o app main.c $ make CFLAGS=-g gcc -g -Wall -o app main.c