# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0.  If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
#
# Copyright 1997 - July 2008 CWI, August 2008 - 2016 MonetDB B.V.

INCLUDES = ../../mal ../atoms ../kernel \
	../../../clients/mapilib \
	../../../common/options \
	../../../common/stream \
	../../../common/utils \
	../../../gdk \
	$(pcre_CFLAGS) $(zlib_CFLAGS) $(BZIP_INCS) $(MSGCONTROL_FLAGS) \
	$(openssl_CFLAGS)

MTSAFE

lib_mal = {
	NOINST
	SOURCES = \
		batExtensions.c batExtensions.h \
		bbp.c bbp.h \
		clients.c clients.h \
		factories.c factories.h \
		groupby.c groupby.h \
		inspect.c inspect.h \
		orderidx.c orderidx.h \
		iterator.c  iterator.h \
		projectionpath.c  projectionpath.h \
		language.c language.h \
		mal_io.c mal_io.h \
		mat.c mat.h \
		mkey.c mkey.h \
		manifold.c manifold.h \
		pcre.c \
		profiler.c profiler.h \
		querylog.c querylog.h \
		sysmon.c sysmon.h \
		tablet.c tablet.h \
		tokenizer.c tokenizer.h \
		transaction.c \
		sample.c sample.h \
		calc.c batcalc.c
}

headers_mal = {
	HEADERS = mal
	DIR = libdir/monetdb5
	SOURCES = language.mal mal_init.mal bbp.mal \
		profiler.mal batExtensions.mal orderidx.mal \
		inspect.mal mal_io.mal mkey.mal manifold.mal \
		iterator.mal clients.mal \
		factories.mal groupby.mal pcre.mal mat.mal \
		transaction.mal \
		sample.mal \
		batmtime.mal querylog.mal sysmon.mal
}

headers_auto = {
	HEADERS = mal
	DIR = libdir/monetdb5/autoload
	SOURCES = 01_calc.mal 01_batcalc.mal
}

headers_hge = {
	COND = HAVE_HGE
	HEADERS = mal
	DIR = libdir/monetdb5/autoload
	SOURCES = 00_calc_hge.mal 00_batcalc_hge.mal \
		00_iterator_hge.mal 00_language_hge.mal \
		00_mkey_hge.mal 00_batExtensions_hge.mal
}

EXTRA_DIST = batExtensions.mal iterator.mal \
	groupby.mal mal_init.mal mkey.mal manifold.mal pcre.mal \
	transaction.mal tablet.mal tablet.h sample.mal orderidx.mal \
	mat.mal \
	batmtime.mal querylog.mal sysmon.mal \
	01_calc.mal 01_batcalc.mal \
	00_calc_hge.mal 00_batcalc_hge.mal \
	00_iterator_hge.mal 00_language_hge.mal \
	00_mkey_hge.mal 00_batExtensions_hge.mal

EXTRA_DIST_DIR = Tests
