CFLAGS = -Wall -std=c99 -O
LDLIBS = -lm

CC = gcc
#ifeq ($(CC),clang)                        # Don't copy this,
#COMPILE.c = $(CC) $(CFLAGS) -c 2>$<.Wall  # it's only to collect
#endif                                     # clang warnings into a file.

.PHONEY:all
all              : out.txt          ; cat $<           # "$<" is the first prerequisite
out.txt          : main             ; ./$< > $@        # "$@" is the target
main             : main.o komplex.o # built-in linking rule is used here         
main.o komplex.o : komplex.h        # built-in compilation rule is used here

.PHONEY:clean
clean            :                  ; $(RM) main out* *.o *~

STYLE = --linux-style
.PHONEY:indent
indent           :                  ; indent $(STYLE) main.c komplex.c; rm -f *.c~
