aboutsummaryrefslogtreecommitdiff
path: root/Practical2/c/Makefile
diff options
context:
space:
mode:
authorCamil Staps2015-12-09 23:24:29 +0000
committerCamil Staps2015-12-09 23:24:29 +0000
commit71f8ddbaa83e15492401cb6fa6a7a2d54284f316 (patch)
treeb7554e9fcc25cc2c7b9117906da3d3b8b632e6ea /Practical2/c/Makefile
parentRemoved redundant packages (diff)
Working solution Practical 2, small fixes
- Makefile: less dependent on program name - test.sh: quote variables - checkout.c: almost completely new algorithm. This one actually works. At least it does on the test cases.
Diffstat (limited to 'Practical2/c/Makefile')
-rw-r--r--Practical2/c/Makefile12
1 files changed, 5 insertions, 7 deletions
diff --git a/Practical2/c/Makefile b/Practical2/c/Makefile
index 270a693..e64a1f7 100644
--- a/Practical2/c/Makefile
+++ b/Practical2/c/Makefile
@@ -1,15 +1,13 @@
CC=gcc
+OBJS=checkout
.PHONY: all run clean
-all: checkout
+all: $(OBJS)
-checkout:
- $(CC) -o checkout checkout.c
-
-run:
- ./checkout
+$(OBJS): % : %.c
+ $(CC) -o $@ $<
clean:
- rm checkout
+ rm $(OBJS)