Makefile.am 1.66 KB
Newer Older
1
SUFFIXES=.c .cu
2
AM_CPPFLAGS = -I$(top_srcdir)/include $(PTHREAD_CFLAGS)
3
AM_LDFLAGS = $(PTHREAD_LIBS)
4
noinst_LTLIBRARIES=
5

6 7
#############################################
# .C sources
8 9 10 11 12

AREA_SOURCES = \
	       area/area.c \
	       area/linux.c

13 14 15
LAYOUT_SOURCES = \
	       layout/layout.c \
	       layout/dense.c \
16
	       layout/pad.c \
17 18
	       layout/reshape.c

19 20 21 22 23 24 25 26 27 28 29 30
DMA_SOURCES = \
	      dma/dma.c \
	      dma/dma_linux_par.c \
	      dma/dma_linux_seq.c

SCRATCH_SOURCES = \
		  scratch/scratch.c \
		  scratch/scratch_par.c \
		  scratch/scratch_seq.c

TILING_SOURCES = \
		 tiling/tiling.c \
31
		 tiling/tiling_pad.c \
32
		 tiling/tiling_resize.c
33 34 35 36

UTILS_SOURCES = \
		utils/bitmap.c \
		utils/error.c \
37 38
		utils/vector.c \
		utils/features.c
39 40 41 42 43 44

LIB_SOURCES = \
	      $(AREA_SOURCES) \
	      $(DMA_SOURCES) \
	      $(SCRATCH_SOURCES) \
	      $(TILING_SOURCES) \
45
	      $(LAYOUT_SOURCES) \
46
	      $(UTILS_SOURCES) \
47
	      $(CUDA_AREA_SOURCES) \
48
	      aml.c
49

50
lib_LTLIBRARIES = libaml.la
51 52 53 54 55 56 57

libaml_la_LDFLAGS=
libaml_la_SOURCES=$(LIB_SOURCES)

#############################################
# Cuda sources

58 59 60 61
if HAVE_CUDA

AM_CPPFLAGS += $(CUDA_CFLAGS)
AM_LDFLAGS += $(CUDA_LIBS)
62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81

# Build .c sources using cuda runtime library.
libaml_la_SOURCES+=area/cuda.c

# Build .cu sources containing device code.
#
# CUDA_LO_FILES= # .lo files result of .cu files.
# CUDA_FLAGS=--x=cu
#
# .cu.lo: .cu
# 	$(NVCC) $(CUDA_FLAGS) -I$(top_srcdir)/include -dc -o $<.cu.o $<
# 	$(NVCC) $(CUDA_FLAGS) -I$(top_srcdir)/include -c -o $<.o $<
# 	$(top_builddir)/o2lo $@ $<.cu.o $<.o
#
# libamlcuda.la: $(CUDA_LO_FILES)
# 	$(LIBTOOL) --tag=CC --mode=link $(NVCC) -dlink -o $@ $< -lcudart
#
# libaml_la_LIBADD+=libamlcuda.la

endif