wireshark/epan/dfilter/Makefile.nmake
Guy Harris 6616a3770c 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

77 lines
1.8 KiB
Makefile

## Makefile for building ethereal.exe with Microsoft C and nmake
## Use: $(MAKE) /$(MAKEFLAGS) -f makefile.nmake
#
# $Id$
include ..\..\config.nmake
############### no need to modify below this line #########
LEMON=..\..\tools\lemon
CFLAGS=-DHAVE_CONFIG_H /I. /I.. /I..\.. /I$(LEMON) \
$(GLIB_CFLAGS) $(PCRE_CFLAGS) /I$(PCAP_DIR)\include -D_U_="" $(LOCAL_CFLAGS)
CVARSDLL=-DWIN32 -DNULL=0 -D_MT -D_DLL
.c.obj::
$(CC) $(CVARSDLL) $(CFLAGS) -Fd.\ -c $<
OBJECTS = \
dfilter.obj \
dfvm.obj \
drange.obj \
gencode.obj \
glib-util.obj \
grammar.obj \
scanner.obj \
semcheck.obj \
sttype-integer.obj \
sttype-pointer.obj \
sttype-range.obj \
sttype-string.obj \
sttype-test.obj \
syntax-tree.obj
dfilter.lib : $(OBJECTS)
link /lib /out:dfilter.lib $(OBJECTS)
$(OBJECTS): ..\..\config.h
..\..\config.h: ..\..\config.h.win32 ..\..\config.nmake
cd ..\..
$(MAKE) -f Makefile.nmake config.h
cd epan\dfilter
clean:
rm -f $(OBJECTS) dfilter.lib $(PDB_FILE)
#
# We remove the generated files with "distclean" because one of them,
# "scanner.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 "scanner.c" from "scanner.l" with Flex.
# This might not be necessary for "grammar.{c,h}", but we handle them
# the same for now.
#
distclean: clean
rm -f scanner.c grammar.c grammar.h grammar.out
maintainer-clean: distclean
scanner.c : scanner.l
$(LEX) -Pdf_ -oscanner.c scanner.l
scanner.obj : scanner.c grammar.h
grammar.h : grammar.c
grammar.c : grammar.lemon $(LEMON)\lemon.exe
$(LEMON)\lemon.exe t=$(LEMON)\lempar.c grammar.lemon
$(LEMON)\lemon.exe:
cd ../../tools/lemon
$(MAKE) -f makefile.nmake
cd ../../epan/dfilter