1234567891011121314151617181920212223242526 |
- CC=/usr/bin/clang
- CFLAGS=-g -Werror -D _DEFAULT_SOURCE -O0 -D_XOPEN_SOURCE=600 -pthread -pedantic -pedantic-errors -fno-fast-math -fno-builtin -m64 -std=iso9899:1999 -I/usr/local/include/ -I${PWD} -I${PWD}/../libpng
- OUT=bin
- OBJ=$(OUT)/obj
- OBJS=$(OBJ)/mandelbrot.o $(OBJ)/img.o $(OBJ)/queue.o
- all: pre bin/mandelbrot
- bin/mandelbrot: $(OBJS)
- $(CC) $(CFLAGS) $(OBJS) -o $(OUT)/mandelbrot -pthread -L/usr/local/lib/ -lpng
- bin/obj/mandelbrot.o: mandelbrot.c config.h
- $(CC) $(CFLAGS) -c mandelbrot.c -o $(OBJ)/mandelbrot.o -pthread
- bin/obj/img.o: ../libpng/img.c
- $(CC) $(CFLAGS) -c ../libpng/img.c -o $(OBJ)/img.o
- bin/obj/queue.o: queue.c
- $(CC) $(CFLAGS) -c queue.c -o $(OBJ)/queue.o -pthread
- pre:
- mkdir -p bin/obj
- clean:
- find ./bin -type f -exec rm {} \;
|