Should I name “makefile” or “Makefile”?

What Name to Give Your Makefile chapter of GNU Make manual clarifies it: By default, when make looks for the makefile, it tries the following names, in order: GNUmakefile, makefile and Makefile. Normally you should call your makefile either makefile or Makefile. (We recommend Makefile because it appears prominently near the beginning of a directory … Read more

why “make” before “make install”

When you run make, you’re instructing it to essentially follow a set of build steps for a particular target. When make is called with no parameters, it runs the first target, which usually simply compiles the project. make install maps to the install target, which usually does nothing more than copy binaries into their destinations. … Read more

Functions in Makefile

There are 3 related concepts: call function multi-line variables conditionals The refactored result could look like this: ifeq ($(UNAME),Linux) compile = $(MAKE) FC=$(1) FFLAGS=$(2) PETSC_FFLAGS=$(3) \ TARGET=$@ LEXT=”$(1)_$(UNAME)” -e syst else define compile = echo $(err_arch) exit 1 endef endif debug_ifort: $(call compile,ifort,$(difort),”…”) That one \ that is left is to continue the $(MAKE) line … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)