From 0f3d73aeb1a618922ad6bbb33507826e2becdb2b Mon Sep 17 00:00:00 2001 From: Moritz Bunkus Date: Sun, 5 Oct 2003 10:29:54 +0000 Subject: [PATCH] Proper Makefiles with proper include and lib directories. --- aviclasses/Makefile.am | 2 +- avilib/Makefile.am | 5 ++--- configure.in | 18 +++++++++++------- src/Makefile.am | 12 ++++++------ src/mmg/Makefile.am | 8 ++------ 5 files changed, 22 insertions(+), 23 deletions(-) diff --git a/aviclasses/Makefile.am b/aviclasses/Makefile.am index 9f3a68c80..055d17b5a 100644 --- a/aviclasses/Makefile.am +++ b/aviclasses/Makefile.am @@ -1,4 +1,4 @@ -DEFAULT_INCLUDES = -I.. -I../src +DEFAULT_INCLUDES = -I$(top_srcdir) -I$(top_srcdir)/src -I. noinst_LIBRARIES = libaviclasses.a diff --git a/avilib/Makefile.am b/avilib/Makefile.am index 2f17b7882..a85b6b853 100644 --- a/avilib/Makefile.am +++ b/avilib/Makefile.am @@ -1,12 +1,11 @@ # # Process this file with automake to produce Makefile.in. AUTOMAKE_OPTIONS = 1.3 foreign -DEFAULT_INCLUDES = -I$(top_srcdir) -I$(srcdir) -I$(top_builddir) -I. + +DEFAULT_INCLUDES = -I$(top_srcdir) -I$(top_srcdir)/src -I. noinst_LIBRARIES = libavi.a -INCLUDES = -I./ - CFLAGS=-O3 -funroll-loops -ffast-math -DLINUX -Wall @CFLAGS@ libavi_a_SOURCES = avilib.c avidump.c avimisc.c diff --git a/configure.in b/configure.in index 8bc87f15c..18f1987d5 100644 --- a/configure.in +++ b/configure.in @@ -800,17 +800,21 @@ AC_SUBST(WXWINDOWS_LDFLAGS) AC_SUBST(WXWINDOWS_LIBS) AM_CONDITIONAL(HAVE_WXWINDOWS, test x"$have_wxwindows" = "xyes") -AVILIB_CFLAGS="-Iavilib -D_LARGEFILE64_SOURCE -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64" -AVILIB_CXXFLAGS="-Iavilib -D_LARGEFILE64_SOURCE -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64" -AVILIB_LIBS="-Lavilib -lavi" +AVILIB_CFLAGS="-D_LARGEFILE64_SOURCE -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64" +AVILIB_LIBS="-lavi" + +AVICLASSES_CXXFLAGS="-D_LARGEFILE64_SOURCE -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64" +AVICLASSES_LIBS="-laviclasses" AC_SUBST(AVILIB_CFLAGS) -AC_SUBST(AVILIB_CXXFLAGS) AC_SUBST(AVILIB_LIBS) +AC_SUBST(AVICLASSES_CXXFLAGS) +AC_SUBST(AVICLASSES_LIBS) -CFLAGS="-Wall -Wno-sign-compare -Wno-comment -I../src @OGG_CFLAGS@ @VORBIS_CFLAGS@ @AVILIB_CFLAGS@ @DEBUG_CFLAGS@ @PROFILING_CFLAGS@ @MATROSKA_CFLAGS@ @EBML_CFLAGS@" -CXXFLAGS="-Wall -Wno-sign-compare -Wno-comment -I../avilib -I.. @OGG_CFLAGS@ @VORBIS_CFLAGS@ @AVILIB_CFLAGS@ @DEBUG_CFLAGS@ @PROFILING_CFLAGS@ @MATROSKA_CFLAGS@ @EBML_CFLAGS@ @WXWINDOWS_CFLAGS@ @EXPAT_CFLAGS@ @ZLIB_CFLAGS@ @LZO_CFLAGS@ @BZ2_CFLAGS@" -LDFLAGS=-L../avilib +CFLAGS="-Wall -Wno-sign-compare -Wno-comment @EXTRA_CFLAGS@ @OGG_CFLAGS@ @VORBIS_CFLAGS@ @AVILIB_CFLAGS@ @DEBUG_CFLAGS@ @PROFILING_CFLAGS@ @MATROSKA_CFLAGS@ @EBML_CFLAGS@" +CXXFLAGS="-Wall -Wno-sign-compare -Wno-comment @EXTRA_CFLAGS@ @OGG_CFLAGS@ @VORBIS_CFLAGS@ @AVILIB_CFLAGS@ @AVICLASSES_CXXFLAGS@ @DEBUG_CFLAGS@ @PROFILING_CFLAGS@ @MATROSKA_CFLAGS@ @EBML_CFLAGS@ @WXWINDOWS_CFLAGS@ @EXPAT_CFLAGS@ @ZLIB_CFLAGS@ @LZO_CFLAGS@ @BZ2_CFLAGS@" +CPPFLAGS="@EXTRA_CFLAGS@" +LDFLAGS="@EXTRA_LDFLAGS@" AC_OUTPUT(Makefile avilib/Makefile aviclasses/Makefile src/Makefile src/mmg/Makefile doc/Makefile) diff --git a/src/Makefile.am b/src/Makefile.am index d82670910..462559488 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -1,9 +1,10 @@ AUTOMAKE_OPTIONS = dist-zip foreign -CFLAGS=@CFLAGS@ @EXTRA_CFLAGS@ -CPPFLAGS=@CPPFLAGS@ @EXTRA_CFLAGS@ -CXXFLAGS=@CXXFLAGS@ @EXTRA_CFLAGS@ -LDFLAGS=@LDFLAGS@ @EXTRA_LDFLAGS@ +DEFAULT_INCLUDES = -I$(top_srcdir) \ + -I$(top_srcdir)/avilib \ + -I$(top_srcdir)/aviclasses \ + -I$(top_srcdir)/src +LDFLAGS = -L$(top_srcdir)/avilib -L$(top_srcdir)/aviclasses if HAVE_WXWINDOWS SUBDIRS = mmg @@ -75,7 +76,7 @@ base64tool_SOURCES = base64tool.cpp \ common.cpp common.h \ mm_io.cpp mm_io.h -mkvmerge_LDADD = @AVILIB_LIBS@ @PROFILING_LIBS@ \ +mkvmerge_LDADD = @AVILIB_LIBS@ @AVICLASSES_LIBS@ @PROFILING_LIBS@ \ @MATROSKA_LIBS@ @EBML_LIBS@ @VORBIS_LIBS@ @OGG_LIBS@ \ @ICONV_LIBS@ @MINGW_LIBS@ @EXPAT_LIBS@ @ZLIB_LIBS@ @LZO_LIBS@ \ @BZ2_LIBS@ @@ -87,4 +88,3 @@ mkvextract_LDADD = @AVILIB_LIBS@ @PROFILING_LIBS@ @MATROSKA_LIBS@ @EBML_LIBS@ \ @VORBIS_LIBS@ @OGG_LIBS@ @ICONV_LIBS@ @LZO_LIBS@ @BZ2_LIBS@ base64tool_LDADD = @EBML_LIBS@ @ICONV_LIBS@ - diff --git a/src/mmg/Makefile.am b/src/mmg/Makefile.am index 70f7e1768..20e61a0bf 100644 --- a/src/mmg/Makefile.am +++ b/src/mmg/Makefile.am @@ -2,12 +2,8 @@ AUTOMAKE_OPTIONS = dist-zip foreign bin_PROGRAMS = mmg -INCLUDES = -I.. -I../.. - -CFLAGS=@CFLAGS@ @EXTRA_CFLAGS@ -CPPFLAGS=@CPPFLAGS@ @EXTRA_CFLAGS@ -CXXFLAGS=@CXXFLAGS@ @EXTRA_CFLAGS@ -LDFLAGS=@LDFLAGS@ @EXTRA_LDFLAGS@ +DEFAULT_INCLUDES = -I$(top_srcdir) \ + -I$(top_srcdir)/src mmg_SOURCES = mmg.cpp mmg.h \ ../chapters.cpp ../chapters.h \