Commit 724b5594 authored by Nicolas Denoyelle's avatar Nicolas Denoyelle
Browse files

Remove device code compilation

parent 610cc3ef
......@@ -198,5 +198,4 @@ AC_CONFIG_FILES([Makefile
aml.pc
include/aml/utils/version.h
include/aml/utils/features.h])
AC_CONFIG_FILES([o2lo], [chmod +x o2lo])
AC_OUTPUT
#!/bin/sh
## ---------------------------------------------------------- ##
## $1: .lo file ##
## $2: .cu.o file object file with dynamic symbol relocation ##
## $3: .o file object file with static symbol relocation ##
## ---------------------------------------------------------- ##
AWK=@AWK@
GREP=@GREP@
LIBTOOL=@abs_top_builddir@/libtool
if test $# -lt 3; then
echo "Create a libtool .lo file provided the target.o file"
echo ""
echo "\t$0 <file.lo> <file.cu.o> <file.o>"
fi
LO_FILE=$1
PIC_FILE=$(echo $2 | awk -F '/' '{print $NF}')
O_FILE=$(echo $3 | awk -F '/' '{print $NF}')
LIB_PIC_FILE=.libs/$O_FILE
BASENAME=$(echo $2 | awk -F '/' '{for(i=1; i<NF; i++) {print $i "/"}}')
PROGRAM=$($GREP -m 1 PROGRAM= $LIBTOOL | cut -d = -f 2)
PACKAGE=$($GREP -m 1 PACKAGE= $LIBTOOL | cut -d = -f 2)
VERSION=$($GREP -m 1 VERSION= $LIBTOOL | cut -d = -f 2)
must_libtool_define() {
eval "var=\$$1"
if [ -z "$var" ]; then
echo "libtool script did not contain $1 variable used to build .lo file."
exit
fi
}
must_libtool_define "PROGRAM"
must_libtool_define "PACKAGE"
must_libtool_define "VERSION"
must_exist() {
if [ ! -f $1 ]; then
echo "File $1 is missing."
exit
fi
}
must_exist $PWD/$BASENAME$O_FILE
must_exist $PWD/$BASENAME$PIC_FILE
mv $PWD/$BASENAME$PIC_FILE $PWD/$BASENAME$LIB_PIC_FILE
echo "# Generated by $PROGRAM (GNU $PACKAGE) $VERSION" > ${LO_FILE}
echo "# Generated by $PROGRAM (GNU $PACKAGE) $VERSION" >> ${LO_FILE}
echo "# $LO_FILE - a libtool object file" >> ${LO_FILE}
echo "# Please DO NOT delete this file!" >> ${LO_FILE}
echo "# It is necessary for linking the library." >> ${LO_FILE}
echo "" >> ${LO_FILE}
echo "# Name of the PIC object." >> ${LO_FILE}
echo "pic_object=$LIB_PIC_FILE" >> ${LO_FILE}
echo "" >> ${LO_FILE}
echo "# Name of the non-PIC object" >> ${LO_FILE}
echo "non_pic_object=$O_FILE" >> ${LO_FILE}
......@@ -62,24 +62,8 @@ if HAVE_CUDA
AM_CPPFLAGS += $(CUDA_CFLAGS)
AM_LDFLAGS += $(CUDA_LIBS)
# Build .c sources using cuda runtime library.
libaml_la_SOURCES+=area/cuda.c layout/cuda.c dma/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
#############################################
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment