1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192
|
E_RELEASE= @enable_release@
QMAKE = @QMAKE@
# We need to add one level of indirect definition because of qmake which
# uses QMAKE_{CC,CXX,LINK} to define compiler specific stuff, however
# if we do QMAKE_CC = $(CC) then we will get CC =$(CC) in the result makefile
# which is bad
CONFIG_CC = @CC@
CONFIG_CXX = @CXX@
CONFIG_LINK = $(CONFIG_CXX)
CC = $(CONFIG_CC)
CXX = $(CONFIG_CXX)
LINK = $(CONFIG_LINK)
# TODO from autoconf
AR = ar cqs
CONFIG_RANLIB = @RANLIB@
RANLIB = $(CONFIG_RANLIB)
# TODO from autoconf
COPY = cp -f
COPY_FILE= $(COPY)
COPY_DIR = $(COPY) -r
INSTALL_FILE= $(COPY_FILE)
INSTALL_DIR = $(COPY_DIR)
# TODO from autoconf
DEL_FILE = rm -f
# TODO from autoconf
SYMLINK = ln -sf
# TODO from autoconf
DEL_DIR = rmdir
DEL_FORCE_DIR = rm -rf
MOVE = mv -f
# TODO from autoconf
CHK_DIR_EXISTS= test -d
MKDIR = mkdir -p
SHELL = @SHELL@
DOXYGEN_BIN = @DOXYGEN_BIN@
# TODO from autoconf ?
LIBPREFIX = lib
###########################################
# Installation directories
###########################################
# Installation root directory (empty for / otherwise including trailing slash)
INSTALL_ROOT = @root_dir@
# extracts values from configure used by others
version = @PACKAGE_VERSION@
PACKAGE_TARNAME = @PACKAGE_TARNAME@
package_name = $(PACKAGE_TARNAME)
prefix = @prefix@
exec_prefix = @exec_prefix@
datarootdir = @datarootdir@
bindir = @bindir@
docdir = @docdir@
mandir = @mandir@
datadir = @datadir@/$(package_name)
# Our abstraction of configure variables reused also in gui
PREFIX = $(prefix)
DATA_PATH = $(datadir)
DOC_PATH = $(docdir)
MAN_PATH = $(mandir)/man1
BIN_PATH = $(bindir)
#############################################
# Flags definition
#############################################
# Debug options
DEBUG = @DEBUG@
# Optimization options
OPTIM = @OPTIM@
# Architecture specific options
# TODO how to find out?
ARCH =
# Warning options
WARN = @WARN@
# TODO check whether this is ok also for other platforms
C_EXTRA = -fmessage-length=0 -D_FORTIFY_SOURCE=2 @STACK_PROTECTOR_FLAGS@\
-fno-strict-aliasing
CXX_EXTRA = -fmessage-length=0 -D_FORTIFY_SOURCE=2 @STACK_PROTECTOR_FLAGS@\
-fno-strict-aliasing -fexceptions
#######################################
# Optional C parameters
# Put special parameters here
# In fact we are not using many pure C files, so this will be usually out of your concern
#######################################
EXTRA_UTILS_CFLAGS =
EXTRA_KERNEL_CFLAGS =
EXTRA_TESTS_CFLAGS =
#######################################
# Optional C++ parameters
# Put special parameters here
#######################################
# from autoconf --enable-observer-debug
OBSERVER_CXXFLAGS = @OBSERVER_CXXFLAGS@
EXTRA_UTILS_CXXFLAGS =
EXTRA_KERNEL_CXXFLAGS =
EXTRA_TESTS_CXXFLAGS =
EXTRA_GUI_CXXFLAGS = -D CONFIG_DATA_PATH="$(DATA_PATH)"
# same like for compiler stuff we also define 2 levels
CONFIG_CFLAGS = $(DEBUG) $(OPTIM) $(ARCH) $(WARN) $(C_EXTRA) -pipe
CONFIG_CXXFLAGS = $(DEBUG) $(OPTIM) $(ARCH) $(WARN) $(CXX_EXTRA) $(OBSERVER_CXXFLAGS) -pipe
CFLAGS = $(CONFIG_CFLAGS)
CXXFLAGS = $(CONFIG_CXXFLAGS)
#######################################
# Absolute paths for all components
#
# Although this is not optimal (e.g. you may want to move whole tree into other directory), this
# is the simpliest solution I have found. We have only one file with whole configuration and
# all other Makefiles just need to include it and don't care about including stuff and so on.
# Just look inside xpdf and the way how it includes its files (you don't want to include xpdf
# headers from some deeper directory (like kernel/tests) because you will be drawned with ../).
#######################################
ROOT = @abs_builddir@
SRCROOT = $(ROOT)/src
DOCROOT = $(ROOT)/doc
XPDFROOT = $(SRCROOT)/xpdf
KERNELROOT = $(SRCROOT)/kernel
UTILSROOT = $(SRCROOT)/utils
TESTSROOT = $(SRCROOT)/tests/
KERNELTESTSROOT = $(TESTSROOT)/kernel
GUIROOT = $(SRCROOT)/gui
QSA_QT = @QSA_DIR@
QSAROOT = $(SRCROOT)/$(QSA_QT)
QOUTPUTDEVROOT = $(SRCROOT)/kpdf-kde-3.3.2
BOOSTFLAGS = @BOOST_CPPFLAGS@
CPPUNITFLAGS = @CPPUNIT_CFLAGS@
FREETYPEFLAGS = @FT2_CFLAGS@
T1FLAGS = @t1_CFLAGS@
XPDFLAGS = -I$(XPDFROOT)/
# This is required for qmake which always forces -I when specifying
# INCLUDEPATH
QSAPATH = $(QSAROOT)/src/qsa
QSAFLAGS = -I$(QSAPATH)
QOUTPUTDEVPATH = $(QOUTPUTDEVROOT)
QOUTPUTDEVFLAGS = -I$(QOUTPUTDEVPATH)
# All necessary includes
MANDATORY_INCPATH = -I. -I$(SRCROOT) $(XPDFLAGS) $(BOOSTFLAGS)\
$(FREETYPEFLAGS) $(T1FLAGS)
# This is required for qmake which always forces -I when specifying
MANDATORY_PATHS = $(SRCROOT) $(XPDFLAGS) $(BOOSTFLAGS) $(FREETYPEFLAGS)
FREETYPE_LIBS = @FT2_LIBS@
T1_LIBS = @t1_LIBS@
BOOST_LIBS = @BOOST_LDFLAGS@
BOOST_IOSTREAMS_LIBS = @BOOST_IOSTREAMS_LIB@
# PDFedit specific libs
CPPUNIT_LIBS = @CPPUNIT_LIBS@
QOUTPUTDEV_LIBS = -lqoutputdevices -L$(QOUTPUTDEVROOT)/
QSALIB = -lqsa_pdfedit -L$(QSAROOT)/lib/
PDFEDIT_LIBS = -lkernel -L$(KERNELROOT) -lutils -L$(UTILSROOT) \
-lxpdf -L$(XPDFROOT)/xpdf -lfofi -L$(XPDFROOT)/fofi \
-lGoo -L$(XPDFROOT)/goo -lsplash -L$(XPDFROOT)/splash \
-lutils -L$(UTILSROOT)
# given from configure parameters
STANDARD_LIBS = @LIBS@
STANDARD_LDFLAGS = @LDFLAGS@
# all necessary libraries
MANDATORY_LIBS = $(BOOST_LIBS) $(BOOST_IOSTREAMS_LIB) $(PDFEDIT_LIBS) \
$(FREETYPE_LIBS) $(T1_LIBS)
########################################
# Compilation targets
########################################
# configure parameter --enable-gui
GUI_TARGET = @GUI_TARGET@
# configure parameter --enable-kernel-tests
TESTS_TARGET = @TESTS_TARGET@
DOXYGEN_TARGET = @DOXYGEN_TARGET@
DOXYGEN_INSTALL_TARGET = @DOXYGEN_INSTALL_TARGET@
# Extended documentation (design)
ADVANCED_DOC_TARGET = @ADVANCED_TARGET@
ADVANCED_DOC_INSTALL_TARGET = @ADVANCED_INSTALL_TARGET@
|