#------------------------------------------------------------------------------- # Copyright (c) 2004 Media Development Loan Fund # # This file is part of the LiveSupport project. # http://livesupport.campware.org/ # To report bugs, send an e-mail to bugs@campware.org # # LiveSupport 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. # # LiveSupport 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 LiveSupport; if not, write to the Free Software # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA # # # Author : $Author: maroy $ # Version : $Revision: 1.4 $ # Location : $Source: /home/paul/cvs2svn-livesupport/newcvsrepo/livesupport/modules/db/etc/Makefile.in,v $ # # @configure_input@ #------------------------------------------------------------------------------- #------------------------------------------------------------------------------- # General command definitions #------------------------------------------------------------------------------- MKDIR = mkdir -p RM = rm -f RMDIR = rm -rf DOXYGEN = doxygen #------------------------------------------------------------------------------- # Basic directory and file definitions #------------------------------------------------------------------------------- BASE_DIR = @builddir@ DOC_DIR = ${BASE_DIR}/doc DOXYGEN_DIR = ${DOC_DIR}/doxygen COVERAGE_DIR = ${DOC_DIR}/coverage ETC_DIR = ${BASE_DIR}/etc INCLUDE_DIR = ${BASE_DIR}/include LIB_DIR = ${BASE_DIR}/lib SRC_DIR = ${BASE_DIR}/src TMP_DIR = ${BASE_DIR}/tmp USR_DIR = ${BASE_DIR}/../../usr USR_INCLUDE_DIR = ${USR_DIR}/include USR_LIB_DIR = ${USR_DIR}/lib BOOST_INCLUDE_DIR = ${USR_INCLUDE_DIR}/boost-1_31 LIBXMLPP_INCLUDE_DIR = ${USR_INCLUDE_DIR}/libxml++-1.0 MODULES_DIR = ${BASE_DIR}/.. CORE_DIR = ${MODULES_DIR}/core CORE_INCLUDE_DIR = ${CORE_DIR}/include CORE_LIB_DIR = ${CORE_DIR}/lib CORE_LIB = livesupport_core CORE_LIB_FILE = ${CORE_LIB_DIR}/lib${CORE_LIB}.a VPATH = ${SRC_DIR} TEST_RESULTS = ${DOC_DIR}/testResults.xml # the text result XSLT has to be relative to the test result file, e.g. TMP_DIR TEST_XSLT = ../etc/testResultToHtml.xsl DB_LIB = livesupport_db DB_LIB_FILE = ${LIB_DIR}/lib${DB_LIB}.a TEST_RUNNER = ${TMP_DIR}/testRunner DOXYGEN_CONFIG = ${ETC_DIR}/doxygen.config #------------------------------------------------------------------------------- # Configuration parameters #------------------------------------------------------------------------------- CPPFLAGS = @CPPFLAGS@ CXXFLAGS = @CXXFLAGS@ @DEFS@ @COVERAGE_CXXFLAGS@ \ -pedantic -Wall -Wno-long-long \ -I${USR_INCLUDE_DIR} \ -I${BOOST_INCLUDE_DIR} \ -I${LIBXMLPP_INCLUDE_DIR} \ -I${CORE_INCLUDE_DIR} \ -I${INCLUDE_DIR} -I${TMP_DIR} LDFLAGS = @LDFLAGS@ -L${USR_LIB_DIR} -L${CORE_LIB_DIR} -L${LIB_DIR} #------------------------------------------------------------------------------- # Dependencies #------------------------------------------------------------------------------- DB_LIB_OBJS = ${TMP_DIR}/SimpleConnectionManager.o \ ${TMP_DIR}/ConnectionManagerFactory.o \ ${TMP_DIR}/Conversion.o TEST_RUNNER_OBJS = ${TMP_DIR}/SimpleConnectionManagerTest.o \ ${TMP_DIR}/ConnectionManagerFactoryTest.o \ ${TMP_DIR}/TestRunner.o TEST_RUNNER_LIBS = -l${DB_LIB} -l${CORE_LIB} -lodbc++ -lxml++-1.0 -lcppunit -ldl #------------------------------------------------------------------------------- # Targets #------------------------------------------------------------------------------- .PHONY: all dir_setup doc clean docclean depclean distclean all: dir_setup ${DB_LIB_FILE} dir_setup: ${TMP_DIR} ${DOXYGEN_DIR} doc: ${DOXYGEN} ${DOXYGEN_CONFIG} clean: ${RM} ${DB_LIB_OBJS} ${DB_LIB_FILE} ${RM} ${TEST_RUNNER_OBJS} ${TEST_RUNNER} ${RM} ${TMP_DIR}/*.bb ${TMP_DIR}/*.bbg ${TMP_DIR}/*.da ${TMP_DIR}/*.info docclean: ${RMDIR} ${DOXYGEN_DIR}/html ${RMDIR} ${COVERAGE_DIR}/* ${RM} ${TEST_RESULTS} depclean: clean distclean: clean docclean ${RMDIR} ${TMP_DIR}/config* ${TMP_DIR}/autom4te* check: all ${TEST_RUNNER} LD_LIBRARY_PATH=${USR_LIB_DIR} ${TEST_RUNNER} \ -o ${TEST_RESULTS} -s ${TEST_XSLT} #------------------------------------------------------------------------------- # Specific targets #------------------------------------------------------------------------------- ${DB_LIB_FILE}: ${DB_LIB_OBJS} ${AR} crus $@ $^ ${TMP_DIR}: ${MKDIR} ${TMP_DIR} ${DOXYGEN_DIR}: ${MKDIR} ${DOXYGEN_DIR} ${TEST_RUNNER}: ${CORE_LIB_FILE} ${TEST_RUNNER_OBJS} ${DB_LIB_FILE} ${CXX} ${LDFLAGS} -o $@ ${TEST_RUNNER_OBJS} ${TEST_RUNNER_LIBS} ${CORE_LIB_FILE}: ${MAKE} -C ${CORE_DIR} #------------------------------------------------------------------------------- # Pattern rules #------------------------------------------------------------------------------- ${TMP_DIR}/%.o : ${SRC_DIR}/%.cxx ${CXX} ${CPPFLAGS} ${CXXFLAGS} -c -o $@ $<