# common.mk contains most the informations for compilation

include ../../common_waker.mk

BLOCK_SIZE=512

# Rules and targets

EXTRA_LDFLAGS += -lGLU -lGL -lGLEW -lSDL -lhdf5 -lpng
EXTRA_NVCCFLAGS += -DBLOCK_SIZE=${BLOCK_SIZE}

all: build

build: opengl_only

opengl_only.o: opengl_only.cu opengl_only_extra.cu ../../src/bog_draw.cu ../../src/bog_io.cu ../../src/bog_kernel.cu
	$(NVCC) $(NVCCFLAGS) $(EXTRA_NVCCFLAGS) $(GENCODE_FLAGS) $(INCLUDES) -o $@ -c $<

opengl_only: opengl_only.o 
	$(GCC) $(CCFLAGS) -o $@ $+ $(LDFLAGS) $(EXTRA_LDFLAGS)

run: build
	./opengl_only

clean:
	rm -f opengl_only opengl_only.o 

