From 71f8ddbaa83e15492401cb6fa6a7a2d54284f316 Mon Sep 17 00:00:00 2001 From: Camil Staps Date: Wed, 9 Dec 2015 23:24:29 +0000 Subject: 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. --- Practical2/c/Makefile | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) (limited to 'Practical2/c/Makefile') 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) -- cgit v1.2.3