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
|
# Override the old bits that depended on $(MACHINE)
PWD=@PWD@
SRCROOT=$(PWD)/@srcdir@
O=.
L=$(PWD)/lib
#-----------------------------------------------------------------------------
# Third party package dependencies
#-- libcurl
CURL_LIB = @LIBCURL@
CURL_INC = @LIBCURL_CPPFLAGS@
#-- zlib
ZLIB_LIB = @ZLIB_LDFLAGS@
ZLIB_INC = @ZLIB_CFLAGS@
#ZLIB_VERSION = @ZLIB_VERSION@
#-- liblzma
LZMA_LIB = @LZMA_LDFLAGS@
LZMA_INC = @LZMA_CFLAGS@
#LZMA_VERSION = @LZMA_VERSION@
#-- libpng
PNG_LIB = @PNG_LDFLAGS@
PNG_INC = @PNG_CFLAGS@
#-- staden-io_lib
IOLIB_LIB = @IO_LIB_LDFLAGS@
IOLIB_INC = @IO_LIB_CFLAGS@
#-- Curses / NCurses
CURSES_LIB = @CURSES_LDFLAGS@
CURSES_INC = @CURSES_CFLAGS@
#-- X windows
X_LIB = @X_LIBS@
INCLUDES += @X_CFLAGS@
#-- Tcl/Tk
#TCL_INC = @TCL_INCLUDE_SPEC@
TCL_INC = @TCL_INCLUDES@
TCL_LIB = @TCL_LIB_SPEC@ @TCL_LIBS@
TK_INC = @TK_INCLUDES@ @TCL_INCLUDES@
TK_LIB = @TK_LIB_SPEC@ @TCL_LIB_SPEC@ @TK_LIBS@
#-----------------------------------------------------------------------------
# Compiler/linking options
# -rpath-link is passed to the linker here to avoid needing to set
# LD_LIBRARY_PATH during linking, although it will still be needed to be set
# at run-time unless we modify these to -rpath instead of -rpath-link.
#
# We only do this currently for the other libraries within this package and
# for staden-io_lib.
# How else do we get commas in a subst text or pattern?
comma = ,
SVNVERS := $(shell expr "`@SVNVERSION@ 2>&1 $(SRCROOT)`" : '\([0-9].*\)')
LIB_RUNTIME_DIR = ${prefix}/lib/staden
CC = @CC@
#CDEBUG = -Wall -Wno-sign-compare -Wno-pointer-sign -Wno-parentheses -Wno-unused -Wno-char-subscripts -Wno-pointer-to-int-cast -Wno-int-to-pointer-cast
CFLAGS = @CFLAGS@ $(DEFINES) $(INCLUDES) -DSVN_VERSION="$(SVNVERS)"
CXX = @CXX@
CXXFLAGS = @CXXFLAGS@ $(DEFINES) $(INCLUDES) -DSVN_VERSION="$(SVNVERS)"
CPP = @CPP@
CPPFLAGS = @CPPFLAGS@
LDFLAGS = -L$(L) @LDFLAGS@ @CC_SEARCH_FLAGS@
#CLDFLAGS = -L$(L) -Wl,-rpath-link,$(L) $(subst -L,-Wl$(comma)-rpath-link$(comma),$(filter -L%,$(IOLIB_LIB)))
CLDFLAGS = -L$(L) @LDFLAGS@ @CC_SEARCH_FLAGS@
CXXLDFLAGS = $(CLDFLAGS)
F77 = @F77@
FFLAGS = @FFLAGS@
EXTRA_LIBS = @LIBS@
# System type
OS := $(shell uname -s)
# Large file support
# (Enabled automatically due to AC_SYS_LARGEFILE & AC_FUNC_FSEEKO ?)
# Dynamic linking options. These mainly come from querying how Tcl worked.
# Note for windows we'll need to change SHLIB_PREFIX. (TODO)
# Do we also need to add SHLIB_SONAME somewhere? On irix this is:
# SHLIB_SONAME = $(@:$(L)/%=-soname %)
#
SHLIB_CFLAGS = @SHLIB_CFLAGS@
SHLIB_LD = @SHLIB_LD@
SHLIB_LDFLAGS = $(CFLAGS) $(LDFLAGS)
SHLIB_PREFIX = lib
SHLIB_SUFFIX = @SHLIB_SUFFIX@
SHLIB_SONAME =
SHLIB_OUTFLAG = -o $(SPACE)
EXTRA_LIBS += @DL_LIBS@
# Best guess for C++
SHLIB_CXXFLAGS = $(SHLIB_CFLAGS)
SHLIB_LDXX = @SHLIB_LDXX@
SHLIB_LDXXFLAGS = $(SHLIB_LDFLAGS)
# Best guess for fortran
SHLIB_FFLAGS = $(SHLIB_CFLAGS)
#-----------------------------------------------------------------------------
# Install options
# Installer for executables. Most are executable already, but some
# need chmodding such as the ones created from <prog>.in via autoconf.
#
# We can either do this explicitly via cp and chmod, or use the
# preferred BSD install program instead. Uncomment as appropriate if your
# system lacks install.
# INSTALL = ifunc() { chmod +xr $${@+"$$@"}; cp $${@+"$$@"}; }; ifunc
INSTALL = install
# Our libraries are I think exclusively used by us, hence we pick
# our own subdirectory.
prefix = @prefix@
exec_prefix = @exec_prefix@
INSTALLLIB = ${DESTDIR}@libdir@/staden
INSTALLBIN = ${DESTDIR}@bindir@
#INSTALLETC = ${DESTDIR}@sysconfdir@/staden
INSTALLSHARE = ${DESTDIR}@datadir@/staden
INSTALLDOC = ${DESTDIR}@datadir@/doc
INSTALLMAN = ${DESTDIR}@mandir@
INSTALLSCRIPTS = $(INSTALLSHARE)/scripts
INSTALLTCL = $(INSTALLSHARE)/tcl
# Data and etc config files are shoehorned into one place for now, as
# traditionally this all ended up in $STADTABL
INSTALLETC = $(INSTALLSHARE)/etc
INSTALLDATA = $(INSTALLSHARE)/etc
# Keep autoconf happy
datarootdir = @datarootdir@
|