Commit 4f37bc9813cc0b845f8b9d16dd64ce465727bf46
1 parent
cb738b25
Build as static library (in particular for profiling)
Showing
4 changed files
with
88 additions
and
74 deletions
src/Makefile.am
| 1 | 1 | ## Process this file with automake to produce Makefile.in |
| 2 | 2 | |
| 3 | -SUBDIRS = src test | |
| 3 | +files = GException.hpp GException.cpp \ | |
| 4 | + GVector.hpp GVector.cpp \ | |
| 5 | + GMatrix.hpp GMatrix.cpp \ | |
| 6 | + GSymMatrix.hpp GSymMatrix.cpp \ | |
| 7 | + GSparseMatrix.hpp GSparseMatrix.cpp \ | |
| 8 | + GSparseSymbolic.hpp GSparseSymbolic.cpp \ | |
| 9 | + GSparseNumeric.hpp GSparseNumeric.cpp | |
| 4 | 10 | |
| 11 | +# Build dynamic library | |
| 12 | +#lib_LTLIBRARIES = libgamma.la | |
| 13 | +#libgamma_la_SOURCES = $(files) | |
| 14 | +#libgamma_la_LDFLAGS = | |
| 15 | + | |
| 16 | +# Build static library | |
| 17 | +noinst_LIBRARIES = libgamma.a | |
| 18 | +libgamma_a_SOURCES = $(files) | |
| 19 | +#libgamma_a_LDFLAGS = | ... | ... |
src/Makefile.in
| ... | ... | @@ -14,7 +14,7 @@ |
| 14 | 14 | |
| 15 | 15 | @SET_MAKE@ |
| 16 | 16 | |
| 17 | -SOURCES = $(libgamma_la_SOURCES) | |
| 17 | +SOURCES = $(libgamma_a_SOURCES) | |
| 18 | 18 | |
| 19 | 19 | srcdir = @srcdir@ |
| 20 | 20 | top_srcdir = @top_srcdir@ |
| ... | ... | @@ -47,20 +47,15 @@ am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ |
| 47 | 47 | mkinstalldirs = $(install_sh) -d |
| 48 | 48 | CONFIG_HEADER = $(top_builddir)/config.h |
| 49 | 49 | CONFIG_CLEAN_FILES = |
| 50 | -am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; | |
| 51 | -am__vpath_adj = case $$p in \ | |
| 52 | - $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ | |
| 53 | - *) f=$$p;; \ | |
| 54 | - esac; | |
| 55 | -am__strip_dir = `echo $$p | sed -e 's|^.*/||'`; | |
| 56 | -am__installdirs = "$(DESTDIR)$(libdir)" | |
| 57 | -libLTLIBRARIES_INSTALL = $(INSTALL) | |
| 58 | -LTLIBRARIES = $(lib_LTLIBRARIES) | |
| 59 | -libgamma_la_LIBADD = | |
| 60 | -am__objects_1 = GException.lo GVector.lo GMatrix.lo GSymMatrix.lo \ | |
| 61 | - GSparseMatrix.lo GSparseSymbolic.lo GSparseNumeric.lo | |
| 62 | -am_libgamma_la_OBJECTS = $(am__objects_1) | |
| 63 | -libgamma_la_OBJECTS = $(am_libgamma_la_OBJECTS) | |
| 50 | +LIBRARIES = $(noinst_LIBRARIES) | |
| 51 | +ARFLAGS = cru | |
| 52 | +libgamma_a_AR = $(AR) $(ARFLAGS) | |
| 53 | +libgamma_a_LIBADD = | |
| 54 | +am__objects_1 = GException.$(OBJEXT) GVector.$(OBJEXT) \ | |
| 55 | + GMatrix.$(OBJEXT) GSymMatrix.$(OBJEXT) GSparseMatrix.$(OBJEXT) \ | |
| 56 | + GSparseSymbolic.$(OBJEXT) GSparseNumeric.$(OBJEXT) | |
| 57 | +am_libgamma_a_OBJECTS = $(am__objects_1) | |
| 58 | +libgamma_a_OBJECTS = $(am_libgamma_a_OBJECTS) | |
| 64 | 59 | DEFAULT_INCLUDES = -I. -I$(srcdir) -I$(top_builddir) |
| 65 | 60 | depcomp = |
| 66 | 61 | am__depfiles_maybe = |
| ... | ... | @@ -80,8 +75,8 @@ LTCOMPILE = $(LIBTOOL) --mode=compile --tag=CC $(CC) $(DEFS) \ |
| 80 | 75 | CCLD = $(CC) |
| 81 | 76 | LINK = $(LIBTOOL) --mode=link --tag=CC $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ |
| 82 | 77 | $(AM_LDFLAGS) $(LDFLAGS) -o $@ |
| 83 | -SOURCES = $(libgamma_la_SOURCES) | |
| 84 | -DIST_SOURCES = $(libgamma_la_SOURCES) | |
| 78 | +SOURCES = $(libgamma_a_SOURCES) | |
| 79 | +DIST_SOURCES = $(libgamma_a_SOURCES) | |
| 85 | 80 | ETAGS = etags |
| 86 | 81 | CTAGS = ctags |
| 87 | 82 | DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) |
| ... | ... | @@ -182,8 +177,15 @@ files = GException.hpp GException.cpp \ |
| 182 | 177 | GSparseSymbolic.hpp GSparseSymbolic.cpp \ |
| 183 | 178 | GSparseNumeric.hpp GSparseNumeric.cpp |
| 184 | 179 | |
| 185 | -lib_LTLIBRARIES = libgamma.la | |
| 186 | -libgamma_la_SOURCES = $(files) | |
| 180 | + | |
| 181 | +# Build dynamic library | |
| 182 | +#lib_LTLIBRARIES = libgamma.la | |
| 183 | +#libgamma_la_SOURCES = $(files) | |
| 184 | +#libgamma_la_LDFLAGS = | |
| 185 | + | |
| 186 | +# Build static library | |
| 187 | +noinst_LIBRARIES = libgamma.a | |
| 188 | +libgamma_a_SOURCES = $(files) | |
| 187 | 189 | all: all-am |
| 188 | 190 | |
| 189 | 191 | .SUFFIXES: |
| ... | ... | @@ -217,35 +219,13 @@ $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) |
| 217 | 219 | cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh |
| 218 | 220 | $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) |
| 219 | 221 | cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh |
| 220 | -install-libLTLIBRARIES: $(lib_LTLIBRARIES) | |
| 221 | - @$(NORMAL_INSTALL) | |
| 222 | - test -z "$(libdir)" || $(mkdir_p) "$(DESTDIR)$(libdir)" | |
| 223 | - @list='$(lib_LTLIBRARIES)'; for p in $$list; do \ | |
| 224 | - if test -f $$p; then \ | |
| 225 | - f=$(am__strip_dir) \ | |
| 226 | - echo " $(LIBTOOL) --mode=install $(libLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) '$$p' '$(DESTDIR)$(libdir)/$$f'"; \ | |
| 227 | - $(LIBTOOL) --mode=install $(libLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) "$$p" "$(DESTDIR)$(libdir)/$$f"; \ | |
| 228 | - else :; fi; \ | |
| 229 | - done | |
| 230 | - | |
| 231 | -uninstall-libLTLIBRARIES: | |
| 232 | - @$(NORMAL_UNINSTALL) | |
| 233 | - @set -x; list='$(lib_LTLIBRARIES)'; for p in $$list; do \ | |
| 234 | - p=$(am__strip_dir) \ | |
| 235 | - echo " $(LIBTOOL) --mode=uninstall rm -f '$(DESTDIR)$(libdir)/$$p'"; \ | |
| 236 | - $(LIBTOOL) --mode=uninstall rm -f "$(DESTDIR)$(libdir)/$$p"; \ | |
| 237 | - done | |
| 238 | 222 | |
| 239 | -clean-libLTLIBRARIES: | |
| 240 | - -test -z "$(lib_LTLIBRARIES)" || rm -f $(lib_LTLIBRARIES) | |
| 241 | - @list='$(lib_LTLIBRARIES)'; for p in $$list; do \ | |
| 242 | - dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ | |
| 243 | - test "$$dir" != "$$p" || dir=.; \ | |
| 244 | - echo "rm -f \"$${dir}/so_locations\""; \ | |
| 245 | - rm -f "$${dir}/so_locations"; \ | |
| 246 | - done | |
| 247 | -libgamma.la: $(libgamma_la_OBJECTS) $(libgamma_la_DEPENDENCIES) | |
| 248 | - $(CXXLINK) -rpath $(libdir) $(libgamma_la_LDFLAGS) $(libgamma_la_OBJECTS) $(libgamma_la_LIBADD) $(LIBS) | |
| 223 | +clean-noinstLIBRARIES: | |
| 224 | + -test -z "$(noinst_LIBRARIES)" || rm -f $(noinst_LIBRARIES) | |
| 225 | +libgamma.a: $(libgamma_a_OBJECTS) $(libgamma_a_DEPENDENCIES) | |
| 226 | + -rm -f libgamma.a | |
| 227 | + $(libgamma_a_AR) libgamma.a $(libgamma_a_OBJECTS) $(libgamma_a_LIBADD) | |
| 228 | + $(RANLIB) libgamma.a | |
| 249 | 229 | |
| 250 | 230 | mostlyclean-compile: |
| 251 | 231 | -rm -f *.$(OBJEXT) |
| ... | ... | @@ -349,11 +329,8 @@ distdir: $(DISTFILES) |
| 349 | 329 | done |
| 350 | 330 | check-am: all-am |
| 351 | 331 | check: check-am |
| 352 | -all-am: Makefile $(LTLIBRARIES) | |
| 332 | +all-am: Makefile $(LIBRARIES) | |
| 353 | 333 | installdirs: |
| 354 | - for dir in "$(DESTDIR)$(libdir)"; do \ | |
| 355 | - test -z "$$dir" || $(mkdir_p) "$$dir"; \ | |
| 356 | - done | |
| 357 | 334 | install: install-am |
| 358 | 335 | install-exec: install-exec-am |
| 359 | 336 | install-data: install-data-am |
| ... | ... | @@ -380,7 +357,7 @@ maintainer-clean-generic: |
| 380 | 357 | @echo "it deletes files that may require special tools to rebuild." |
| 381 | 358 | clean: clean-am |
| 382 | 359 | |
| 383 | -clean-am: clean-generic clean-libLTLIBRARIES clean-libtool \ | |
| 360 | +clean-am: clean-generic clean-libtool clean-noinstLIBRARIES \ | |
| 384 | 361 | mostlyclean-am |
| 385 | 362 | |
| 386 | 363 | distclean: distclean-am |
| ... | ... | @@ -400,7 +377,7 @@ info-am: |
| 400 | 377 | |
| 401 | 378 | install-data-am: |
| 402 | 379 | |
| 403 | -install-exec-am: install-libLTLIBRARIES | |
| 380 | +install-exec-am: | |
| 404 | 381 | |
| 405 | 382 | install-info: install-info-am |
| 406 | 383 | |
| ... | ... | @@ -425,21 +402,21 @@ ps: ps-am |
| 425 | 402 | |
| 426 | 403 | ps-am: |
| 427 | 404 | |
| 428 | -uninstall-am: uninstall-info-am uninstall-libLTLIBRARIES | |
| 405 | +uninstall-am: uninstall-info-am | |
| 429 | 406 | |
| 430 | 407 | .PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ |
| 431 | - clean-libLTLIBRARIES clean-libtool ctags distclean \ | |
| 408 | + clean-libtool clean-noinstLIBRARIES ctags distclean \ | |
| 432 | 409 | distclean-compile distclean-generic distclean-libtool \ |
| 433 | 410 | distclean-tags distdir dvi dvi-am html html-am info info-am \ |
| 434 | 411 | install install-am install-data install-data-am install-exec \ |
| 435 | - install-exec-am install-info install-info-am \ | |
| 436 | - install-libLTLIBRARIES install-man install-strip installcheck \ | |
| 437 | - installcheck-am installdirs maintainer-clean \ | |
| 438 | - maintainer-clean-generic mostlyclean mostlyclean-compile \ | |
| 439 | - mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ | |
| 440 | - tags uninstall uninstall-am uninstall-info-am \ | |
| 441 | - uninstall-libLTLIBRARIES | |
| 442 | - | |
| 412 | + install-exec-am install-info install-info-am install-man \ | |
| 413 | + install-strip installcheck installcheck-am installdirs \ | |
| 414 | + maintainer-clean maintainer-clean-generic mostlyclean \ | |
| 415 | + mostlyclean-compile mostlyclean-generic mostlyclean-libtool \ | |
| 416 | + pdf pdf-am ps ps-am tags uninstall uninstall-am \ | |
| 417 | + uninstall-info-am | |
| 418 | + | |
| 419 | +#libgamma_a_LDFLAGS = | |
| 443 | 420 | # Tell versions [3.59,3.63) of GNU make to not export all variables. |
| 444 | 421 | # Otherwise a system limit (for SysV at least) may be exceeded. |
| 445 | 422 | .NOEXPORT: | ... | ... |
test/Makefile.am
| 1 | 1 | ## Process this file with automake to produce Makefile.in |
| 2 | 2 | |
| 3 | -SUBDIRS = src test | |
| 4 | - | |
| 3 | +check_PROGRAMS = test_GVector \ | |
| 4 | + test_GMatrix \ | |
| 5 | + test_GSymMatrix \ | |
| 6 | + test_GSparseMatrix | |
| 7 | +TESTS = test_GVector \ | |
| 8 | + test_GMatrix \ | |
| 9 | + test_GSymMatrix \ | |
| 10 | + test_GSparseMatrix | |
| 11 | +test_GVector_SOURCES = test_GVector.cpp | |
| 12 | +#test_GVector_LDADD = ../src/libgamma.la | |
| 13 | +test_GVector_LDADD = ../src/libgamma.a | |
| 14 | +test_GMatrix_SOURCES = test_GMatrix.cpp | |
| 15 | +#test_GMatrix_LDADD = ../src/libgamma.la | |
| 16 | +test_GMatrix_LDADD = ../src/libgamma.a | |
| 17 | +test_GSymMatrix_SOURCES = test_GSymMatrix.cpp | |
| 18 | +#test_GSymMatrix_LDADD = ../src/libgamma.la | |
| 19 | +test_GSymMatrix_LDADD = ../src/libgamma.a | |
| 20 | +test_GSparseMatrix_SOURCES = test_GSparseMatrix.cpp | |
| 21 | +#test_GSparseMatrix_LDADD = ../src/libgamma.la | |
| 22 | +test_GSparseMatrix_LDADD = ../src/libgamma.a | ... | ... |
test/Makefile.in
| ... | ... | @@ -50,16 +50,16 @@ CONFIG_HEADER = $(top_builddir)/config.h |
| 50 | 50 | CONFIG_CLEAN_FILES = |
| 51 | 51 | am_test_GMatrix_OBJECTS = test_GMatrix.$(OBJEXT) |
| 52 | 52 | test_GMatrix_OBJECTS = $(am_test_GMatrix_OBJECTS) |
| 53 | -test_GMatrix_DEPENDENCIES = ../src/libgamma.la | |
| 53 | +test_GMatrix_DEPENDENCIES = ../src/libgamma.a | |
| 54 | 54 | am_test_GSparseMatrix_OBJECTS = test_GSparseMatrix.$(OBJEXT) |
| 55 | 55 | test_GSparseMatrix_OBJECTS = $(am_test_GSparseMatrix_OBJECTS) |
| 56 | -test_GSparseMatrix_DEPENDENCIES = ../src/libgamma.la | |
| 56 | +test_GSparseMatrix_DEPENDENCIES = ../src/libgamma.a | |
| 57 | 57 | am_test_GSymMatrix_OBJECTS = test_GSymMatrix.$(OBJEXT) |
| 58 | 58 | test_GSymMatrix_OBJECTS = $(am_test_GSymMatrix_OBJECTS) |
| 59 | -test_GSymMatrix_DEPENDENCIES = ../src/libgamma.la | |
| 59 | +test_GSymMatrix_DEPENDENCIES = ../src/libgamma.a | |
| 60 | 60 | am_test_GVector_OBJECTS = test_GVector.$(OBJEXT) |
| 61 | 61 | test_GVector_OBJECTS = $(am_test_GVector_OBJECTS) |
| 62 | -test_GVector_DEPENDENCIES = ../src/libgamma.la | |
| 62 | +test_GVector_DEPENDENCIES = ../src/libgamma.a | |
| 63 | 63 | DEFAULT_INCLUDES = -I. -I$(srcdir) -I$(top_builddir) |
| 64 | 64 | depcomp = |
| 65 | 65 | am__depfiles_maybe = |
| ... | ... | @@ -173,13 +173,17 @@ TESTS = test_GVector \ |
| 173 | 173 | test_GSparseMatrix |
| 174 | 174 | |
| 175 | 175 | test_GVector_SOURCES = test_GVector.cpp |
| 176 | -test_GVector_LDADD = ../src/libgamma.la | |
| 176 | +#test_GVector_LDADD = ../src/libgamma.la | |
| 177 | +test_GVector_LDADD = ../src/libgamma.a | |
| 177 | 178 | test_GMatrix_SOURCES = test_GMatrix.cpp |
| 178 | -test_GMatrix_LDADD = ../src/libgamma.la | |
| 179 | +#test_GMatrix_LDADD = ../src/libgamma.la | |
| 180 | +test_GMatrix_LDADD = ../src/libgamma.a | |
| 179 | 181 | test_GSymMatrix_SOURCES = test_GSymMatrix.cpp |
| 180 | -test_GSymMatrix_LDADD = ../src/libgamma.la | |
| 182 | +#test_GSymMatrix_LDADD = ../src/libgamma.la | |
| 183 | +test_GSymMatrix_LDADD = ../src/libgamma.a | |
| 181 | 184 | test_GSparseMatrix_SOURCES = test_GSparseMatrix.cpp |
| 182 | -test_GSparseMatrix_LDADD = ../src/libgamma.la | |
| 185 | +#test_GSparseMatrix_LDADD = ../src/libgamma.la | |
| 186 | +test_GSparseMatrix_LDADD = ../src/libgamma.a | |
| 183 | 187 | all: all-am |
| 184 | 188 | |
| 185 | 189 | .SUFFIXES: | ... | ... |