Makefile.am 1.46 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 \
Swann Perarnau's avatar
Swann Perarnau committed
16
	       layout/pad.c \
17 18
	       layout/reshape.c

19 20 21 22 23 24 25
DMA_SOURCES = \
	      dma/dma.c \
	      dma/dma_linux_par.c \
	      dma/dma_linux_seq.c

TILING_SOURCES = \
		 tiling/tiling.c \
26
		 tiling/tiling_resize.c
27 28 29 30 31 32 33 34 35 36

UTILS_SOURCES = \
		utils/bitmap.c \
		utils/error.c \
		utils/vector.c

LIB_SOURCES = \
	      $(AREA_SOURCES) \
	      $(DMA_SOURCES) \
	      $(TILING_SOURCES) \
37
	      $(LAYOUT_SOURCES) \
38
	      $(UTILS_SOURCES) \
39
	      $(CUDA_AREA_SOURCES) \
40
	      aml.c
41

42
lib_LTLIBRARIES = libaml.la
43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71

libaml_la_LDFLAGS=
libaml_la_SOURCES=$(LIB_SOURCES)

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

if BUILD_CUDA

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

# 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