sintonia/livesupport/modules/core/etc/Makefile.in

200 lines
6.8 KiB
Makefile

#-------------------------------------------------------------------------------
# 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: fgerlits $
# Version : $Revision: 1.20 $
# Location : $Source: /home/paul/cvs2svn-livesupport/newcvsrepo/livesupport/modules/core/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
#-------------------------------------------------------------------------------
PACKAGE_NAME = @PACKAGE_NAME@
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
VAR_DIR = ${BASE_DIR}/var
USR_DIR = ${BASE_DIR}/../../usr
USR_INCLUDE_DIR = ${USR_DIR}/include
USR_BIN_DIR = ${USR_DIR}/bin
USR_LIB_DIR = ${USR_DIR}/lib
BOOST_INCLUDE_DIR = ${USR_INCLUDE_DIR}/boost-1_31
GENRB = ${USR_BIN_DIR}/genrb
GENRBOPTS = --destdir ${TMP_DIR} \
--encoding utf-8 \
--package-name ${PACKAGE_NAME} \
--strict
VPATH = ${SRC_DIR}
LIBXMLPP_CFLAGS=@LIBXMLPP_CFLAGS@
LIBXMLPP_LIBS=@LIBXMLPP_LIBS@
# TODO: move ICU flag determination to configure script
ICU_CFLAGS=
ICU_LIBS=`${USR_DIR}/bin/icu-config --ldflags --ldflags-toolutil --ldflags-icuio`
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
CORE_LIB = livesupport_core
CORE_LIB_FILE = ${LIB_DIR}/lib${CORE_LIB}.a
TEST_RUNNER = ${TMP_DIR}/testRunner
DOXYGEN_CONFIG = ${ETC_DIR}/doxygen.config
export LD_LIBRARY_PATH=${USR_LIB_DIR}
#-------------------------------------------------------------------------------
# Configuration parameters
#-------------------------------------------------------------------------------
CPPFLAGS = @CPPFLAGS@
CXXFLAGS = @CXXFLAGS@ @DEFS@ @COVERAGE_CXXFLAGS@ -pthread \
-pedantic -Wall -Wno-long-long \
${ICU_CFLAGS} \
${LIBXMLPP_CFLAGS} \
-I${USR_INCLUDE_DIR} \
-I${BOOST_INCLUDE_DIR} \
-I${INCLUDE_DIR} -I${TMP_DIR}
LDFLAGS = @LDFLAGS@ -pthread \
${ICU_LIBS} \
${LIBXMLPP_LIBS} \
-L${USR_LIB_DIR} \
-L${LIB_DIR}
#-------------------------------------------------------------------------------
# Dependencies
#-------------------------------------------------------------------------------
CORE_LIB_OBJS = ${TMP_DIR}/UniqueId.o \
${TMP_DIR}/Playable.o \
${TMP_DIR}/AudioClip.o \
${TMP_DIR}/FadeInfo.o \
${TMP_DIR}/PlaylistElement.o \
${TMP_DIR}/Playlist.o \
${TMP_DIR}/TimeConversion.o \
${TMP_DIR}/Thread.o \
${TMP_DIR}/LocalizedObject.o \
${TMP_DIR}/LocalizedConfigurable.o \
${TMP_DIR}/Md5.o
TEST_RUNNER_OBJS = ${TMP_DIR}/TestRunner.o \
${TMP_DIR}/UniqueIdTest.o \
${TMP_DIR}/AudioClipTest.o \
${TMP_DIR}/FadeInfoTest.o \
${TMP_DIR}/PlaylistElementTest.o \
${TMP_DIR}/PlaylistTest.o \
${TMP_DIR}/TimeConversionTest.o \
${TMP_DIR}/TestRunnable.o \
${TMP_DIR}/ThreadTest.o \
${TMP_DIR}/LocalizedObjectTest.o \
${TMP_DIR}/LocalizedConfigurableTest.o \
${TMP_DIR}/Md5Test.o
TEST_RUNNER_RES = ${TMP_DIR}/${PACKAGE_NAME}_root.res \
${TMP_DIR}/${PACKAGE_NAME}_en.res \
${TMP_DIR}/${PACKAGE_NAME}_hu.res \
${TMP_DIR}/${PACKAGE_NAME}_jp.res
TEST_RUNNER_LIBS = -l${CORE_LIB} ${ICU_LIBS} -lboost_date_time-gcc \
-lcppunit -ldl
#-------------------------------------------------------------------------------
# Targets
#-------------------------------------------------------------------------------
.PHONY: all dir_setup doc clean docclean depclean distclean
all: dir_setup ${CORE_LIB_FILE}
dir_setup: ${TMP_DIR} ${DOXYGEN_DIR}
doc:
${DOXYGEN} ${DOXYGEN_CONFIG}
clean:
${RM} ${CORE_LIB_OBJS} ${CORE_LIB_FILE}
${RM} ${TEST_RUNNER_OBJS} ${TEST_RUNNER_RES} ${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: ${TEST_RUNNER} ${TEST_RUNNER_RES}
${TEST_RUNNER} -o ${TEST_RESULTS} -s ${TEST_XSLT}
#-------------------------------------------------------------------------------
# Specific targets
#-------------------------------------------------------------------------------
${CORE_LIB_FILE}: ${CORE_LIB_OBJS}
${AR} crus $@ $^
${TMP_DIR}:
${MKDIR} ${TMP_DIR}
${DOXYGEN_DIR}:
${MKDIR} ${DOXYGEN_DIR}
${TEST_RUNNER}: ${TEST_RUNNER_OBJS} ${CORE_LIB_FILE}
${CXX} ${LDFLAGS} -o $@ ${TEST_RUNNER_OBJS} ${TEST_RUNNER_LIBS}
#-------------------------------------------------------------------------------
# Pattern rules
#-------------------------------------------------------------------------------
${TMP_DIR}/%.o : ${SRC_DIR}/%.cxx
${CXX} ${CPPFLAGS} ${CXXFLAGS} -c -o $@ $<
${TMP_DIR}/${PACKAGE_NAME}_%.res : ${VAR_DIR}/%.txt
${GENRB} ${GENRBOPTS} $^