2006-06-17 11:57:26 +00:00
|
|
|
## Makefile for building wireshark.exe with Microsoft C and nmake
|
2002-02-27 09:42:52 +00:00
|
|
|
## Use: $(MAKE) /$(MAKEFLAGS) -f makefile.nmake
|
|
|
|
#
|
2004-07-18 00:24:25 +00:00
|
|
|
# $Id$
|
2002-02-27 09:42:52 +00:00
|
|
|
|
2000-10-11 07:35:02 +00:00
|
|
|
include ..\config.nmake
|
2004-05-09 10:03:41 +00:00
|
|
|
include <win32.mak>
|
2004-03-22 20:35:07 +00:00
|
|
|
include Makefile.common
|
2000-10-11 07:35:02 +00:00
|
|
|
|
2004-05-09 10:03:41 +00:00
|
|
|
|
2000-10-11 07:35:02 +00:00
|
|
|
############### no need to modify below this line #########
|
|
|
|
|
2004-01-22 19:27:59 +00:00
|
|
|
CFLAGS=-DHAVE_CONFIG_H /I. /I.. /I../wiretap $(GLIB_CFLAGS) \
|
2006-02-06 09:09:06 +00:00
|
|
|
$(ZLIB_CFLAGS) $(ADNS_CFLAGS) $(PCRE_CFLAGS) $(GNUTLS_CFLAGS) /I$(PCAP_DIR)\include \
|
2003-12-07 00:04:32 +00:00
|
|
|
-D_U_="" $(LOCAL_CFLAGS)
|
2000-10-11 07:35:02 +00:00
|
|
|
|
2001-03-23 02:05:29 +00:00
|
|
|
CVARSDLL=-DWIN32 -DNULL=0 -D_MT -D_DLL
|
|
|
|
|
2006-09-26 22:51:04 +00:00
|
|
|
!IFDEF LUA_DIR
|
|
|
|
WSLUA_LIB=wslua\wslua.lib
|
|
|
|
WSLUA_DIR=wslua
|
|
|
|
!ELSE
|
|
|
|
WSLUA_LIB=
|
|
|
|
WSLUA_DIR=
|
|
|
|
!ENDIf
|
|
|
|
|
2006-05-31 00:23:01 +00:00
|
|
|
# For use when making libwireshark.dll
|
|
|
|
libwireshark_LIBS = \
|
2004-05-09 10:03:41 +00:00
|
|
|
$(GLIB_LIBS) \
|
|
|
|
$(ADNS_LIBS) \
|
|
|
|
$(PCRE_LIBS) \
|
2006-08-05 04:32:57 +00:00
|
|
|
$(KFW_LIBS) \
|
2004-10-15 15:36:12 +00:00
|
|
|
$(NETTLE_LIBS) \
|
2004-05-09 10:03:41 +00:00
|
|
|
$(ZLIB_LIBS) \
|
2006-02-06 09:09:06 +00:00
|
|
|
$(GNUTLS_LIBS) \
|
2006-09-11 22:47:57 +00:00
|
|
|
$(NET_SNMP_LIBS) \
|
2006-09-26 03:31:00 +00:00
|
|
|
$(LUA_LIBS) \
|
|
|
|
..\wiretap\wiretap-$(WTAP_VERSION).lib \
|
2005-04-26 08:03:22 +00:00
|
|
|
$(ICONV_DIR)\lib\iconv.lib \
|
2006-12-28 17:22:12 +00:00
|
|
|
crypt\airpdcap.lib \
|
2004-05-09 10:03:41 +00:00
|
|
|
ftypes\ftypes.lib \
|
|
|
|
dfilter\dfilter.lib \
|
2006-09-26 22:51:04 +00:00
|
|
|
$(WSLUA_LIB) \
|
2004-07-18 18:06:47 +00:00
|
|
|
dissectors\dissectors.lib
|
2000-10-14 04:31:26 +00:00
|
|
|
|
2001-12-12 01:29:13 +00:00
|
|
|
.c.obj::
|
2004-03-22 20:35:07 +00:00
|
|
|
$(CC) $(CVARSDLL) $(CFLAGS) -Fd.\ -c $<
|
2000-10-11 07:35:02 +00:00
|
|
|
|
2006-05-31 00:23:01 +00:00
|
|
|
LIBWIRESHARK_OBJECTS = $(LIBWIRESHARK_SRC:.c=.obj)
|
2004-07-18 23:46:07 +00:00
|
|
|
|
|
|
|
EXTRA_OBJECTS = \
|
|
|
|
# strerror.obj \
|
2004-08-10 07:52:11 +00:00
|
|
|
inet_aton.obj \
|
|
|
|
inet_pton.obj \
|
|
|
|
inet_ntop.obj \
|
2005-02-13 00:10:15 +00:00
|
|
|
mkstemp.obj \
|
|
|
|
strptime.obj
|
2004-07-18 23:46:07 +00:00
|
|
|
|
|
|
|
|
2006-02-09 07:03:54 +00:00
|
|
|
!IFDEF DOXYGEN
|
|
|
|
DOXYGEN_DEP=doxygen
|
|
|
|
!ENDIF
|
|
|
|
|
2006-05-31 00:23:01 +00:00
|
|
|
!IFDEF ENABLE_LIBWIRESHARK
|
2006-12-28 17:22:12 +00:00
|
|
|
all: crypt ftypes dfilter $(WSLUA_DIR) dissectors libwireshark.dll
|
2004-05-09 10:03:41 +00:00
|
|
|
!ELSE
|
2006-12-28 17:22:12 +00:00
|
|
|
all: crypt ftypes dfilter $(WSLUA_DIR) dissectors libwireshark.lib
|
2004-05-09 10:03:41 +00:00
|
|
|
!ENDIF
|
|
|
|
|
2006-05-31 00:23:01 +00:00
|
|
|
# For use when making libwireshark.dll
|
|
|
|
libwireshark.lib: libwireshark.dll
|
|
|
|
libwireshark.exp: libwireshark.dll
|
2001-02-02 04:03:43 +00:00
|
|
|
|
2006-12-28 17:22:12 +00:00
|
|
|
libwireshark.dll: ..\config.h $(LIBWIRESHARK_OBJECTS) libwireshark.def crypt ftypes dfilter $(WSLUA_DIR) dissectors $(DOXYGEN_DEP) $(EXTRA_OBJECTS) \
|
|
|
|
crypt\airpdcap.lib ftypes\ftypes.lib dfilter\dfilter.lib dissectors\dissectors.lib $(WSLUA_LIB) ..\image\libwireshark.res
|
2006-05-31 00:23:01 +00:00
|
|
|
@echo Linking libwireshark.dll
|
2007-01-14 22:25:22 +00:00
|
|
|
$(link) $(dlllflags) $(conlibsdll) shell32.lib \
|
2004-05-09 10:03:41 +00:00
|
|
|
$(LOCAL_LDFLAGS) \
|
2006-05-31 00:23:01 +00:00
|
|
|
/DEF:libwireshark.def /OUT:libwireshark.dll \
|
|
|
|
/IMPLIB:libwireshark.lib $(LIBWIRESHARK_OBJECTS) \
|
|
|
|
$(libwireshark_LIBS) ..\image\libwireshark.res \
|
2005-02-10 01:26:19 +00:00
|
|
|
dissectors\register.obj \
|
2004-08-10 07:52:11 +00:00
|
|
|
$(EXTRA_OBJECTS)
|
2000-10-14 04:31:26 +00:00
|
|
|
|
2006-12-28 17:22:12 +00:00
|
|
|
libwireshark.lib : ..\config.h $(LIBWIRESHARK_OBJECTS) crypt ftypes dfilter $(WSLUA_DIR) dissectors $(DOXYGEN_DEP) $(EXTRA_OBJECTS) \
|
|
|
|
crypt\airpdcap.lib ftypes\ftypes.lib dfilter\dfilter.lib $(WSLUA_LIB) dissectors\dissectors.lib
|
2006-08-04 14:43:48 +00:00
|
|
|
link /lib /out:libwireshark.lib $(LIBWIRESHARK_OBJECTS) \
|
2005-02-10 01:26:19 +00:00
|
|
|
$(EXTRA_OBJECTS)
|
2000-10-11 07:35:02 +00:00
|
|
|
|
2004-05-06 20:48:36 +00:00
|
|
|
..\config.h : ..\config.h.win32 ..\config.nmake
|
|
|
|
cd ..
|
2006-12-04 05:41:53 +00:00
|
|
|
$(MAKE) /$(MAKEFLAGS) -f Makefile.nmake config.h
|
2004-05-06 20:48:36 +00:00
|
|
|
cd epan
|
2000-10-11 07:35:02 +00:00
|
|
|
|
|
|
|
clean:
|
2007-01-03 05:41:11 +00:00
|
|
|
rm -f $(LIBWIRESHARK_OBJECTS) $(EXTRA_OBJECTS) \
|
|
|
|
libwireshark.lib libwireshark.dll libwireshark.dll.manifest libwireshark.exp libwireshark.pdb \
|
|
|
|
doxygen.cfg html/*.*
|
2004-07-27 18:56:50 +00:00
|
|
|
if exist html rmdir html
|
2006-12-28 17:22:12 +00:00
|
|
|
cd crypt
|
|
|
|
$(MAKE) /$(MAKEFLAGS) -f Makefile.nmake clean
|
|
|
|
cd ../ftypes
|
2001-03-06 13:08:13 +00:00
|
|
|
$(MAKE) /$(MAKEFLAGS) -f Makefile.nmake clean
|
2001-02-02 04:03:43 +00:00
|
|
|
cd ../dfilter
|
2001-03-06 13:08:13 +00:00
|
|
|
$(MAKE) /$(MAKEFLAGS) -f Makefile.nmake clean
|
2004-07-18 18:06:47 +00:00
|
|
|
cd ../dissectors
|
|
|
|
$(MAKE) /$(MAKEFLAGS) -f Makefile.nmake clean
|
2006-09-26 03:31:00 +00:00
|
|
|
cd ../wslua
|
|
|
|
$(MAKE) /$(MAKEFLAGS) -f Makefile.nmake clean
|
2003-10-13 19:04:56 +00:00
|
|
|
cd ..
|
2001-02-02 04:03:43 +00:00
|
|
|
|
2005-08-04 22:22:53 +00:00
|
|
|
#
|
2005-09-12 19:50:45 +00:00
|
|
|
# We remove the Flex-generated files with "distclean" because they need
|
|
|
|
# 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 those scanners from the
|
|
|
|
# corresponding ".l" files with Flex.
|
|
|
|
# This might not be necessary for "dtd_grammar.{c,h}", but we handle them
|
|
|
|
# the same for now.
|
2005-08-04 22:22:53 +00:00
|
|
|
#
|
2003-10-10 21:31:53 +00:00
|
|
|
distclean: clean
|
2005-09-12 19:50:45 +00:00
|
|
|
rm -f config.h register.c mkstemp.c strptime.c radius_dict.c \
|
|
|
|
dtd_grammar.out dtd_grammar.c dtd_grammar.h dtd_parse.c \
|
2007-02-07 14:54:35 +00:00
|
|
|
dtd_preparse.c sminmpec.c uat_load.c
|
2006-12-28 17:22:12 +00:00
|
|
|
cd crypt
|
|
|
|
$(MAKE) /$(MAKEFLAGS) -f Makefile.nmake distclean
|
|
|
|
cd ../ftypes
|
2003-10-10 21:31:53 +00:00
|
|
|
$(MAKE) /$(MAKEFLAGS) -f Makefile.nmake distclean
|
|
|
|
cd ../dfilter
|
|
|
|
$(MAKE) /$(MAKEFLAGS) -f Makefile.nmake distclean
|
2004-07-27 18:56:50 +00:00
|
|
|
cd ../dissectors
|
|
|
|
$(MAKE) /$(MAKEFLAGS) -f Makefile.nmake distclean
|
2006-09-26 03:31:00 +00:00
|
|
|
cd ../wslua
|
|
|
|
$(MAKE) /$(MAKEFLAGS) -f Makefile.nmake distclean
|
2003-10-13 19:04:56 +00:00
|
|
|
cd ..
|
2001-02-02 04:03:43 +00:00
|
|
|
|
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
|
2006-12-28 17:22:12 +00:00
|
|
|
cd crypt
|
|
|
|
$(MAKE) /$(MAKEFLAGS) -f Makefile.nmake maintainer-clean
|
|
|
|
cd ../ftypes
|
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
|
|
|
$(MAKE) /$(MAKEFLAGS) -f Makefile.nmake maintainer-clean
|
|
|
|
cd ../dfilter
|
|
|
|
$(MAKE) /$(MAKEFLAGS) -f Makefile.nmake maintainer-clean
|
|
|
|
cd ../dissectors
|
|
|
|
$(MAKE) /$(MAKEFLAGS) -f Makefile.nmake maintainer-clean
|
2006-09-26 03:31:00 +00:00
|
|
|
cd ../wslua
|
|
|
|
$(MAKE) /$(MAKEFLAGS) -f Makefile.nmake maintainer-clean
|
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
|
|
|
cd ..
|
|
|
|
|
2006-12-28 17:22:12 +00:00
|
|
|
crypt:: ..\config.h
|
|
|
|
cd crypt
|
|
|
|
$(MAKE) /$(MAKEFLAGS) -f Makefile.nmake
|
|
|
|
cd ..
|
|
|
|
|
2004-05-06 20:48:36 +00:00
|
|
|
ftypes:: ..\config.h
|
2001-02-02 04:03:43 +00:00
|
|
|
cd ftypes
|
2001-03-06 13:08:13 +00:00
|
|
|
$(MAKE) /$(MAKEFLAGS) -f Makefile.nmake
|
2001-02-02 04:03:43 +00:00
|
|
|
cd ..
|
|
|
|
|
2004-05-06 20:48:36 +00:00
|
|
|
dfilter:: ..\config.h
|
2001-02-02 04:03:43 +00:00
|
|
|
cd dfilter
|
2001-03-06 13:08:13 +00:00
|
|
|
$(MAKE) /$(MAKEFLAGS) -f Makefile.nmake
|
2001-02-02 04:03:43 +00:00
|
|
|
cd ..
|
2004-03-02 01:21:56 +00:00
|
|
|
|
2004-07-18 18:06:47 +00:00
|
|
|
dissectors:: ..\config.h
|
|
|
|
cd dissectors
|
|
|
|
$(MAKE) /$(MAKEFLAGS) -f Makefile.nmake
|
2006-09-26 03:31:00 +00:00
|
|
|
cd ..
|
|
|
|
|
|
|
|
wslua:: ..\config.h
|
|
|
|
cd wslua
|
|
|
|
$(MAKE) /$(MAKEFLAGS) -f Makefile.nmake
|
2004-07-18 18:06:47 +00:00
|
|
|
cd ..
|
|
|
|
|
2004-06-25 07:10:55 +00:00
|
|
|
doxygen.cfg: ..\config.nmake doxygen.cfg.in
|
2004-05-13 10:10:28 +00:00
|
|
|
sed -e s/@VERSION@/$(VERSION)/ \
|
2004-06-25 07:10:55 +00:00
|
|
|
< doxygen.cfg.in > $@
|
2004-05-13 10:10:28 +00:00
|
|
|
|
|
|
|
doxygen-run:
|
2004-05-11 00:53:12 +00:00
|
|
|
!IFDEF DOXYGEN
|
2004-06-25 07:10:55 +00:00
|
|
|
$(DOXYGEN) doxygen.cfg
|
2004-05-11 00:53:12 +00:00
|
|
|
!ENDIF
|
|
|
|
|
2004-06-25 07:10:55 +00:00
|
|
|
doxygen: doxygen.cfg doxygen-run
|
2004-05-13 10:10:28 +00:00
|
|
|
|
2005-02-13 00:10:15 +00:00
|
|
|
|
|
|
|
# (Windows only) Copy some sources from /trunk to /trunk/epan.
|
|
|
|
# It is a cleaner to compile these sources seperately with this makefile than
|
|
|
|
# using the object code compiled by the makefile in /trunk for both dynamically
|
|
|
|
# and statically linking
|
|
|
|
|
|
|
|
mkstemp.c: ..\mkstemp.c
|
2005-09-07 13:26:23 +00:00
|
|
|
xcopy ..\mkstemp.c . /d
|
2005-02-13 00:10:15 +00:00
|
|
|
|
|
|
|
strptime.c: ..\strptime.c
|
2005-09-07 13:26:23 +00:00
|
|
|
xcopy ..\strptime.c . /d
|
2005-02-13 00:10:15 +00:00
|
|
|
|
2005-07-15 21:18:32 +00:00
|
|
|
radius_dict.c : radius_dict.l
|
|
|
|
$(LEX) radius_dict.l
|
2005-07-24 03:36:21 +00:00
|
|
|
|
|
|
|
sminmpec.c: enterprise-numbers make-sminmpec.pl
|
|
|
|
$(PERL) make-sminmpec.pl enterprise-numbers sminmpec.c
|
2005-09-10 17:29:15 +00:00
|
|
|
|
|
|
|
dtd_parse.c : dtd_parse.l
|
2005-09-10 18:33:32 +00:00
|
|
|
$(LEX) -odtd_parse.c dtd_parse.l
|
2005-09-10 17:29:15 +00:00
|
|
|
|
|
|
|
dtd_preparse.c : dtd_preparse.l
|
2005-09-10 18:33:32 +00:00
|
|
|
$(LEX) -odtd_preparse.c dtd_preparse.l
|
2005-09-10 17:29:15 +00:00
|
|
|
|
2007-01-28 10:31:32 +00:00
|
|
|
uat_load.c : uat_load.l
|
|
|
|
$(LEX) -ouat_load.c uat_load.l
|
|
|
|
|
2005-09-10 17:29:15 +00:00
|
|
|
dtd_grammar.h: dtd_grammar.c
|
|
|
|
|
2005-09-10 18:33:32 +00:00
|
|
|
LEMON=..\tools\lemon
|
2005-09-10 17:29:15 +00:00
|
|
|
|
2005-09-10 18:00:28 +00:00
|
|
|
dtd_grammar.c: dtd_grammar.lemon $(LEMON)\lemon.exe
|
2005-09-10 18:33:32 +00:00
|
|
|
$(LEMON)\lemon t=$(LEMON)\lempar.c dtd_grammar.lemon
|
2005-09-10 17:29:15 +00:00
|
|
|
|