opa: Add dissectors for Intel’s Omni-Path Architecture (OPA)
[metze/wireshark/wip.git] / wiretap / Makefile.nmake
index 26170c68beb1ba6e8256ccdf5ed896fcbe8187a4..219f3eaa28df1280f4597b1c758402d382591439 100644 (file)
@@ -1,6 +1,4 @@
 #
-# $Id$
-#
 
 include ..\config.nmake
 include <win32.mak>
@@ -8,18 +6,24 @@ include ..\Makefile.nmake.inc
 
 include Makefile.common
 
-CFLAGS=-WX -DYYMALLOC=malloc -DYYFREE=free -DHAVE_CONFIG_H $(GLIB_CFLAGS) $(ZLIB_CFLAGS) /I$(PCAP_DIR)/include \
-       -D_U_="" $(LOCAL_CFLAGS) -DMSC_VER_REQUIRED=$(MSC_VER_REQUIRED)
+# We use GENERATED_CFLAGS to get around flex's non-LLP64-compliant output
+GENERATED_CFLAGS=\
+       $(STANDARD_CFLAGS) \
+       -DYYMALLOC=malloc -DYYFREE=free \
+       /I. /I.. $(GLIB_CFLAGS) \
+       $(ZLIB_CFLAGS) /I$(PCAP_DIR)/include \
+       -DWS_BUILD_DLL
 
-CVARSDLL=-DWIN32 -DNULL=0 -D_MT -D_DLL
+CFLAGS=$(WARNINGS_ARE_ERRORS) $(GENERATED_CFLAGS)
 
 .c.obj::
-       $(CC) $(CVARSDLL) $(CFLAGS) -Fd.\ -c $<
+       $(CC) $(CFLAGS) -Fd.\ -c $<
 
-OBJECTS=$(NONGENERATED_C_FILES:.c=.obj) $(GENERATED_C_FILES:.c=.obj) file_util.obj
+OBJECTS=$(NONGENERATED_C_FILES:.c=.obj) $(GENERATED_C_FILES:.c=.obj)
 
 wiretap_LIBS = \
        $(GLIB_LIBS)    \
+       ..\wsutil\libwsutil.lib \
        $(ZLIB_LIBS)
 
 all: wiretap-$(WTAP_VERSION).dll
@@ -27,30 +31,28 @@ all: wiretap-$(WTAP_VERSION).dll
 wiretap-$(WTAP_VERSION).lib: wiretap-$(WTAP_VERSION).dll
 wiretap-$(WTAP_VERSION).exp: wiretap-$(WTAP_VERSION).dll
 
-wiretap-$(WTAP_VERSION).dll : $(OBJECTS) wtap.def ..\image\wiretap.res
+wiretap-$(WTAP_VERSION).dll : $(OBJECTS) ..\image\wiretap.res
        $(link) $(dlllflags) $(conlibsdll) \
-               $(LOCAL_LDFLAGS) \
-               /DEF:wtap.def /OUT:wiretap-$(WTAP_VERSION).dll \
+               $(LOCAL_LDFLAGS) $(DLL_LDFLAGS) \
+               /OUT:wiretap-$(WTAP_VERSION).dll \
                /IMPLIB:wiretap-$(WTAP_VERSION).lib \
                ..\image\wiretap.res \
-               $(OBJECTS) $(wiretap_LIBS)
-!IF "$(MSVC_VARIANT)" == "MSVC2005" || "$(MSVC_VARIANT)" == "MSVC2005EE" || "$(MSVC_VARIANT)" == "DOTNET20" 
-       mt.exe -nologo -manifest "wiretap-$(WTAP_VERSION).dll.manifest" -outputresource:wiretap-$(WTAP_VERSION).dll;2
-!ENDIF
+               $(OBJECTS) ..\wsutil\ws_version_info.obj $(wiretap_LIBS)
 
-$(OBJECTS): config.h
+RUNLEX = ../tools/runlex.sh
 
-ascend-grammar.c ascend-grammar.h : ascend-grammar.y
-       $(YACC) $(YACC_OPTS) -d -p ascend ascend-grammar.y -o ascend-grammar.c
+k12text_lex.h : k12text.c
+k12text.obj : k12text.c
+       $(CC) $(GENERATED_CFLAGS) -Fd.\ -c $?
 
-ascend-scanner.obj : ascend-scanner.c ascend-grammar.h
+ascend_scanner_lex.h : ascend_scanner.c
+ascend_scanner.obj : ascend_scanner.c ascend.h
+       $(CC) $(GENERATED_CFLAGS) -Fd.\ -c ascend_scanner.c
 
-k12text.obj : k12text.c
+ascend_scanner.c : ascend.h
 
-config.h       : config.h.win32 ..\config.nmake
-       sed -e s/@VERSION@/$(WTAP_VERSION)/ \
-           -e "s/@HAVE_LIBZ@/$(ZLIB_CONFIG)/" \
-           < config.h.win32 > $@
+ascend.c ascend.h : ascend.y
+       $(YACC) $(YACC_OPTS) -d -p ascend ascend.y -o ascend.c
 
 clean :
        rm -f $(OBJECTS) \
@@ -58,18 +60,23 @@ clean :
                wiretap-*.exp \
                wiretap-*.dll \
                wiretap-*.dll.manifest \
-               *.pdb
+               *.nativecodeanalysis.xml *.pdb *.sbr
 
 #
 # We remove the generated files with "distclean" because one of them,
-# "ascend-scanner.c", needs different #includes for UN*X and Windows
+# "ascend_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 "ascend-scanner.c" from "ascend-scanner.l" with Flex.
-# This might not be necessary for "ascend-grammar.{c,h}", but as
+# to build "ascend_scanner.c" from "ascend_scanner.l" with Flex.
+# This might not be necessary for "ascend.{c,h}", but as
 # long as you need Flex, you might as well get Bison....
 #
 distclean: clean
-       rm -f config.h $(GENERATED_FILES)
+       rm -f $(GENERATED_FILES)
 
 maintainer-clean: distclean
+
+checkapi:
+## 'abort' checking disabled for now pending resolution of existing use of g_assert & g_error
+##     $(PERL) ../tools/checkAPIs.pl -g abort -g termoutput $(NONGENERATED_C_FILES) $(GENERATOR_FILES)
+       $(PERL) ../tools/checkAPIs.pl -g termoutput -build $(NONGENERATED_C_FILES)