c-exercises/Makefile

28 lines
625 B
Makefile
Raw Normal View History

2013-05-11 21:01:39 +02:00
CFLAGS=-std=c99 -Wall -g -O2
2013-05-09 19:32:02 +02:00
INDENTOPTS=-kr --no-tabs --braces-on-func-def-line --indent-level2
2013-05-09 19:18:10 +02:00
2013-06-09 20:56:25 +02:00
TARGETS=approximate-pi linked-list mandelbrot mandelbrot.bmp threads circular-buffer structs ncurses-pong bit-fuckery bit-fuckery2
2013-05-17 06:39:04 +02:00
2013-05-11 13:10:00 +02:00
.PHONY: all
2013-05-17 06:39:04 +02:00
all: $(TARGETS)
2013-05-10 14:32:21 +02:00
2013-05-11 13:10:00 +02:00
.PHONY: clean
2013-05-10 14:32:21 +02:00
clean:
2013-05-17 06:39:04 +02:00
rm -f $(TARGETS) *~
2013-05-09 19:32:02 +02:00
.PHONY: indent
indent:
indent $(INDENTOPTS) *.c
2013-05-11 13:10:00 +02:00
mandelbrot: mandelbrot.c
$(CC) $(CFLAGS) $(shell sdl-config --cflags) -o $@ $< $(shell sdl-config --libs) -lm
2013-05-16 20:44:46 +02:00
2013-05-17 06:39:04 +02:00
mandelbrot.bmp: mandelbrot
./mandelbrot
2013-05-16 20:44:46 +02:00
threads: threads.c
$(CC) $(CFLAGS) -o $@ $< -pthread
2013-06-09 20:56:25 +02:00
ncurses-pong: ncurses-pong.c
$(CC) $(CFLAGS) -o $@ $< -lncurses