# Paths

BOG_DIR=../../../bog

vpath %.h ${BOG_DIR}/src
vpath %.cu ${BOG_DIR}/src

# Includes

include ${BOG_DIR}/common.mk

# Variables

sun_flat_%.o : BLOCK_SIZE=$*

EXTRA_LDFLAGS += -lGLU -lGL -lGLEW -lSDL -lhdf5 -lpng -lglfw -lpython2.7
EXTRA_NVCCFLAGS += -DBLOCK_SIZE=${BLOCK_SIZE} -DLINEAR_TEXTURE
INCLUDES += -I${BOG_DIR}/src -I/usr/include/python2.7/ -I/usr/lib64/python2.7/site-packages/numpy/core/include/

# Rules & targets

all: sun_flat_32 \
     sun_flat_64 \
     sun_flat_96 \
     sun_flat_128 \
     sun_flat_160 \
     sun_flat_192 \
     sun_flat_224 \
     sun_flat_256 \
     sun_flat_288 \
     sun_flat_320 \
     sun_flat_352 \
     sun_flat_384 \
     sun_flat_416 \
     sun_flat_448 \
     sun_flat_480 \
     sun_flat_512 \
     sun_flat_576 \
     sun_flat_640 \
     sun_flat_704 \
     sun_flat_768 \
     sun_flat_832 \
     sun_flat_896 \
     sun_flat_960

sun_flat_%.o : sun_no_textures.cu sun_no_textures_extra.cu \
               bog_draw.cu bog_io.cu bog_kernel.cu bog_device.cu \
               bog_init.cu bog_memory.cu
	$(NVCC) $(NVCCFLAGS) $(EXTRA_NVCCFLAGS) $(GENCODE_FLAGS) $(INCLUDES) -o $@ -c $<

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

clean:
	rm -f sun_flat_*

