You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

38 lines
859 B
Makefile

12 years ago
CFLAGS=-std=c99 -Wall -g -O2
INDENTOPTS=-kr --no-tabs --braces-on-func-def-line --indent-level2
TARGETS=approximate-pi linked-list mandelbrot threads circular-buffer structs ncurses-pong bit-fuckery bit-fuckery2 checkcheck multibrot
EXTRAS=mandelbrot.bmp multibrot.png
12 years ago
12 years ago
.PHONY: all
all: $(TARGETS) $(EXTRAS)
12 years ago
.PHONY: clean
clean:
rm -f $(TARGETS) $(EXTRAS) *~
.PHONY: indent
indent:
indent $(INDENTOPTS) *.c
12 years ago
mandelbrot: mandelbrot.c
$(CC) $(CFLAGS) $(shell sdl-config --cflags) -o $@ $< $(shell sdl-config --libs) -lm
12 years ago
mandelbrot.bmp: mandelbrot
./mandelbrot
threads: threads.c
$(CC) $(CFLAGS) -o $@ $< -pthread
12 years ago
ncurses-pong: ncurses-pong.c
$(CC) $(CFLAGS) -o $@ $< -lncurses
12 years ago
checkcheck: checkcheck.c
$(CC) $(CFLAGS) -o $@ $< -lcheck
multibrot: multibrot.c
$(CC) $(CFLAGS) -o $@ $< -lm -lpng -pthread
multibrot.png: multibrot
./multibrot -j2