CXX = gcc TARGET = Exe SOURCEFILE = CellElemFunc CFLAGS = -Wall -Werror -ansi -pedantic -fpic -I. -g #Generating the executable $(TARGET): $(SOURCEFILE).o @echo "Generating the executable" $@ $(CXX) $(CFLAGS) $(SOURCEFILE).o -o $@ $(SOURCEFILE).o: @echo "Generating objectfiles" $@ $(CXX) $(CFLAGS) -c $(SOURCEFILE).c -o $@ #Cleaning the executable clean: @echo "Cleaning temporary files" rm -rf *.o *- *.so $(TARGET)