aboutsummaryrefslogtreecommitdiffstats
path: root/wsutil
diff options
context:
space:
mode:
authorGuy Harris <guy@alum.mit.edu>2008-05-23 02:09:48 +0000
committerGuy Harris <guy@alum.mit.edu>2008-05-23 02:09:48 +0000
commit819dc6c790b06163ce6c50dc00f4b3ca0cb8d201 (patch)
tree57bfc58f14106629b28ac4d6f6412464bf197c56 /wsutil
parent60d4c486f92dde4856dec601532d8d21d4977060 (diff)
Add a Makefile.common file, and have Makefile.am and Makefile.nmake use it.
svn path=/trunk/; revision=25360
Diffstat (limited to 'wsutil')
-rw-r--r--wsutil/Makefile.am13
-rw-r--r--wsutil/Makefile.common38
-rw-r--r--wsutil/Makefile.nmake9
3 files changed, 51 insertions, 9 deletions
diff --git a/wsutil/Makefile.am b/wsutil/Makefile.am
index 07a0b5acac..ee8459f727 100644
--- a/wsutil/Makefile.am
+++ b/wsutil/Makefile.am
@@ -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
@@ -21,6 +20,10 @@
# 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
index 0000000000..cde374581c
--- /dev/null
+++ b/wsutil/Makefile.common
@@ -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
diff --git a/wsutil/Makefile.nmake b/wsutil/Makefile.nmake
index b061490a00..19af589ecd 100644
--- a/wsutil/Makefile.nmake
+++ b/wsutil/Makefile.nmake
@@ -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