From e4e40304e01728ad0efcdae3a7f807694249dc03 Mon Sep 17 00:00:00 2001 From: Andrew Jeffery Date: Sun, 22 Oct 2017 09:52:50 +1030 Subject: [PATCH] Makefile: Use standard make variables and recipes Signed-off-by: Andrew Jeffery --- Makefile | 13 +++---------- 1 file changed, 3 insertions(+), 10 deletions(-) diff --git a/Makefile b/Makefile index 6ff4e80..c8f10ab 100644 --- a/Makefile +++ b/Makefile @@ -1,29 +1,22 @@ CCFLAGS = -Wall -Wshadow -O2 -g -LFLAGS = -lm +LDLIBS = -lm all: test example1 example2 example3 example4 test: test.o genann.o - $(CC) $(CCFLAGS) -o $@ $^ $(LFLAGS) - ./$@ +check: test + ./$^ example1: example1.o genann.o - $(CC) $(CCFLAGS) -o $@ $^ $(LFLAGS) example2: example2.o genann.o - $(CC) $(CCFLAGS) -o $@ $^ $(LFLAGS) example3: example3.o genann.o - $(CC) $(CCFLAGS) -o $@ $^ $(LFLAGS) example4: example4.o genann.o - $(CC) $(CCFLAGS) -o $@ $^ $(LFLAGS) - -.c.o: - $(CC) -c $(CCFLAGS) $< -o $@ clean: