improve makefile

master
orange 12 years ago
parent fb135c3c42
commit dbf2862464

@ -1,12 +1,14 @@
CFLAGS=-std=c99 -Wall -g -O2 CFLAGS=-std=c99 -Wall -g -O2
INDENTOPTS=-kr --no-tabs --braces-on-func-def-line --indent-level2 INDENTOPTS=-kr --no-tabs --braces-on-func-def-line --indent-level2
TARGETS=approximate-pi linked-list mandelbrot mandelbrot.bmp threads
.PHONY: all .PHONY: all
all: approximate-pi linked-list mandelbrot threads all: $(TARGETS)
.PHONY: clean .PHONY: clean
clean: clean:
rm -f approximate-pi linked-list mandelbrot threads *~ rm -f $(TARGETS) *~
.PHONY: indent .PHONY: indent
indent: indent:
@ -15,5 +17,8 @@ indent:
mandelbrot: mandelbrot.c mandelbrot: mandelbrot.c
$(CC) $(CFLAGS) $(shell sdl-config --cflags) -o $@ $< $(shell sdl-config --libs) -lm $(CC) $(CFLAGS) $(shell sdl-config --cflags) -o $@ $< $(shell sdl-config --libs) -lm
mandelbrot.bmp: mandelbrot
./mandelbrot
threads: threads.c threads: threads.c
$(CC) $(CFLAGS) -o $@ $< -pthread $(CC) $(CFLAGS) -o $@ $< -pthread

Loading…
Cancel
Save