# Generic statements for most program makefiles. # Last edited on 2016-12-26 16:40:29 by stolfilocal ###################################################################### # Usually included by "GENERIC-*.make" files # The caller must define # # ${ACTIONS} a list of make actions to be performed in turn # SHELL := /bin/bash #--------------------------------------------------------------------- # Phony "make" targets: .PHONY:: \ default-action \ all actions debug \ depend \ build \ depend-lib depend-libs build-lib build-libs do-build-lib \ depend-prog depend-progs build-prog build-progs do-build-progs \ depend-tests build-tests do-build-tests check \ find-all-sources \ clean clean-lib clean-libs clean-prog clean-progs clean-tests # ---------------------------------------------------------------------- # This will usually be the first action encountered by "make". # Defined so that "make" with no action does "make all" which must be defined by user: default-action: all # ---------------------------------------------------------------------- # "make find-all-sources" creates lists of source files, makefiles, # C files, etc. the current directory: find-all-sources: make-sources-cprogs-makefiles-lists -notheses # ---------------------------------------------------------------------- # "make find-all-files" creates a list of all files with size and mod-date: find-all-files: find-all-files-size-date ./ > .all-files.sdf # ---------------------------------------------------------------------- # Common C compiler flags for all libraries and programs: CC := /usr/bin/gcc C_FLAGS := \ -Wall -Wundef \ -Wpointer-arith \ -Wmissing-prototypes \ -Wstrict-prototypes \ -Wconversion \ -Wno-sign-conversion \ -Wclobbered \ -Wcast-align \ -Wtype-limits \ -Wmissing-field-initializers \ -ggdb \ -fpcc-struct-return \ -ffloat-store \ -frounding-math \ -std=c99 LD_FLAGS := \ -ggdb