diff options
author | Thomas White <taw@physics.org> | 2011-11-15 17:31:09 +0100 |
---|---|---|
committer | Thomas White <taw@physics.org> | 2012-02-22 15:27:41 +0100 |
commit | 4c65ae0588c789e9f15eb1f0c324224301082263 (patch) | |
tree | 6d06f339697dc16b8556ac2b4bd8318534497429 | |
parent | d3ec66174fbfcb3780e106ca25134fd58a45506c (diff) |
Separate CFLAGS and LIBS for libcrystfel and main
-rw-r--r-- | Makefile.am | 4 | ||||
-rw-r--r-- | Makefile.in | 8 | ||||
-rwxr-xr-x | configure | 24 | ||||
-rw-r--r-- | configure.ac | 24 | ||||
-rw-r--r-- | doc/reference/Makefile.in | 4 | ||||
-rw-r--r-- | lib/Makefile.in | 4 | ||||
-rw-r--r-- | libcrystfel/Makefile.am | 4 | ||||
-rw-r--r-- | libcrystfel/Makefile.in | 8 | ||||
-rwxr-xr-x | libtool | 2 |
9 files changed, 59 insertions, 23 deletions
diff --git a/Makefile.am b/Makefile.am index cbf0aec6..6a81a78c 100644 --- a/Makefile.am +++ b/Makefile.am @@ -27,11 +27,11 @@ if HAVE_CAIRO bin_PROGRAMS += src/render_hkl endif -AM_CFLAGS = -Wall +AM_CFLAGS = -Wall @MAIN_CFLAGS@ AM_CPPFLAGS = -DDATADIR=\""$(datadir)"\" -I$(top_builddir)/lib AM_CPPFLAGS += -I$(top_srcdir)/lib LDADD = $(top_builddir)/lib/libgnu.a @IGNORE_UNUSED_LIBRARIES_CFLAGS@ -LDADD += $(top_builddir)/libcrystfel/libcrystfel.la +LDADD += $(top_builddir)/libcrystfel/libcrystfel.la @MAIN_LIBS@ src_partial_sim_SOURCES = src/partial_sim.c diff --git a/Makefile.in b/Makefile.in index 8f6f65ed..32034377 100644 --- a/Makefile.in +++ b/Makefile.in @@ -438,6 +438,8 @@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LD = @LD@ LDFLAGS = @LDFLAGS@ +LIBCRYSTFEL_CFLAGS = @LIBCRYSTFEL_CFLAGS@ +LIBCRYSTFEL_LIBS = @LIBCRYSTFEL_LIBS@ LIBGNU_LIBDEPS = @LIBGNU_LIBDEPS@ LIBGNU_LTLIBDEPS = @LIBGNU_LTLIBDEPS@ LIBOBJS = @LIBOBJS@ @@ -446,6 +448,8 @@ LIBTOOL = @LIBTOOL@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ +MAIN_CFLAGS = @MAIN_CFLAGS@ +MAIN_LIBS = @MAIN_LIBS@ MAKEINFO = @MAKEINFO@ MKDIR_P = @MKDIR_P@ NEXT_AS_FIRST_DIRECTIVE_STDDEF_H = @NEXT_AS_FIRST_DIRECTIVE_STDDEF_H@ @@ -573,11 +577,11 @@ EXTRA_DIST = configure m4/gnulib-cache.m4 tests/first_merge_check \ scripts/indexed-filenames scripts/gen-sfs SUBDIRS = lib doc/reference libcrystfel ACLOCAL_AMFLAGS = -I m4 -AM_CFLAGS = -Wall +AM_CFLAGS = -Wall @MAIN_CFLAGS@ AM_CPPFLAGS = -DDATADIR=\""$(datadir)"\" -I$(top_builddir)/lib \ -I$(top_srcdir)/lib LDADD = $(top_builddir)/lib/libgnu.a @IGNORE_UNUSED_LIBRARIES_CFLAGS@ \ - $(top_builddir)/libcrystfel/libcrystfel.la + $(top_builddir)/libcrystfel/libcrystfel.la @MAIN_LIBS@ src_partial_sim_SOURCES = src/partial_sim.c src_pattern_sim_SOURCES = src/pattern_sim.c src/diffraction.c \ $(am__append_3) @@ -626,6 +626,10 @@ HTML_DIR GTKDOC_MKPDF GTKDOC_REBASE GTKDOC_CHECK +LIBCRYSTFEL_LIBS +MAIN_LIBS +LIBCRYSTFEL_CFLAGS +MAIN_CFLAGS HAVE_FFTW_FALSE HAVE_FFTW_TRUE HAVE_CAIRO_FALSE @@ -14076,13 +14080,21 @@ $as_echo "$gl_cv_prog_c_ignore_unused_libraries" >&6; } -CFLAGS="$CFLAGS $HDF5_CFLAGS $GSL_CFLAGS $OPENCL_CFLAGS -pthread $GTK_CFLAGS" -CFLAGS="$CFLAGS $LIBTIFF_CFLAGS -D_GNU_SOURCE $libPNG_CFLAGS $Cairo_CFLAGS" -CFLAGS="$CFLAGS $GDK_pixbuf_CFLAGS $GDK_pixbuf_2_CFLAGS $FFTW_CFLAGS" +MAIN_CFLAGS="$CFLAGS $HDF5_CFLAGS $GSL_CFLAGS $OPENCL_CFLAGS -pthread" +MAIN_CFLAGS="$MAIN_CFLAGS $GTK_CFLAGS $LIBTIFF_CFLAGS -D_GNU_SOURCE " +MAIN_CFLAGS="$MAIN_CFLAGS $libPNG_CFLAGS $Cairo_CFLAGS $GDK_pixbuf_CFLAGS" +MAIN_CFLAGS="$MAIN_CFLAGS $GDK_pixbuf_2_CFLAGS $FFTW_CFLAGS" -LIBS="$LIBS $HDF5_LIBS -lm -lz $GSL_LIBS $GTK_LIBS $OPENCL_LIBS -pthread" -LIBS="$LIBS $LIBTIFF_LIBS $libPNG_LIBS $Cairo_LIBS $GDK_pixbuf_LIBS" -LIBS="$LIBS $GDK_pixbuf_2_LIBS $TIMER_LIBS $FFTW_LIBS $LDFLAGS" + +LIBCRYSTFEL_CFLAGS="$CFLAGS $HDF5_CFLAGS $GSL_CFLAGS $FFTW_CFLAGS" + + +MAIN_LIBS="$LIBS $HDF5_LIBS -lm -lz $GSL_LIBS $GTK_LIBS $OPENCL_LIBS -pthread" +MAIN_LIBS="$MAIN_LIBS $LIBTIFF_LIBS $libPNG_LIBS $Cairo_LIBS $GDK_pixbuf_LIBS" +MAIN_LIBS="$MAIN_LIBS $GDK_pixbuf_2_LIBS $TIMER_LIBS $FFTW_LIBS $LDFLAGS" + + +LIBCRYSTFEL_LIBS="$LIBS $HDF5_LIBS $GSL_LIBS $FFTW_LIBS $LDFLAGS" diff --git a/configure.ac b/configure.ac index 1412eb7e..e9384f1e 100644 --- a/configure.ac +++ b/configure.ac @@ -253,14 +253,22 @@ AM_CONDITIONAL([HAVE_FFTW], test x$have_fftw = xtrue) gl_IGNORE_UNUSED_LIBRARIES -CFLAGS="$CFLAGS $HDF5_CFLAGS $GSL_CFLAGS $OPENCL_CFLAGS -pthread $GTK_CFLAGS" -CFLAGS="$CFLAGS $LIBTIFF_CFLAGS -D_GNU_SOURCE $libPNG_CFLAGS $Cairo_CFLAGS" -CFLAGS="$CFLAGS $GDK_pixbuf_CFLAGS $GDK_pixbuf_2_CFLAGS $FFTW_CFLAGS" - -LIBS="$LIBS $HDF5_LIBS -lm -lz $GSL_LIBS $GTK_LIBS $OPENCL_LIBS -pthread" -LIBS="$LIBS $LIBTIFF_LIBS $libPNG_LIBS $Cairo_LIBS $GDK_pixbuf_LIBS" -LIBS="$LIBS $GDK_pixbuf_2_LIBS $TIMER_LIBS $FFTW_LIBS $LDFLAGS" - +MAIN_CFLAGS="$CFLAGS $HDF5_CFLAGS $GSL_CFLAGS $OPENCL_CFLAGS -pthread" +MAIN_CFLAGS="$MAIN_CFLAGS $GTK_CFLAGS $LIBTIFF_CFLAGS -D_GNU_SOURCE " +MAIN_CFLAGS="$MAIN_CFLAGS $libPNG_CFLAGS $Cairo_CFLAGS $GDK_pixbuf_CFLAGS" +MAIN_CFLAGS="$MAIN_CFLAGS $GDK_pixbuf_2_CFLAGS $FFTW_CFLAGS" +AC_SUBST([MAIN_CFLAGS]) + +LIBCRYSTFEL_CFLAGS="$CFLAGS $HDF5_CFLAGS $GSL_CFLAGS $FFTW_CFLAGS" +AC_SUBST([LIBCRYSTFEL_CFLAGS]) + +MAIN_LIBS="$LIBS $HDF5_LIBS -lm -lz $GSL_LIBS $GTK_LIBS $OPENCL_LIBS -pthread" +MAIN_LIBS="$MAIN_LIBS $LIBTIFF_LIBS $libPNG_LIBS $Cairo_LIBS $GDK_pixbuf_LIBS" +MAIN_LIBS="$MAIN_LIBS $GDK_pixbuf_2_LIBS $TIMER_LIBS $FFTW_LIBS $LDFLAGS" +AC_SUBST([MAIN_LIBS]) + +LIBCRYSTFEL_LIBS="$LIBS $HDF5_LIBS $GSL_LIBS $FFTW_LIBS $LDFLAGS" +AC_SUBST([LIBCRYSTFEL_LIBS]) GTK_DOC_CHECK([1.11],[--flavour no-tmpl]) AC_CONFIG_MACRO_DIR(m4) diff --git a/doc/reference/Makefile.in b/doc/reference/Makefile.in index ae499829..5cdc8389 100644 --- a/doc/reference/Makefile.in +++ b/doc/reference/Makefile.in @@ -177,6 +177,8 @@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LD = @LD@ LDFLAGS = @LDFLAGS@ +LIBCRYSTFEL_CFLAGS = @LIBCRYSTFEL_CFLAGS@ +LIBCRYSTFEL_LIBS = @LIBCRYSTFEL_LIBS@ LIBGNU_LIBDEPS = @LIBGNU_LIBDEPS@ LIBGNU_LTLIBDEPS = @LIBGNU_LTLIBDEPS@ LIBOBJS = @LIBOBJS@ @@ -185,6 +187,8 @@ LIBTOOL = @LIBTOOL@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ +MAIN_CFLAGS = @MAIN_CFLAGS@ +MAIN_LIBS = @MAIN_LIBS@ MAKEINFO = @MAKEINFO@ MKDIR_P = @MKDIR_P@ NEXT_AS_FIRST_DIRECTIVE_STDDEF_H = @NEXT_AS_FIRST_DIRECTIVE_STDDEF_H@ diff --git a/lib/Makefile.in b/lib/Makefile.in index 450eb180..4214d8b9 100644 --- a/lib/Makefile.in +++ b/lib/Makefile.in @@ -259,6 +259,8 @@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LD = @LD@ LDFLAGS = @LDFLAGS@ +LIBCRYSTFEL_CFLAGS = @LIBCRYSTFEL_CFLAGS@ +LIBCRYSTFEL_LIBS = @LIBCRYSTFEL_LIBS@ LIBGNU_LIBDEPS = @LIBGNU_LIBDEPS@ LIBGNU_LTLIBDEPS = @LIBGNU_LTLIBDEPS@ LIBOBJS = @LIBOBJS@ @@ -267,6 +269,8 @@ LIBTOOL = @LIBTOOL@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ +MAIN_CFLAGS = @MAIN_CFLAGS@ +MAIN_LIBS = @MAIN_LIBS@ MAKEINFO = @MAKEINFO@ MKDIR_P = @MKDIR_P@ NEXT_AS_FIRST_DIRECTIVE_STDDEF_H = @NEXT_AS_FIRST_DIRECTIVE_STDDEF_H@ diff --git a/libcrystfel/Makefile.am b/libcrystfel/Makefile.am index e813699b..05532ab8 100644 --- a/libcrystfel/Makefile.am +++ b/libcrystfel/Makefile.am @@ -1,5 +1,5 @@ lib_LTLIBRARIES = libcrystfel.la -LDADD = $(top_builddir)/lib/libgnu.a @IGNORE_UNUSED_LIBRARIES_CFLAGS@ +LDADD = $(top_builddir)/lib/libgnu.a @LIBCRYSTFEL_LIBS@ libcrystfel_la_SOURCES = src/reflist.c src/utils.c src/cell.c src/detector.c \ src/thread-pool.c src/image.c src/hdf5-file.c \ @@ -21,4 +21,4 @@ libcrystfel_la_include_HEADERS = src/beam-parameters.h src/hdf5-file.h \ INCLUDES = "-I$(top_srcdir)/data" AM_CPPFLAGS = -DDATADIR=\""$(datadir)"\" -I$(top_builddir)/lib -AM_CPPFLAGS += -I$(top_srcdir)/lib +AM_CPPFLAGS += -I$(top_srcdir)/lib @LIBCRYSTFEL_CFLAGS@ diff --git a/libcrystfel/Makefile.in b/libcrystfel/Makefile.in index e02c47a7..734021a7 100644 --- a/libcrystfel/Makefile.in +++ b/libcrystfel/Makefile.in @@ -232,6 +232,8 @@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LD = @LD@ LDFLAGS = @LDFLAGS@ +LIBCRYSTFEL_CFLAGS = @LIBCRYSTFEL_CFLAGS@ +LIBCRYSTFEL_LIBS = @LIBCRYSTFEL_LIBS@ LIBGNU_LIBDEPS = @LIBGNU_LIBDEPS@ LIBGNU_LTLIBDEPS = @LIBGNU_LTLIBDEPS@ LIBOBJS = @LIBOBJS@ @@ -240,6 +242,8 @@ LIBTOOL = @LIBTOOL@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ +MAIN_CFLAGS = @MAIN_CFLAGS@ +MAIN_LIBS = @MAIN_LIBS@ MAKEINFO = @MAKEINFO@ MKDIR_P = @MKDIR_P@ NEXT_AS_FIRST_DIRECTIVE_STDDEF_H = @NEXT_AS_FIRST_DIRECTIVE_STDDEF_H@ @@ -346,7 +350,7 @@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ lib_LTLIBRARIES = libcrystfel.la -LDADD = $(top_builddir)/lib/libgnu.a @IGNORE_UNUSED_LIBRARIES_CFLAGS@ +LDADD = $(top_builddir)/lib/libgnu.a @LIBCRYSTFEL_LIBS@ libcrystfel_la_SOURCES = src/reflist.c src/utils.c src/cell.c src/detector.c \ src/thread-pool.c src/image.c src/hdf5-file.c \ src/beam-parameters.c src/geometry.c src/statistics.c \ @@ -366,7 +370,7 @@ libcrystfel_la_include_HEADERS = src/beam-parameters.h src/hdf5-file.h \ INCLUDES = "-I$(top_srcdir)/data" AM_CPPFLAGS = -DDATADIR=\""$(datadir)"\" -I$(top_builddir)/lib \ - -I$(top_srcdir)/lib + -I$(top_srcdir)/lib @LIBCRYSTFEL_CFLAGS@ all: all-am .SUFFIXES: @@ -138,7 +138,7 @@ lock_old_archive_extraction=no LTCC="gcc" # LTCC compiler flags. -LTCFLAGS="-g -O2 -I/usr/local/cuda/include -pthread -pthread -I/usr/include/gtk-2.0 -I/usr/lib64/gtk-2.0/include -I/usr/include/atk-1.0 -I/usr/include/cairo -I/usr/include/gdk-pixbuf-2.0 -I/usr/include/pango-1.0 -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include -I/usr/include/pixman-1 -I/usr/include/freetype2 -I/usr/include/libpng12 -D_GNU_SOURCE -I/usr/include/libpng12 -pthread -I/usr/include/cairo -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include -I/usr/include/pixman-1 -I/usr/include/freetype2 -I/usr/include/libpng12 -pthread -I/usr/include/gdk-pixbuf-2.0 -I/usr/include/libpng12 -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include " +LTCFLAGS="-g -O2" # Take the output of nm and produce a listing of raw symbols and C names. global_symbol_pipe="sed -n -e 's/^.*[ ]\\([ABCDGIRSTW][ABCDGIRSTW]*\\)[ ][ ]*\\([_A-Za-z][_A-Za-z0-9]*\\)\$/\\1 \\2 \\2/p'" |