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.
32 lines
792 B
Makefile
32 lines
792 B
Makefile
|
|
|
|
OPTIMIZATION=-O3 -flto
|
|
CC=gcc
|
|
CFLAGS=-Isrc/ -lm -lpthread -Wall -Wextra -pedantic-errors $(OPTIMIZATION) -DPOINT_DTYPE=float
|
|
|
|
.PHONY: directories
|
|
|
|
directories:
|
|
mkdir -p obj out
|
|
|
|
clean:
|
|
rm -rf obj/* out/*
|
|
|
|
obj/scene.o: src/scene.c src/scene.h src/point.h
|
|
$(CC) $(CFLAGS) -c -o $@ src/scene.c
|
|
|
|
obj/camera.o: src/camera.c src/camera.h src/point.h
|
|
$(CC) $(CFLAGS) -c -o $@ src/camera.c
|
|
|
|
obj/images.o: images/src/images.c images/src/images.h src/point.h
|
|
$(CC) $(CFLAGS) -c -o $@ images/src/images.c
|
|
|
|
march: obj/camera.o obj/scene.o obj/images.o src/point.h
|
|
$(CC) $(CFLAGS) -o out/march $^ marcher.c
|
|
|
|
bench: obj/camera.o obj/scene.o obj/images.o src/point.h
|
|
$(CC) $(CFLAGS) -o out/bench $^ bench.c
|
|
|
|
gpu: obj/camera.o obj/images.o src/point.h
|
|
$(CC) -fopenacc $(CFLAGS) -o out/gpu $^ gpu.c
|