Add a Makefile.common file, and have Makefile.am and Makefile.nmake use it.
authorGuy Harris <guy@alum.mit.edu>
Fri, 23 May 2008 02:09:48 +0000 (02:09 -0000)
committerGuy Harris <guy@alum.mit.edu>
Fri, 23 May 2008 02:09:48 +0000 (02:09 -0000)
svn path=/trunk/; revision=25360

wsutil/Makefile.am
wsutil/Makefile.common [new file with mode: 0644]
wsutil/Makefile.nmake

index 07a0b5acacfd8fdc5c2c6e1db1aa00e9df7b29a6..ee8459f7275cd577f7cfd0e33097846a9fa1fb74 100644 (file)
@@ -6,7 +6,6 @@
 # By Gerald Combs <gerald@wireshark.org>
 # Copyright 1998 Gerald Combs
 #
-#
 # This program is free software; you can redistribute it and/or
 # modify it under the terms of the GNU General Public License
 # as published by the Free Software Foundation; either version 2
 # along with this program; if not, write to the Free Software
 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
 
+ACLOCAL_AMFLAGS = `../aclocal-flags`
+
+include Makefile.common
+
 if HAVE_WARNINGS_AS_ERRORS
 AM_CFLAGS = -Werror
 endif
@@ -30,14 +33,14 @@ lib_LTLIBRARIES = libwsutil.la
 INCLUDES = -I$(srcdir)/..
 
 libwsutil_la_SOURCES = \
-       mpeg-audio.c    \
-       mpeg-audio.h
+       $(LIBWSUTIL_SRC)        \
+       $(LIBWSUTIL_INCLUDES)
 
 libwsutil_la_LIBADD = @GLIB_LIBS@
 
 EXTRA_DIST = \
-       Makefile.nmake  \
-       file_util.c
+       Makefile.common         \
+       Makefile.nmake
 
 CLEANFILES = \
        libwsutil.a     \
diff --git a/wsutil/Makefile.common b/wsutil/Makefile.common
new file mode 100644 (file)
index 0000000..cde3745
--- /dev/null
@@ -0,0 +1,38 @@
+# Makefile.common
+#     Contains the stuff from Makefile.am and Makefile.nmake that is
+#     a) common to both files and
+#     b) portable between both files
+#
+# $Id$
+#
+# Wireshark - Network traffic analyzer
+# By Gerald Combs <gerald@wireshark.org>
+# Copyright 1998 Gerald Combs
+#
+# This program is free software; you can redistribute it and/or
+# modify it under the terms of the GNU General Public License
+# as published by the Free Software Foundation; either version 2
+# of the License, or (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
+
+# C source files that are part of the libwsutil source; this includes only
+# .c files, not YACC or Lex or... files (as Makefile.nmake maps this list
+# into a list of object files by replacing ".c" with ".obj") or files
+# generated from YACC or Lex files (as Automake doesn't want them in
+# _SOURCES variables).
+LIBWSUTIL_SRC = \
+       file_util.c     \
+       mpeg-audio.c
+
+# Header files that are not generated from other files
+LIBWSUTIL_INCLUDES = \
+       file_util.h     \
+       mpeg-audio.h
index b061490a00f282f407642a108d360f5804f84037..19af589ecda38b795e21ff6693d9c61ece3ac5f1 100644 (file)
@@ -9,6 +9,8 @@ include ..\Makefile.nmake.inc
 
 ############### no need to modify below this line #########
 
+include Makefile.common
+
 CFLAGS=-WX -DHAVE_CONFIG_H /I. /I.. $(GLIB_CFLAGS) \
        /I$(PCAP_DIR)\include -D_U_="" $(LOCAL_CFLAGS)
 
@@ -17,14 +19,13 @@ CVARSDLL=-DWIN32 -DNULL=0 -D_MT -D_DLL
 .c.obj::
    $(CC) $(CVARSDLL) $(CFLAGS) -Fd.\ -c $<
 
-
+# For use when making libwsutil.dll
 libwsutil_LIBS = $(GLIB_LIBS)
 
-OBJECTS = \
-       mpeg-audio.obj  \
-       file_util.obj
+OBJECTS = $(LIBWSUTIL_SRC:.c=.obj)
 
 
+# For use when making libwsutil.dll
 libwsutil.lib: libwsutil.dll
 libwsutil.exp: libwsutil.dll