diff --git a/Makefile b/Makefile --- a/Makefile +++ b/Makefile @@ -1,6 +1,9 @@ - CC = gcc -g -ggdb - CPP = g++ -g -ggdb + CC = gcc -g -ggdb $(PROF) + CPP = g++ -g -ggdb $(PROF) CFLAGS = -Wall -O2 -Iinclude -ansi +ifeq ("$(PROFILING)", "linux") + PROF = -fprofile-arcs -ftest-coverage -pg +endif TARGET = ncurses TARGET += numerierung @@ -211,15 +214,15 @@ lotto: lotto.o @echo Linking $< ... - @$(CPP) -o $@ $< + @$(CC) -o $@ $< mem2swap: mem2swap.o set_limit.o @echo Linking $< ... - @$(CPP) -o $@ mem2swap.o set_limit.o + @$(CC) -o $@ mem2swap.o set_limit.o prog_limit: prog_limit.o set_limit.o @echo Linking $< ... - @$(CPP) -o $@ prog_limit.o set_limit.o + @$(CC) -o $@ prog_limit.o set_limit.o database: database.c @echo Compiling $< ... @@ -229,11 +232,11 @@ gauss: gauss.o @echo Linking $< ... - @$(CPP) -o $@ $< + @$(CC) -o $@ $< connection: connection.o @echo Linking $< ... - @$(CPP) -o $@ $< + @$(CC) -o $@ $< copy: copy.o @echo Linking $< ... @@ -300,6 +303,10 @@ clean: find -name '*~' -exec rm -f {} \; find -name '*.[oa]' -exec rm -f {} \; + find -name '*.gcov' -exec rm -f {} \; + find -name '*.gcda' -exec rm -f {} \; + find -name '*.gcno' -exec rm -f {} \; + find -name 'gmon.out' -exec rm -f {} \; rm -f $(TARGET) beauty: