Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 10 additions & 1 deletion makefile
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
CC = gcc
AR = ar
ARFLAGS = cr
OCL_FLAGS = -I. -L. -lOpenCL
override LDFLAGS = -lm
override CFLAGS += -Wall -fwrapv

Expand All @@ -25,6 +26,9 @@ libcubiomes: CFLAGS += -fPIC
libcubiomes: layers.o generator.o finders.o util.o
$(AR) $(ARFLAGS) libcubiomes.a $^

opencl: ocl_generator.o ocl_tests.o libcubiomes.a
$(CC) $(CFLAGS) $(OCL_FLAGS) -o ocl_tests $^

find_compactbiomes: find_compactbiomes.o layers.o generator.o finders.o
$(CC) -o $@ $^ $(LDFLAGS)

Expand All @@ -37,7 +41,6 @@ find_quadhuts: find_quadhuts.o layers.o generator.o finders.o
find_quadhuts.o: find_quadhuts.c
$(CC) -c $(CFLAGS) $<


finders.o: finders.c finders.h
$(CC) -c $(CFLAGS) $<

Expand All @@ -50,6 +53,12 @@ layers.o: layers.c layers.h
util.o: util.c util.h
$(CC) -c $(CFLAGS) $<

ocl_generator.o: ocl_generator.c ocl_generator.h
$(CC) -c $(FLAGS) $< $(OCL_FLAGS)

ocl_tests.o: ocl_tests.c ocl_generator.h
$(CC) -c $(FLAGS) $< $(OCL_FLAGS)

clean:
$(RM) *.o libcubiomes.a find_quadhuts find_compactbiomes

Loading