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.
55 lines
1.2 KiB
Makefile
55 lines
1.2 KiB
Makefile
CFLAGS=-std=c99 -Wextra -pedantic -g -O2
|
|
|
|
TARGETS=approximate-pi linked-list mandelbrot threads circular-buffer structs ncurses-pong bit-fuckery bit-fuckery2 checkcheck multibrot bloom wo-lernen lua-foo binsearch test-inline-assembly uiowa-threads-example
|
|
EXTRAS=mandelbrot.bmp multibrot.png test-inline-assembly.s tags
|
|
|
|
.PHONY: all
|
|
all: $(TARGETS) $(EXTRAS)
|
|
|
|
.PHONY: clean
|
|
clean:
|
|
rm -f $(TARGETS) $(EXTRAS) *.o *~ cppcheck.txt
|
|
|
|
.PHONY: cppcheck
|
|
cppcheck: cppcheck.txt
|
|
|
|
cppcheck.txt: *.c *.h
|
|
cppcheck . 2> $@
|
|
cat $@
|
|
|
|
tags: *.c
|
|
ctags -R .
|
|
|
|
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
|
|
|
|
ncurses-pong: ncurses-pong.c
|
|
$(CC) $(CFLAGS) -o $@ $< -lncurses
|
|
|
|
checkcheck: checkcheck.c
|
|
$(CC) $(CFLAGS) -o $@ $< -lcheck
|
|
|
|
multibrot: multibrot.c
|
|
$(CC) $(CFLAGS) -o $@ $< -lm -lpng -pthread
|
|
|
|
multibrot.png: multibrot
|
|
./multibrot -j2
|
|
|
|
lua-foo: lua-foo.c
|
|
$(CC) $(CFLAGS) -o $@ $< -llua -lm
|
|
|
|
test-inline-assembly: test-inline-assembly.c
|
|
$(CC) -Wall -o $@ $<
|
|
|
|
test-inline-assembly.s: test-inline-assembly.c
|
|
$(CC) -Wall -S -o $@ $<
|
|
|
|
uiowa-threads-example: uiowa-threads.o uiowa-threads-example.c
|
|
$(CC) $(CFLAGS) -o $@ $^
|