diff options
| author | Benedict <benedict@0xb8000.de> | 2016-08-04 21:08:41 +0200 |
|---|---|---|
| committer | Benedict <benedict@0xb8000.de> | 2017-02-21 13:00:25 +0100 |
| commit | 7060b54d2385018fc5f7c081dfd0630db3b402e2 (patch) | |
| tree | c2450217294a2cad61e475f71eeac11fa4387210 /set2/Makefile | |
| parent | 4e0e29f48f797206a21aa5ba7855ffde72e85cf9 (diff) | |
updated Makefile structure
Copy Makefile just in all setX directories and it should all work fine. Get
rid of the nasty "adding each target seperatly".
Diffstat (limited to 'set2/Makefile')
| -rw-r--r-- | set2/Makefile | 26 |
1 files changed, 6 insertions, 20 deletions
diff --git a/set2/Makefile b/set2/Makefile index 914471a..8b0ffbd 100644 --- a/set2/Makefile +++ b/set2/Makefile @@ -1,23 +1,9 @@ -LIB=../lib/lib2.c ../lib/lib.c -CC=gcc -CFLAGS := -g $(CFLAGS) -CLIBS=`pkg-config --cflags --libs libcrypto` +include ../.Makefile.common +COBJS=$(shell find . -type f -name "task*.c" | sed "s/\(.*\)\.c/\1.o/g") +TARGETS=$(shell find . -type f -name "task*.c" | sed "s/\(.*\)\.c/\1/g") -all: task9 task10 task11 task12 task13 task15 task16 +all: $(TARGETS) -task9: - $(CC) $(CFLAGS) task9.c $(LIB) $(CLIBS) -o task9 -task10: - $(CC) $(CFLAGS) task10.c $(LIB) $(CLIBS) -o task10 -task11: - $(CC) $(CFLAGS) task11.c $(LIB) $(CLIBS) -o task11 -task12: - $(CC) $(CFLAGS) task12.c $(LIB) $(CLIBS) -o task12 -task13: - $(CC) $(CFLAGS) task13.c $(LIB) $(CLIBS) -o task13 -task15: - $(CC) $(CFLAGS) task15.c $(LIB) $(CLIBS) -o task15 -task16: - $(CC) $(CFLAGS) task16.c $(LIB) $(CLIBS) -o task16 clean: - rm task9 task10 task11 task12 task13 task15 task16 + @echo -e "\tDEL\t$(TARGETS)" + @rm $(TARGETS) |
