improve makefile
This commit is contained in:
parent
fb135c3c42
commit
dbf2862464
1 changed files with 7 additions and 2 deletions
9
Makefile
9
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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue