Make
It's fame: it is included in Unix since 1977
Its input: it reads a script called "Makefile"
Its operation: it is intimately bound to the execution environment shell
Its support: environment dependency checkers, IDEs, makefile generators
Its handy feature: defaults exist in the absence of a target or the whole makefile
Its limit: makefile portability and language syntax
Make is to C what Ant to Java (update: Maven or Gradle)
# this is a simple makefile
CC=gcc
CFLAGS=-g -O3 #-v
OBJS=hello.o
EXE=hello
all: $(EXE)
$(EXE): $(OBJS)
$(CC) $(CFLAGS) -o $@ $(OBJS)
clean:
rm -rf $(OBJS) $(EXE)
.SUFFIXES: .c .o
%.0: %.c
$(CC) -c $(CFLAGS( $<
Simplest form:
Searches for files 'makefile', then 'Makefile' in the current directory
Executes the first target declared in the makefile
Specify the makefile:
Pointing the targets to be executed in order:
Give environment variables precedence:
Ignore all errors in command execution:
Silent mode - do not output te command lines :