### -*-makefile-*- ### ### Common definitions for build scripts ### ### (c) 2013 Straylight/Edgeware ### ###----- Licensing notice --------------------------------------------------- ### ### This file is part of Catacomb. ### ### Catacomb is free software; you can redistribute it and/or modify ### it under the terms of the GNU Library General Public License as ### published by the Free Software Foundation; either version 2 of the ### License, or (at your option) any later version. ### ### Catacomb 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 Library General Public License for more details. ### ### You should have received a copy of the GNU Library General Public ### License along with Catacomb; if not, write to the Free ### Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, ### MA 02111-1307, USA. ###-------------------------------------------------------------------------- ### Miscellaneous useful definitions. ## Some convenient abbreviations for file suffixes. e = $(EXEEXT) o = $(OBJEXT) t = t$e ## Installation directories. archincludedir = $(pkglibdir)/include ###-------------------------------------------------------------------------- ### Initial values of common variables. EXTRA_DIST = CLEANFILES = DISTCLEANFILES = MAINTAINERCLEANFILES = SUFFIXES = TESTS = BUILT_SOURCES = EXTRA_PROGRAMS = noinst_PROGRAMS = check_PROGRAMS = pkginclude_HEADERS = nodist_pkginclude_HEADERS = archinclude_HEADERS = nodist_archinclude_HEADERS = ###-------------------------------------------------------------------------- ### Machinery for precomputations. ## Location of precomputed tables. precomp = $(top_srcdir)/precomp ## Precomputed source code files. PRECOMPS = EXTRA_DIST += $(PRECOMPS) BUILT_SOURCES += $(PRECOMPS) MAINTAINERCLEANFILES += $(PRECOMPS) ## Programs which make the tables. These should be made by an explicit ## recursive `make' call in the relevant rule, so that we don't try to ## reconstruct them unnecessarily. PRECOMP_PROGS = EXTRA_PROGRAMS += $(PRECOMP_PROGS) CLEANFILES += $(PRECOMP_PROGS) ###-------------------------------------------------------------------------- ### Standard configuration substitutions. ## Substitute tags in files. confsubst = $(top_srcdir)/config/confsubst SUBSTITUTIONS = \ prefix=$(prefix) exec_prefix=$(exec_prefix) \ libdir=$(libdir) includedir=$(includedir) \ PACKAGE=$(PACKAGE) VERSION=$(VERSION) \ CATACOMB_LIBS="$(CATACOMB_LIBS)" V_SUBST = $(V_SUBST_$(V)) V_SUBST_ = $(V_SUBST_$(AM_DEFAULT_VERBOSITY)) V_SUBST_0 = @echo " SUBST $@"; SUBST = $(V_SUBST)$(confsubst) ###-------------------------------------------------------------------------- ### Include path. CATACOMB_INCLUDES = \ -I$(top_srcdir) \ -I$(precomp) \ -I$(top_srcdir)/base \ -I$(top_srcdir)/key \ -I$(top_srcdir)/math \ -I$(top_builddir)/math \ -I$(top_srcdir)/misc \ -I$(top_srcdir)/pub \ -I$(top_srcdir)/rand \ -I$(top_srcdir)/symm \ -I$(top_srcdir)/symm/modes -I$(top_builddir)/symm/modes AM_CPPFLAGS = $(CATACOMB_INCLUDES) ###-------------------------------------------------------------------------- ### Testing. SUFFIXES += .c .$t .to .c.to: $(AM_V_CC)$(COMPILE) -c -DTEST_RIG -DSRCDIR=\"$(srcdir)\" $< -o $@ .to.$t: libcatacomb.la $(AM_V_CCLD)$(LINK) $< \ $(TEST_LIBS) $(top_builddir)/libcatacomb.la \ $(mLib_LIBS) $(CATACOMB_LIBS) $(LIBS) .PRECIOUS: %.to CLEANFILES += *.to *.$t ###----- That's all, folks --------------------------------------------------