diff --git a/src/Makefile.am b/src/Makefile.am index e883ab4bd..11eb2f2d7 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -52,8 +52,15 @@ libinternal_la_LIBADD = \ $(DIFFLIB) $(EDITLIB) $(SUBSHELLLIB) mc_LDADD = \ - libinternal.la \ + libinternal.la + +if ENABLE_MCLIB +libinternal_la_LIBADD += \ $(top_builddir)/lib/libmc.la +else +mc_LDADD += \ + $(top_builddir)/lib/libmc.la +endif if ENABLE_VFS_SMB # this is a hack for linking with own samba library in simple way diff --git a/src/diffviewer/Makefile.am b/src/diffviewer/Makefile.am index 58e8e5b04..88c0cea5e 100644 --- a/src/diffviewer/Makefile.am +++ b/src/diffviewer/Makefile.am @@ -6,5 +6,3 @@ libdiffviewer_la_SOURCES = \ ydiff.c ydiff.h AM_CPPFLAGS = -I$(top_srcdir) $(GLIB_CFLAGS) $(PCRE_CPPFLAGS) - -libdiffviewer_la_LIBADD = ../../lib/libmc.la diff --git a/src/filemanager/Makefile.am b/src/filemanager/Makefile.am index 2b6db6a7b..bf0c18319 100644 --- a/src/filemanager/Makefile.am +++ b/src/filemanager/Makefile.am @@ -38,5 +38,3 @@ libmcfilemanager_la_SOURCES += \ AM_CPPFLAGS += @EXT2FS_CFLAGS@ @E2P_CFLAGS@ endif - -libmcfilemanager_la_LIBADD = ../../lib/libmc.la diff --git a/src/viewer/Makefile.am b/src/viewer/Makefile.am index 0602084d5..3ed24be1a 100644 --- a/src/viewer/Makefile.am +++ b/src/viewer/Makefile.am @@ -20,5 +20,3 @@ libmcviewer_la_SOURCES = \ search.c AM_CPPFLAGS = -I$(top_srcdir) $(GLIB_CFLAGS) $(PCRE_CPPFLAGS) - -libmcviewer_la_LIBADD = ../../lib/libmc.la