#
# Makefile
#
# Autor: H.Drachenfels
# Erstellt am: 18.1.2018
#

#-------------------------------------------------------- Kommando-Variablen
CC = gcc
CFLAGS = -W -Wall -std=c11 -pedantic
CPPFLAGS =
RM = rm -f

#------------------------------------------------------------ Hilfsvariablen
TARGET = grusstest
OBJECTS = gruss.o systemuhr.o testuhr.o uhr_impl.o
HEADERS = $(OBJECTS:.o=.h)

#------------------------------------------------------------- Standardziele
all: $(TARGET)

clean:
	$(RM) $(TARGET) $(TARGET).o $(OBJECTS)

#---------------------------------------------- Ziele zur Programmerstellung
$(TARGET): $(TARGET).o $(OBJECTS)
	$(CC) $(CFLAGS) $(CPPFLAGS) $^ -o $@

#----------------------------------------------------------- Abhaengigkeiten
grusstest.o: grusstest.c gruss.h systemuhr.h testuhr.h uhr.h
gruss.o: gruss.c gruss.h uhr.h
systemuhr.o: systemuhr.c systemuhr.h uhr.h uhr_impl.h
testuhr.o: testuhr.c testuhr.h uhr.h uhr_impl.h
uhr_impl.o: uhr_impl.c uhr_impl.h uhr.h

