summaryrefslogtreecommitdiff
path: root/set3/Makefile
diff options
context:
space:
mode:
authorBenedict <benedict@0xb8000.de>2016-08-04 21:08:41 +0200
committerBenedict <benedict@0xb8000.de>2017-02-21 13:00:25 +0100
commit7060b54d2385018fc5f7c081dfd0630db3b402e2 (patch)
treec2450217294a2cad61e475f71eeac11fa4387210 /set3/Makefile
parent4e0e29f48f797206a21aa5ba7855ffde72e85cf9 (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 'set3/Makefile')
-rw-r--r--set3/Makefile21
1 files changed, 6 insertions, 15 deletions
diff --git a/set3/Makefile b/set3/Makefile
index a6ed5fc..8b0ffbd 100644
--- a/set3/Makefile
+++ b/set3/Makefile
@@ -1,18 +1,9 @@
-LIB=../lib/lib2.c ../lib/lib.c ../lib/lib3.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: task17 task18 task19 task20
+all: $(TARGETS)
-task17:
- $(CC) $(CFLAGS) task17.c $(LIB) $(CLIBS) -o task17
-
-task18:
- $(CC) $(CFLAGS) task18.c $(LIB) $(CLIBS) -o task18
-task19:
- $(CC) $(CFLAGS) task19.c $(LIB) $(CLIBS) -o task19
-task20:
- $(CC) $(CFLAGS) task20.c $(LIB) $(CLIBS) -o task20
clean:
- rm task17 task18 task19 task20
+ @echo -e "\tDEL\t$(TARGETS)"
+ @rm $(TARGETS)