Files
clamav/libclamav/c++/Makefile.am
Török Edvin 2c7d5adc15 If C++ compiler is not available, don't build LLVM.
This is tricky, because autoconf provides no way to do this automatically
(AC_PROG_CXX fails if no C++ compiler).
One could override AC_MSG_ERROR/FAILURE for AC_PROG_CXX, but that causes all
sorts of problems later (like sys/types.h not found).

So instead create yet another configure in libclamav/c++,
but teach autoconf not to fail if the subconfigure fails
(by overriding AC_MSG_ERROR to set a variable instead of exiting).

This seems to work with shared and static builds, "-all-static" builds
don't work yet, will fix that later.
2009-08-31 15:49:41 +03:00

45 lines
1.4 KiB
Makefile

# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
# MA 02110-1301, USA.
AM_CPPFLAGS = -I$(top_srcdir)/../.. -I$(top_srcdir)/..
ACLOCAL_AMFLAGS=-I m4
if DEBUG_BUILD
LLVM_CONFIG=llvm/Debug/bin/llvm-config
else
LLVM_CONFIG=llvm/Release/bin/llvm-config
endif
$(LLVM_CONFIG): build-llvm
libclamavcxx_la_CPPFLAGS = $(AM_CPPFLAGS) `$(LLVM_CONFIG) --cppflags`
libclamavcxx_la_LDFLAGS = `$(LLVM_CONFIG) --ldflags --libs jit nativecodegen`
libclamavcxx_la_SOURCES = bytecode2llvm.cpp dummy.h
noinst_LTLIBRARIES = libclamavcxx.la
bytecode2llvm.cpp: build-llvm
build-llvm:
+$(GMAKE) -C llvm OPTIMIZE_OPTION=-O2 libs-only
build-llvm-for-check:
+$(GMAKE) -C llvm OPTIMIZE_OPTION=-O2 tools-only
clean-local:
+$(GMAKE) -C llvm clean
check-llvm: build-llvm-for-check
+$(GMAKE) -C llvm check
+$(GMAKE) -C llvm unittests