Commit 8721a0d7 authored by Swann Perarnau's avatar Swann Perarnau

[refactor/fix] create single src makefile.am

Recursive makefiles do not propagation automake flags (AM_CFLAGS),
making the proper configuration of the whole build chain more complex
than it needs to be. This patch goes back to a single makefile.am in
src, simplifying the build quite a bit.
parent 377935c9
......@@ -100,11 +100,6 @@ AC_CONFIG_HEADERS([include/config.h])
AC_CONFIG_FILES([Makefile
src/Makefile
src/area/Makefile
src/dma/Makefile
src/tiling/Makefile
src/scratch/Makefile
src/utils/Makefile
include/Makefile
tests/Makefile
doc/Makefile
......
lib_LTLIBRARIES = libaml.la
libaml_la_SOURCES = aml.c
libaml_la_CFLAGS = -I$(top_srcdir)/include
libaml_la_LDFLAGS=$(PTHREAD_CFLAGS)
libaml_la_LIBADD=
SUBDIRS=utils
libaml_la_LIBADD+=$(top_srcdir)/src/utils/libamlutils.la
SUBDIRS+=area
libaml_la_LIBADD+=$(top_srcdir)/src/area/libamlarea.la
SUBDIRS+=dma
libaml_la_LIBADD+=$(top_srcdir)/src/dma/libamldma.la
SUBDIRS+=tiling
libaml_la_LIBADD+=$(top_srcdir)/src/tiling/libamltiling.la
SUBDIRS+=scratch
libaml_la_LIBADD+=$(top_srcdir)/src/scratch/libamlscratch.la
AM_CFLAGS = -I$(top_srcdir)/include $(PTHREAD_CFLAGS)
AM_LDFLAGS = $(PTHREAD_LIBS)
AREA_SOURCES = \
area/area.c \
area/linux.c
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 \
tiling/tiling_1d.c \
tiling/tiling_2d.c
UTILS_SOURCES = \
utils/bitmap.c \
utils/error.c \
utils/vector.c
LIB_SOURCES = \
$(AREA_SOURCES) \
$(DMA_SOURCES) \
$(SCRATCH_SOURCES) \
$(TILING_SOURCES) \
$(UTILS_SOURCES) \
aml.c
lib_LTLIBRARIES = libaml.la
libaml_la_SOURCES = $(LIB_SOURCES)
AM_CFLAGS=-I$(top_srcdir)/include
AM_CPPFLAGS=$(AM_CFLAGS)
noinst_LTLIBRARIES = libamlarea.la
libamlarea_la_LDFLAGS = -lnuma
libamlarea_la_CFLAGS = $(AM_CFLAGS)
libamlarea_la_SOURCES = \
area.c \
linux.c
AM_CFLAGS=-I$(top_srcdir)/include
AM_CPPFLAGS=$(AM_CFLAGS)
noinst_LTLIBRARIES=libamldma.la
libamldma_la_SOURCES=\
dma.c \
dma_linux_par.c \
dma_linux_seq.c
libamldma_la_CFLAGS=$(AM_CFLAGS)
libamldma_la_LDFLAGS=$(AM_CFLAGS)
AM_CFLAGS=-I$(top_srcdir)/include
AM_CPPFLAGS=$(AM_CFLAGS)
noinst_LTLIBRARIES=libamlscratch.la
libamlscratch_la_SOURCES=\
scratch.c \
scratch_seq.c \
scratch_par.c
libamlscratch_la_CFLAGS=$(AM_CFLAGS)
AM_CFLAGS=-I$(top_srcdir)/include
AM_CPPFLAGS=$(AM_CFLAGS)
noinst_LTLIBRARIES=libamltiling.la
libamltiling_la_SOURCES=\
tiling.c \
tiling_1d.c \
tiling_2d.c
AM_CFLAGS=-I$(top_srcdir)/include
AM_CPPFLAGS=$(AM_CFLAGS)
noinst_LTLIBRARIES=libamlutils.la
libamlutils_la_SOURCES=\
vector.c \
bitmap.c \
error.c
libamlutils_la_CFLAGS=$(AM_CFLAGS)
libamlutils_la_LDFLAGS=
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