# Paths

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

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

# Includes

include ${BOG_DIR}/common.mk

# Variables

sun_smooth_%.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_smooth_32 \
     sun_smooth_64 \
     sun_smooth_96 \
     sun_smooth_128 \
     sun_smooth_160 \
     sun_smooth_192 \
     sun_smooth_224 \
     sun_smooth_256 \
     sun_smooth_288 \
     sun_smooth_320 \
     sun_smooth_352 \
     sun_smooth_384 \
     sun_smooth_416 \
     sun_smooth_448 \
     sun_smooth_480 \
     sun_smooth_512 \
     sun_smooth_576 \
     sun_smooth_640 \
     sun_smooth_704 \
     sun_smooth_768 \
     sun_smooth_832 \
     sun_smooth_896 \
     sun_smooth_960

sun_smooth_%.o : sun.cu sun_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_smooth_% : sun_smooth_%.o 
	$(GCC) $(CCFLAGS) -o $@ $+ $(LDFLAGS) $(EXTRA_LDFLAGS)

clean:
	rm -f sun_smooth_*
