![Bill Meier](/assets/img/avatar_default.png)
- Define macros for certain CFLAGS in config.nmake iso of having defs in each makefile; a. -DHAVE_CONFIG_H and -D_U_="" are now part of a macro named STANDARD_CFLAGS; b. -WX has been replaced by WARNINGS_ARE_ERRORS (defined as -WX in config.nmake) (This allows disabling "Warnings as Errors" by just changing config.nmake) c. CVARSDLL definitions (not usage) have been removed from the various makefiles. XXX: It appears the usage of CVARSDLL can also be removed (not yet done) since: -DWIN32 and -DNULL=0 do not appear to be needed (any more); -D_MT and _D_DLL are not needed since /MP causes these definitions. d. Define a macro WARNINGS_CFLAGS with additional specific compiler (level4) warnings to be enabled. E.G., 4295: array is too small to include a terminating null character - config.nmake: reformat some long lines for readability; - plugins\Makefile.nmake: clean-deps does nothing: remove it (and usage in top-level makefile); - dissectors/Makefile.nmake: test to enable packet-rrc.obj target needs to include MSVC2010 ... svn path=/trunk/; revision=35747
59 lines
1.4 KiB
Makefile
59 lines
1.4 KiB
Makefile
# Makefile.nmake
|
|
# nmake file for stats_tree plugin
|
|
#
|
|
# $Id$
|
|
#
|
|
|
|
include ..\..\config.nmake
|
|
include moduleinfo.nmake
|
|
|
|
include Makefile.common
|
|
|
|
CFLAGS=$(WARNINGS_ARE_ERRORS) $(STANDARD_CFLAGS) \
|
|
/I../.. $(GLIB_CFLAGS) \
|
|
/I$(PCAP_DIR)\include
|
|
|
|
.c.obj::
|
|
$(CC) $(CFLAGS) -Fdstats_tree.pdb -c $<
|
|
|
|
LDFLAGS = $(PLUGIN_LDFLAGS)
|
|
|
|
!IFDEF ENABLE_LIBWIRESHARK
|
|
LINK_PLUGIN_WITH=..\..\epan\libwireshark.lib
|
|
CFLAGS=/D_NEED_VAR_IMPORT_ $(CFLAGS)
|
|
|
|
TAP_OBJECTS = $(TAP_SRC:.c=.obj)
|
|
|
|
OBJECTS=$(TAP_OBJECTS)
|
|
|
|
RESOURCE=$(PLUGIN_NAME).res
|
|
|
|
all: $(PLUGIN_NAME).dll
|
|
|
|
$(PLUGIN_NAME).rc : moduleinfo.nmake
|
|
sed -e s/@PLUGIN_NAME@/$(PLUGIN_NAME)/ \
|
|
-e s/@RC_MODULE_VERSION@/$(RC_MODULE_VERSION)/ \
|
|
-e s/@RC_VERSION@/$(RC_VERSION)/ \
|
|
-e s/@MODULE_VERSION@/$(MODULE_VERSION)/ \
|
|
-e s/@PACKAGE@/$(PACKAGE)/ \
|
|
-e s/@VERSION@/$(VERSION)/ \
|
|
-e s/@MSVC_VARIANT@/$(MSVC_VARIANT)/ \
|
|
< plugin.rc.in > $@
|
|
|
|
$(PLUGIN_NAME).dll $(PLUGIN_NAME).exp $(PLUGIN_NAME).lib : $(OBJECTS) $(LINK_PLUGIN_WITH) $(RESOURCE)
|
|
link -dll /out:$(PLUGIN_NAME).dll $(LDFLAGS) $(OBJECTS) $(LINK_PLUGIN_WITH) \
|
|
$(GLIB_LIBS) $(RESOURCE)
|
|
|
|
!ENDIF
|
|
|
|
clean:
|
|
rm -f $(OBJECTS) $(PLUGIN_NAME).dll $(PLUGIN_NAME).dll.manifest $(PLUGIN_NAME).exp \
|
|
$(RESOURCE) $(PLUGIN_NAME).rc $(PLUGIN_NAME).lib *.pdb
|
|
|
|
distclean: clean
|
|
|
|
maintainer-clean: distclean
|
|
|
|
checkapi:
|
|
$(PERL) ../../tools/checkAPIs.pl -g abort -g termoutput $(TAP_SRC) $(TAP_INCLUDES)
|