summaryrefslogtreecommitdiff
path: root/set1/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 /set1/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 'set1/Makefile')
-rw-r--r--set1/Makefile30
1 files changed, 6 insertions, 24 deletions
diff --git a/set1/Makefile b/set1/Makefile
index 0d08451..8b0ffbd 100644
--- a/set1/Makefile
+++ b/set1/Makefile
@@ -1,27 +1,9 @@
-LIB=../lib/lib.c
-CC=gcc
-CFLAGS := -g -Wall $(CFLAGS)
+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: task1 task2 task4 task5 task6 task7 task8
+all: $(TARGETS)
-task1:
- $(CC) $(CFLAGS) task1.c $(LIB) -o task1
-
-task2:
- $(CC) $(CFLAGS) task2.c $(LIB) -o task2
-
-task4:
- $(CC) $(CFLAGS) task4.c $(LIB) -o task4
-
-task5:
- $(CC) $(CFLAGS) task5.c $(LIB) -o task5
-
-task6:
- $(CC) $(CFLAGS) task6.c $(LIB) -o task6
-
-task7:
- $(CC) $(CFLAGS) task7.c `pkg-config --cflags --libs libcrypto` -o task7
-task8:
- $(CC) $(CFLAGS) task8.c $(LIB) -o task8
clean:
- rm task1 task2 task4 task5 task6 task7 task8
+ @echo -e "\tDEL\t$(TARGETS)"
+ @rm $(TARGETS)