diff --git a/lib/Makefile.am b/lib/Makefile.am index 61b4c9bde..9926a6ba4 100644 --- a/lib/Makefile.am +++ b/lib/Makefile.am @@ -5,7 +5,7 @@ if ENABLE_MCLIB tr '.' ' '| \ while read v1 v2 v3; do echo $$v2':'$$v3':'$$v1; done` - libmc_la_LDFLAGS=-no-undefined -version-info $(LIB_VERSION) -release $(LIBMC_RELEASE) + AM_LDFLAGS=-no-undefined -version-info $(LIB_VERSION) -release $(LIBMC_RELEASE) lib_LTLIBRARIES = libmc.la else @@ -50,7 +50,7 @@ if CHARSET libmc_la_SOURCES += charsets.c charsets.h endif -libmc_la_CFLAGS= $(GLIB_CFLAGS) -I$(top_srcdir) $(PCRE_CFLAGS) +AM_CFLAGS= $(GLIB_CFLAGS) -I$(top_srcdir) $(PCRE_CFLAGS) libmc_la_LIBADD = \ event/libmcevent.la \ @@ -72,4 +72,3 @@ else endif libmc_la_LIBADD += $(PCRE_LIBS) $(LIBICONV) $(INTLLIBS) - diff --git a/lib/event/Makefile.am b/lib/event/Makefile.am index 7893ef5e4..bd1f8a0dd 100644 --- a/lib/event/Makefile.am +++ b/lib/event/Makefile.am @@ -7,6 +7,8 @@ libmcevent_la_SOURCES = \ manage.c \ raise.c -libmcevent_la_CFLAGS=-I$(top_srcdir) \ - $(GLIB_CFLAGS) $(PCRE_CFLAGS) \ - -DDATADIR=\""$(pkgdatadir)/"\" -DLOCALEDIR=\""$(localedir)"\" +AM_CPPFLAGS = \ + -DDATADIR=\""$(pkgdatadir)/"\" \ + -DLOCALEDIR=\""$(localedir)"\" + +AM_CFLAGS = -I$(top_srcdir) $(GLIB_CFLAGS) $(PCRE_CFLAGS) diff --git a/lib/filehighlight/Makefile.am b/lib/filehighlight/Makefile.am index c42f02b90..99f1299ea 100644 --- a/lib/filehighlight/Makefile.am +++ b/lib/filehighlight/Makefile.am @@ -6,6 +6,8 @@ libmcfilehighlight_la_SOURCES = \ ini-file-read.c \ internal.h -libmcfilehighlight_la_CFLAGS = -I$(top_srcdir) \ - $(GLIB_CFLAGS) $(PCRE_CFLAGS) \ - -DDATADIR=\""$(pkgdatadir)/"\" -DLOCALEDIR=\""$(localedir)"\" +AM_CPPFLAGS = \ + -DDATADIR=\""$(pkgdatadir)/"\" \ + -DLOCALEDIR=\""$(localedir)"\" + +AM_CFLAGS = -I$(top_srcdir) $(GLIB_CFLAGS) $(PCRE_CFLAGS) diff --git a/lib/mcconfig/Makefile.am b/lib/mcconfig/Makefile.am index e13334c92..a504ff9cf 100644 --- a/lib/mcconfig/Makefile.am +++ b/lib/mcconfig/Makefile.am @@ -7,6 +7,7 @@ libmcconfig_la_SOURCES = \ set.c \ paths.c -libmcconfig_la_CFLAGS = -I$(top_srcdir) \ - $(GLIB_CFLAGS) \ +AM_CPPFLAGS = \ -DLOCALEDIR=\""$(localedir)"\" + +AM_CFLAGS = -I$(top_srcdir) $(GLIB_CFLAGS) diff --git a/lib/search/Makefile.am b/lib/search/Makefile.am index a89fbcd42..05e469b54 100644 --- a/lib/search/Makefile.am +++ b/lib/search/Makefile.am @@ -9,6 +9,8 @@ libsearch_la_SOURCES = \ glob.c \ hex.c -libsearch_la_CFLAGS = -I$(top_srcdir) \ - $(GLIB_CFLAGS) \ - -DDATADIR=\""$(pkgdatadir)/"\" -DLOCALEDIR=\""$(localedir)"\" $(PCRE_CFLAGS) +AM_CPPFLAGS = \ + -DDATADIR=\""$(pkgdatadir)/"\" \ + -DLOCALEDIR=\""$(localedir)"\" + +AM_CFLAGS = -I$(top_srcdir) $(GLIB_CFLAGS) $(PCRE_CFLAGS) diff --git a/lib/skin/Makefile.am b/lib/skin/Makefile.am index ece594231..6eba29824 100644 --- a/lib/skin/Makefile.am +++ b/lib/skin/Makefile.am @@ -9,6 +9,8 @@ libmcskin_la_SOURCES = \ lines.c \ internal.h -libmcskin_la_CFLAGS = -I$(top_srcdir) \ - $(GLIB_CFLAGS) $(PCRE_CFLAGS) \ - -DDATADIR=\""$(pkgdatadir)/"\" -DLOCALEDIR=\""$(localedir)"\" +AM_CPPFLAGS = \ + -DDATADIR=\""$(pkgdatadir)/"\" \ + -DLOCALEDIR=\""$(localedir)"\" + +AM_CFLAGS = -I$(top_srcdir) $(GLIB_CFLAGS) $(PCRE_CFLAGS) diff --git a/lib/strutil/Makefile.am b/lib/strutil/Makefile.am index e7aceaf59..9c36a1977 100644 --- a/lib/strutil/Makefile.am +++ b/lib/strutil/Makefile.am @@ -8,6 +8,4 @@ libmcstrutil_la_SOURCES = \ strutilutf8.c \ strverscmp.c - - -libmcstrutil_la_CFLAGS = -I$(top_srcdir) $(GLIB_CFLAGS) +AM_CFLAGS = -I$(top_srcdir) $(GLIB_CFLAGS) diff --git a/lib/tty/Makefile.am b/lib/tty/Makefile.am index 9cade4b2c..300d4e295 100644 --- a/lib/tty/Makefile.am +++ b/lib/tty/Makefile.am @@ -22,13 +22,15 @@ TTY_SRC = \ libmctty_la_SOURCES = $(TTY_SRC) $(TTY_SCREEN_SRC) -libmctty_la_CFLAGS = -I$(top_srcdir) +AM_CPPFLAGS = \ + -DDATADIR=\""$(pkgdatadir)/"\" \ + -DLOCALEDIR=\""$(localedir)"\" + +AM_CFLAGS = -I$(top_srcdir) if HAVE_GMODULE -libmctty_la_CFLAGS += $(GMODULE_CFLAGS) +AM_CFLAGS += $(GMODULE_CFLAGS) else -libmctty_la_CFLAGS += $(GLIB_CFLAGS) - +AM_CFLAGS += $(GLIB_CFLAGS) endif -libmctty_la_CFLAGS += -DDATADIR=\""$(pkgdatadir)/"\" -DLOCALEDIR=\""$(localedir)"\" diff --git a/lib/widget/Makefile.am b/lib/widget/Makefile.am index b68c8cf0e..748294f05 100644 --- a/lib/widget/Makefile.am +++ b/lib/widget/Makefile.am @@ -22,6 +22,8 @@ libmcwidget_la_SOURCES = \ widget-common.c widget-common.h \ wtools.c wtools.h -libmcwidget_la_CFLAGS = -I$(top_srcdir) \ - $(GLIB_CFLAGS) $(PCRE_CFLAGS) \ - -DDATADIR=\""$(pkgdatadir)/"\" -DLOCALEDIR=\""$(localedir)"\" +AM_CPPFLAGS = \ + -DDATADIR=\""$(pkgdatadir)/"\" \ + -DLOCALEDIR=\""$(localedir)"\" + +AM_CFLAGS = -I$(top_srcdir) $(GLIB_CFLAGS) $(PCRE_CFLAGS) diff --git a/src/Makefile.am b/src/Makefile.am index ada0214ba..8630b52db 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -19,7 +19,7 @@ SUBDIRS += consaver AM_CPPFLAGS += -DSAVERDIR=\""$(pkglibexecdir)"\" endif -AM_CFLAGS = $(GLIB_CFLAGS) -I$(top_srcdir) $(PCRE_CFLAGS) +AM_CFLAGS = -I$(top_srcdir) $(GLIB_CFLAGS) $(PCRE_CFLAGS) localedir = $(datadir)/locale pkglibexecdir = $(libexecdir)/@PACKAGE@ diff --git a/src/consaver/Makefile.am b/src/consaver/Makefile.am index 982886eac..2800dbbf4 100644 --- a/src/consaver/Makefile.am +++ b/src/consaver/Makefile.am @@ -4,4 +4,4 @@ pkglibexec_PROGRAMS = cons.saver cons_saver_SOURCES = cons.saver.c -cons_saver_CFLAGS= -I$(top_srcdir) +AM_CFLAGS= -I$(top_srcdir) diff --git a/src/diffviewer/Makefile.am b/src/diffviewer/Makefile.am index 2ec3dc7bd..bbe2bb862 100644 --- a/src/diffviewer/Makefile.am +++ b/src/diffviewer/Makefile.am @@ -5,9 +5,10 @@ libdiffviewer_la_SOURCES = \ search.c \ ydiff.c ydiff.h +AM_CPPFLAGS = \ + -DDATADIR=\""$(pkgdatadir)/"\" \ + -DLOCALEDIR=\""$(localedir)"\" -libdiffviewer_la_CFLAGS = -I$(top_srcdir) \ - $(GLIB_CFLAGS) $(PCRE_CFLAGS) \ - -DDATADIR=\""$(pkgdatadir)/"\" -DLOCALEDIR=\""$(localedir)"\" +AM_CFLAGS = -I$(top_srcdir) $(GLIB_CFLAGS) $(PCRE_CFLAGS) libdiffviewer_la_LIBADD = ../../lib/libmc.la diff --git a/src/editor/Makefile.am b/src/editor/Makefile.am index b66e76e22..29ace6709 100644 --- a/src/editor/Makefile.am +++ b/src/editor/Makefile.am @@ -21,4 +21,4 @@ libedit_la_SOURCES += \ endif endif -libedit_la_CFLAGS = $(GLIB_CFLAGS) -I$(top_srcdir) $(PCRE_CFLAGS) +AM_CFLAGS = $(GLIB_CFLAGS) -I$(top_srcdir) $(PCRE_CFLAGS) diff --git a/src/filemanager/Makefile.am b/src/filemanager/Makefile.am index 1e1652bdd..dd6ef02e8 100644 --- a/src/filemanager/Makefile.am +++ b/src/filemanager/Makefile.am @@ -31,8 +31,10 @@ libmcfilemanager_la_SOURCES = \ libmcfilemanager_la_SOURCES += mountlist.c mountlist.h #endif -libmcfilemanager_la_CFLAGS = -I$(top_srcdir) \ - $(GLIB_CFLAGS) $(PCRE_CFLAGS) \ - -DDATADIR=\""$(pkgdatadir)/"\" -DLOCALEDIR=\""$(localedir)"\" +AM_CPPFLAGS = \ + -DDATADIR=\""$(pkgdatadir)/"\" \ + -DLOCALEDIR=\""$(localedir)"\" + +AM_CFLAGS = -I$(top_srcdir) $(GLIB_CFLAGS) $(PCRE_CFLAGS) libmcfilemanager_la_LIBADD = ../../lib/libmc.la diff --git a/src/vfs/cpio/Makefile.am b/src/vfs/cpio/Makefile.am index c6feef56d..987662527 100644 --- a/src/vfs/cpio/Makefile.am +++ b/src/vfs/cpio/Makefile.am @@ -1,5 +1,4 @@ AM_CFLAGS = $(GLIB_CFLAGS) -I$(top_srcdir) -AM_CPPFLAGS = noinst_LTLIBRARIES = libvfs-cpio.la diff --git a/src/vfs/extfs/Makefile.am b/src/vfs/extfs/Makefile.am index e86e56d4a..e68cce27b 100644 --- a/src/vfs/extfs/Makefile.am +++ b/src/vfs/extfs/Makefile.am @@ -1,8 +1,8 @@ SUBDIRS = helpers DIST_SUBDIRS = helpers -AM_CFLAGS = $(GLIB_CFLAGS) -I$(top_srcdir) AM_CPPFLAGS = -DLIBEXECDIR=\""$(libexecdir)/@PACKAGE@/"\" +AM_CFLAGS = $(GLIB_CFLAGS) -I$(top_srcdir) noinst_LTLIBRARIES = libvfs-extfs.la diff --git a/src/vfs/fish/Makefile.am b/src/vfs/fish/Makefile.am index 5a8035ae8..d982cbd84 100644 --- a/src/vfs/fish/Makefile.am +++ b/src/vfs/fish/Makefile.am @@ -1,8 +1,8 @@ SUBDIRS = helpers DIST_SUBDIRS = helpers -AM_CFLAGS = $(GLIB_CFLAGS) -I$(top_srcdir) AM_CPPFLAGS = -DLIBEXECDIR=\""$(libexecdir)/@PACKAGE@/"\" +AM_CFLAGS = $(GLIB_CFLAGS) -I$(top_srcdir) noinst_LTLIBRARIES = libvfs-fish.la diff --git a/src/vfs/ftpfs/Makefile.am b/src/vfs/ftpfs/Makefile.am index 1dc0ad17b..69af7ba43 100644 --- a/src/vfs/ftpfs/Makefile.am +++ b/src/vfs/ftpfs/Makefile.am @@ -1,5 +1,4 @@ AM_CFLAGS = $(GLIB_CFLAGS) -I$(top_srcdir) -AM_CPPFLAGS = noinst_LTLIBRARIES = libvfs-ftpfs.la diff --git a/src/vfs/local/Makefile.am b/src/vfs/local/Makefile.am index 0643304ec..aec17d3d5 100644 --- a/src/vfs/local/Makefile.am +++ b/src/vfs/local/Makefile.am @@ -1,5 +1,4 @@ AM_CFLAGS = $(GLIB_CFLAGS) -I$(top_srcdir) -AM_CPPFLAGS = noinst_LTLIBRARIES = libvfs-local.la diff --git a/src/vfs/sfs/Makefile.am b/src/vfs/sfs/Makefile.am index d38dcd282..50d81c9e1 100644 --- a/src/vfs/sfs/Makefile.am +++ b/src/vfs/sfs/Makefile.am @@ -1,5 +1,4 @@ AM_CFLAGS = $(GLIB_CFLAGS) -I$(top_srcdir) -AM_CPPFLAGS = noinst_LTLIBRARIES = libvfs-sfs.la diff --git a/src/vfs/sftpfs/Makefile.am b/src/vfs/sftpfs/Makefile.am index a53e4cac9..97e07c7a1 100644 --- a/src/vfs/sftpfs/Makefile.am +++ b/src/vfs/sftpfs/Makefile.am @@ -1,5 +1,4 @@ AM_CFLAGS = $(GLIB_CFLAGS) $(LIBSSH_CFLAGS) -I$(top_srcdir) -AM_CPPFLAGS = noinst_LTLIBRARIES = libvfs-sftpfs.la diff --git a/src/vfs/smbfs/Makefile.am b/src/vfs/smbfs/Makefile.am index 70a8a510d..132838afa 100644 --- a/src/vfs/smbfs/Makefile.am +++ b/src/vfs/smbfs/Makefile.am @@ -2,8 +2,8 @@ DIST_SUBDIRS = SUBDIRS = helpers -AM_CFLAGS = $(GLIB_CFLAGS) -I$(top_srcdir) -DCONFIGDIR=\""@smbconfigdir@"\" -AM_CPPFLAGS = +AM_CPPFLAGS = -DCONFIGDIR=\""@smbconfigdir@"\" +AM_CFLAGS = $(GLIB_CFLAGS) -I$(top_srcdir) noinst_LTLIBRARIES = libvfs-smbfs.la diff --git a/src/vfs/tar/Makefile.am b/src/vfs/tar/Makefile.am index 6a2c9d451..4b79c295e 100644 --- a/src/vfs/tar/Makefile.am +++ b/src/vfs/tar/Makefile.am @@ -1,5 +1,4 @@ AM_CFLAGS = $(GLIB_CFLAGS) -I$(top_srcdir) -AM_CPPFLAGS = noinst_LTLIBRARIES = libvfs-tar.la diff --git a/src/vfs/undelfs/Makefile.am b/src/vfs/undelfs/Makefile.am index 83df9c69d..f0e70095a 100644 --- a/src/vfs/undelfs/Makefile.am +++ b/src/vfs/undelfs/Makefile.am @@ -1,5 +1,4 @@ AM_CFLAGS = $(GLIB_CFLAGS) -I$(top_srcdir) -AM_CPPFLAGS = noinst_LTLIBRARIES = libvfs-undelfs.la diff --git a/src/viewer/Makefile.am b/src/viewer/Makefile.am index 7bec2fd91..cab509257 100644 --- a/src/viewer/Makefile.am +++ b/src/viewer/Makefile.am @@ -19,8 +19,10 @@ libmcviewer_la_SOURCES = \ plain.c \ search.c -libmcviewer_la_CFLAGS = -I$(top_srcdir) \ - $(GLIB_CFLAGS) $(PCRE_CFLAGS) \ - -DDATADIR=\""$(pkgdatadir)/"\" -DLOCALEDIR=\""$(localedir)"\" +AM_CPPFLAGS = \ + -DDATADIR=\""$(pkgdatadir)/"\" \ + -DLOCALEDIR=\""$(localedir)"\" -libmcviewer_la_LIBADD = ../../lib/libmc.la \ No newline at end of file +AM_CFLAGS = -I$(top_srcdir) $(GLIB_CFLAGS) $(PCRE_CFLAGS) + +libmcviewer_la_LIBADD = ../../lib/libmc.la diff --git a/tests/lib/mcconfig/Makefile.am b/tests/lib/mcconfig/Makefile.am index c7060034c..a0fc8a0ef 100644 --- a/tests/lib/mcconfig/Makefile.am +++ b/tests/lib/mcconfig/Makefile.am @@ -1,5 +1,6 @@ -AM_CFLAGS = $(GLIB_CFLAGS) -I$(top_srcdir) @CHECK_CFLAGS@ \ - -DWORKDIR=\"$(abs_builddir)\" + +AM_CPPFLAGS = -DWORKDIR=\"$(abs_builddir)\" +AM_CFLAGS = -I$(top_srcdir) $(GLIB_CFLAGS) @CHECK_CFLAGS@ AM_LDFLAGS = -Wl,-z,muldefs diff --git a/tests/lib/vfs/Makefile.am b/tests/lib/vfs/Makefile.am index 4114e7063..d48b182c0 100644 --- a/tests/lib/vfs/Makefile.am +++ b/tests/lib/vfs/Makefile.am @@ -1,5 +1,6 @@ -AM_CFLAGS = -I$(top_srcdir)/lib/vfs $(GLIB_CFLAGS) -I$(top_srcdir) @CHECK_CFLAGS@ \ - -DTEST_SHARE_DIR=\"$(abs_srcdir)\" + +AM_CPPFLAGS = -DTEST_SHARE_DIR=\"$(abs_srcdir)\" +AM_CFLAGS = -I$(top_srcdir) -I$(top_srcdir)/lib/vfs $(GLIB_CFLAGS) @CHECK_CFLAGS@ AM_LDFLAGS = -Wl,-z,muldefs