From dbf28624642e81cd854e173887fce0a03a5e8502 Mon Sep 17 00:00:00 2001 From: orange Date: Fri, 17 May 2013 06:39:04 +0200 Subject: [PATCH] improve makefile --- Makefile | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index 1bf0b0b..fb79bd5 100644 --- a/Makefile +++ b/Makefile @@ -1,12 +1,14 @@ CFLAGS=-std=c99 -Wall -g -O2 INDENTOPTS=-kr --no-tabs --braces-on-func-def-line --indent-level2 +TARGETS=approximate-pi linked-list mandelbrot mandelbrot.bmp threads + .PHONY: all -all: approximate-pi linked-list mandelbrot threads +all: $(TARGETS) .PHONY: clean clean: - rm -f approximate-pi linked-list mandelbrot threads *~ + rm -f $(TARGETS) *~ .PHONY: indent indent: @@ -15,5 +17,8 @@ indent: mandelbrot: mandelbrot.c $(CC) $(CFLAGS) $(shell sdl-config --cflags) -o $@ $< $(shell sdl-config --libs) -lm +mandelbrot.bmp: mandelbrot + ./mandelbrot + threads: threads.c $(CC) $(CFLAGS) -o $@ $< -pthread