2004-12-11 01:00:17 +00:00
|
|
|
#
|
|
|
|
# $Id$
|
|
|
|
#
|
|
|
|
|
|
|
|
include ..\..\config.nmake
|
2005-01-07 18:07:18 +00:00
|
|
|
include <win32.mak>
|
2004-12-11 01:00:17 +00:00
|
|
|
|
|
|
|
############### no need to modify below this line #########
|
|
|
|
|
2005-05-16 14:59:14 +00:00
|
|
|
LEMON=..\..\tools\lemon
|
|
|
|
|
|
|
|
CFLAGS=/DHAVE_CONFIG_H /I../.. /I../../wiretap $(GLIB_CFLAGS) /I$(LEMON)\
|
2004-12-11 01:00:17 +00:00
|
|
|
/I$(PCAP_DIR)\include -D_U_="" $(LOCAL_CFLAGS)
|
2005-01-07 18:07:18 +00:00
|
|
|
|
|
|
|
.c.obj::
|
|
|
|
$(CC) $(CFLAGS) -Fdmate.pdb -c $<
|
|
|
|
|
2004-12-11 01:00:17 +00:00
|
|
|
LDFLAGS = /NOLOGO /INCREMENTAL:no /MACHINE:I386 $(LOCAL_LDFLAGS)
|
|
|
|
|
2006-05-31 00:23:01 +00:00
|
|
|
!IFDEF ENABLE_LIBWIRESHARK
|
|
|
|
LINK_PLUGIN_WITH=..\..\epan\libwireshark.lib
|
|
|
|
CFLAGS=/DHAVE_WIN32_LIBWIRESHARK_LIB /D_NEED_VAR_IMPORT_ $(CFLAGS)
|
2004-12-11 01:00:17 +00:00
|
|
|
|
2005-05-16 14:59:14 +00:00
|
|
|
OBJECTS=packet-mate.obj\
|
|
|
|
mate_setup.obj\
|
|
|
|
mate_runtime.obj\
|
|
|
|
mate_util.obj\
|
|
|
|
mate_plugin.obj\
|
|
|
|
mate_grammar.obj\
|
|
|
|
mate_parser.obj
|
2004-12-11 01:00:17 +00:00
|
|
|
|
2004-12-16 19:36:23 +00:00
|
|
|
mate.dll mate.exp mate.lib : $(OBJECTS) $(LINK_PLUGIN_WITH)
|
|
|
|
link -dll /out:mate.dll $(LDFLAGS) $(OBJECTS) $(LINK_PLUGIN_WITH) \
|
2004-12-11 01:00:17 +00:00
|
|
|
$(GLIB_LIBS)
|
|
|
|
|
2005-03-05 06:28:10 +00:00
|
|
|
!ENDIF
|
|
|
|
|
2004-12-11 01:00:17 +00:00
|
|
|
clean:
|
2004-12-16 19:36:23 +00:00
|
|
|
rm -f $(OBJECTS) mate.dll mate.exp mate.lib *.pdb
|
2004-12-11 01:00:17 +00:00
|
|
|
|
2005-08-04 22:22:53 +00:00
|
|
|
#
|
|
|
|
# We remove the generated files with "distclean" because one of them,
|
|
|
|
# "mate_parser.c", needs different #includes for UN*X and Windows
|
|
|
|
# (UN*X versions of Flex make it include <unistd.h>, but that's a
|
|
|
|
# UN*X-only header), so if you're going to build from source, you need
|
|
|
|
# to build "mate_parser.c" from "mate_parser.l" with Flex.
|
|
|
|
# This might not be necessary for "mate_grammar.{c,h}", but we handle them
|
|
|
|
# the same for now.
|
|
|
|
#
|
2004-12-11 01:00:17 +00:00
|
|
|
distclean: clean
|
2005-05-16 14:59:14 +00:00
|
|
|
rm -f mate_parser.c mate_grammar.c mate_grammar.h mate_grammar.out
|
Make the "maintainer-clean" rules get rid of some additional generated
files. Do this with GENERATED_HEADER_FILES, GENERATED_C_FILES, and
GENERATED_FILES macros in Makefile.common files, along the lines of what
wiretap/Makefile.common has.
Clean up "*~" files with "make clean" rather than only "make distclean"
in some additional places.
Add "maintainer-clean" rules to the Makefile.nmake files, paralelling
the ones in the automake-generated Makefile.in files, using the
GENERATED_FILES macros from Makefile.common files. In some cases, move
the cleanup of files from "make distclean" to "make maintainer-clean",
and in other cases, put in a comment indicating why we're not doing that
(because some files that are distributed in the source tarballs, namely
Flex output, were built with a UN*X Flex and won't compile on Windows,
so we get rid of them with "make distclean" so you can clean up stuff
that *has* to be re-generated for Windows).
Clean up some *CLEANFILES definitions - get rid of ones that no longer
apply as files were moved or that add to the definition a name that's
already there.
svn path=/trunk/; revision=13402
2005-02-14 20:33:57 +00:00
|
|
|
|
|
|
|
maintainer-clean: distclean
|
2005-05-16 14:59:14 +00:00
|
|
|
|
|
|
|
mate_parser.c : mate_parser.l
|
|
|
|
$(LEX) -Pdf_ -omate_parser.c mate_parser.l
|
|
|
|
|
|
|
|
mate_grammar.h : mate_grammar.c
|
|
|
|
mate_grammar.c : mate_grammar.lemon $(LEMON)\lemon.exe
|
|
|
|
$(LEMON)\lemon.exe t=$(LEMON)\lempar.c mate_grammar.lemon
|
|
|
|
|
|
|
|
$(LEMON)\lemon.exe:
|
|
|
|
cd ../../tools/lemon
|
|
|
|
$(MAKE) -f makefile.nmake
|
2005-05-16 15:10:50 +00:00
|
|
|
cd ../../plugins/mate
|