![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
187 lines
5.4 KiB
Makefile
187 lines
5.4 KiB
Makefile
## Makefile for building wireshark.exe with Microsoft C and nmake
|
|
## Use: $(MAKE) /$(MAKEFLAGS) -f makefile.nmake
|
|
#
|
|
# $Id$
|
|
|
|
include ..\config.nmake
|
|
include ..\Makefile.nmake.inc
|
|
|
|
############### no need to modify below this line #########
|
|
|
|
# We use GENERATED_CFLAGS to get around flex's non-LLP64-compliant output
|
|
GENERATED_CFLAGS=\
|
|
$(STANDARD_CFLAGS) \
|
|
-D_NEED_VAR_IMPORT_ /Zm800 \
|
|
/I.. /I../wiretap $(GTK_CFLAGS) $(GNUTLS_CFLAGS) \
|
|
/I$(PCAP_DIR)\WPCAP\LIBPCAP /I$(PCAP_DIR)\WPCAP\LIBPCAP\bpf \
|
|
/I$(PCAP_DIR)\WPCAP\LIBPCAP\lbl \
|
|
/I$(PCAP_DIR)\include $(AIRPCAP_CFLAGS) \
|
|
$(PORTAUDIO_CFLAGS) \
|
|
$(HHC_CFLAGS)
|
|
|
|
CFLAGS=$(WARNINGS_ARE_ERRORS) $(GENERATED_CFLAGS)
|
|
|
|
.c.obj::
|
|
$(CC) $(CVARSDLL) $(CFLAGS) $(WSUG_CFLAGS) -Fd.\ -c $<
|
|
|
|
include Makefile.common
|
|
|
|
|
|
# if you add files here, be sure to include them also in Makefile.am EXTRA_DIST
|
|
WIRESHARK_GTK_SRC = \
|
|
$(WIRESHARK_GTK_SRC) \
|
|
$(GENERATED_C_FILES) \
|
|
capture_if_details_dlg_win32.c
|
|
|
|
PORT_AUDIO_SRC = \
|
|
!IFDEF PORTAUDIO_DIR
|
|
!IF "$(PORTAUDIO_VERSION)" == "18"
|
|
pa_lib.c \
|
|
!ELSE
|
|
pa_allocation.c \
|
|
pa_converters.c \
|
|
pa_cpuload.c \
|
|
pa_dither.c \
|
|
pa_front.c \
|
|
pa_process.c \
|
|
pa_skeleton.c \
|
|
pa_stream.c \
|
|
pa_trace.c \
|
|
pa_win_util.c \
|
|
pa_win_hostapis.c \
|
|
pa_x86_plain_converters.c \
|
|
pa_win_waveformat.c \
|
|
!ENDIF
|
|
pa_win_wmme.c
|
|
!ENDIF
|
|
|
|
WIRESHARK_TAP_OBJECTS = $(WIRESHARK_TAP_SRC:.c=.obj)
|
|
|
|
|
|
WIRESHARK_GTK_OBJECTS = \
|
|
$(WIRESHARK_GTK_SRC:.c=.obj) \
|
|
$(DIRTY_GENERATED_C_FILES:.c=.obj) \
|
|
$(PORT_AUDIO_SRC:.c=.obj)
|
|
|
|
libui.lib : ..\config.h $(WIRESHARK_GTK_OBJECTS) $(WIRESHARK_TAP_OBJECTS)
|
|
link /lib /out:libui.lib $(WIRESHARK_GTK_OBJECTS) $(WIRESHARK_TAP_OBJECTS) winmm.lib
|
|
|
|
# The shell script runs slowly, as multiple greps and seds are run
|
|
# for each input file; this is especially slow on Windows. Therefore,
|
|
# if Python is present (as indicated by PYTHON being defined), we run
|
|
# a faster Python script to do that work instead.
|
|
#
|
|
# The first argument is the directory in which the source files live.
|
|
# The second argument is "plugin", to indicate that we should build
|
|
# a plugin.c file for a plugin.
|
|
# All subsequent arguments are the files to scan.
|
|
#
|
|
!IFDEF PYTHON
|
|
wireshark-tap-register.c: $(WIRESHARK_TAP_SRC) ../tools/make-tap-reg.py
|
|
@echo Making wireshark-tap-register.c (using python)
|
|
@$(PYTHON) "../tools/make-tap-reg.py" . taps $(WIRESHARK_TAP_SRC)
|
|
!ELSE
|
|
wireshark-tap-register.c: $(WIRESHARK_TAP_SRC) ../tools/make-tapreg-dotc Makefile.common
|
|
@echo Making wireshark-tap-register.c
|
|
@$(SH) ../tools/make-tapreg-dotc wireshark-tap-register.c . $(WIRESHARK_TAP_SRC)
|
|
!ENDIF
|
|
|
|
RUNLEX=..\tools\runlex.sh
|
|
|
|
text_import_scanner.h: text_import_scanner.c
|
|
text_import_scanner.obj : text_import_scanner.c
|
|
$(CC) $(CVARSDLL) $(GENERATED_CFLAGS) $(WSUG_CFLAGS) -Fd.\ -c $?
|
|
|
|
!IF "$(PORTAUDIO_VERSION)" == "18"
|
|
pa_lib.obj: $(PORTAUDIO_DIR)\pa_common\pa_lib.c
|
|
$(CC) -c $(LOCAL_CFLAGS) $?
|
|
|
|
pa_win_wmme.obj: $(PORTAUDIO_DIR)\pa_win_wmme\pa_win_wmme.c
|
|
$(CC) -c $(LOCAL_CFLAGS) $(PORTAUDIO_CFLAGS) $?
|
|
!ELSE
|
|
pa_front.obj: $(PORTAUDIO_DIR)\src\common\pa_front.c
|
|
$(CC) -c $(LOCAL_CFLAGS) $(PORTAUDIO_CFLAGS) $?
|
|
|
|
pa_allocation.obj: $(PORTAUDIO_DIR)\src\common\pa_allocation.c
|
|
$(CC) -c $(LOCAL_CFLAGS) $(PORTAUDIO_CFLAGS) $?
|
|
|
|
pa_converters.obj: $(PORTAUDIO_DIR)\src\common\pa_converters.c
|
|
$(CC) -c $(LOCAL_CFLAGS) $(PORTAUDIO_CFLAGS) $?
|
|
|
|
pa_cpuload.obj: $(PORTAUDIO_DIR)\src\common\pa_cpuload.c
|
|
$(CC) -c $(LOCAL_CFLAGS) $(PORTAUDIO_CFLAGS) $?
|
|
|
|
pa_dither.obj: $(PORTAUDIO_DIR)\src\common\pa_dither.c
|
|
$(CC) -c $(LOCAL_CFLAGS) $(PORTAUDIO_CFLAGS) $?
|
|
|
|
pa_process.obj: $(PORTAUDIO_DIR)\src\common\pa_process.c
|
|
$(CC) -c $(LOCAL_CFLAGS) $(PORTAUDIO_CFLAGS) $?
|
|
|
|
pa_skeleton.obj: $(PORTAUDIO_DIR)\src\common\pa_skeleton.c
|
|
$(CC) -c $(LOCAL_CFLAGS) $(PORTAUDIO_CFLAGS) $?
|
|
|
|
pa_stream.obj: $(PORTAUDIO_DIR)\src\common\pa_stream.c
|
|
$(CC) -c $(LOCAL_CFLAGS) $(PORTAUDIO_CFLAGS) $?
|
|
|
|
pa_trace.obj: $(PORTAUDIO_DIR)\src\common\pa_trace.c
|
|
$(CC) -c $(LOCAL_CFLAGS) $(PORTAUDIO_CFLAGS) $?
|
|
|
|
pa_win_wmme.obj: $(PORTAUDIO_DIR)\src\hostapi\wmme\pa_win_wmme.c
|
|
$(CC) -c $(LOCAL_CFLAGS) $(PORTAUDIO_CFLAGS) $?
|
|
|
|
pa_win_util.obj: $(PORTAUDIO_DIR)\src\os\win\pa_win_util.c
|
|
$(CC) -c $(LOCAL_CFLAGS) $(PORTAUDIO_CFLAGS) $?
|
|
|
|
pa_win_hostapis.obj: $(PORTAUDIO_DIR)\src\os\win\pa_win_hostapis.c
|
|
$(CC) -c $(LOCAL_CFLAGS) $(PORTAUDIO_CFLAGS) $?
|
|
|
|
pa_x86_plain_converters.obj: $(PORTAUDIO_DIR)\src\os\win\pa_x86_plain_converters.c
|
|
$(CC) -c $(LOCAL_CFLAGS) $(PORTAUDIO_CFLAGS) $?
|
|
|
|
pa_win_waveformat.obj: $(PORTAUDIO_DIR)\src\os\win\pa_win_waveformat.c
|
|
$(CC) -c $(LOCAL_CFLAGS) $(PORTAUDIO_CFLAGS) $?
|
|
|
|
!ENDIF
|
|
|
|
clean:
|
|
rm -f $(WIRESHARK_GTK_OBJECTS) $(WIRESHARK_TAP_OBJECTS) libui.lib *.pdb doxygen.cfg html/*.* wireshark-tap-register-cache.pkl
|
|
if exist html rmdir html
|
|
|
|
distclean: clean
|
|
|
|
maintainer-clean: distclean
|
|
rm -f $(GENERATED_FILES)
|
|
|
|
# convert doxygen.cfg.in to doxygen.cfg with stamped version info
|
|
doxygen.cfg: ..\config.nmake doxygen.cfg.in
|
|
!IFDEF DOXYGEN
|
|
sed -e s/@VERSION@/$(VERSION)/ \
|
|
< doxygen.cfg.in > $@
|
|
!ENDIF
|
|
|
|
doxygen-run:
|
|
!IFDEF DOXYGEN
|
|
$(DOXYGEN) doxygen.cfg
|
|
!ENDIF
|
|
|
|
# MS html help compiler hhc returns 1 on success, but as nmake expects 0 it would stop here.
|
|
# the prepended -1 will raise the accepted error levels of nmake, so it will continue
|
|
doxygen.chm:
|
|
!IFDEF HHC
|
|
-1 $(HHC) html\index.hhp
|
|
!ENDIF
|
|
|
|
doxygen: doxygen.cfg doxygen-run doxygen.chm
|
|
|
|
checkapi: checkapi-base checkapi-todo
|
|
|
|
checkapi-base:
|
|
$(PERL) ../tools/checkAPIs.pl -g deprecated-gtk \
|
|
$(WIRESHARK_GTK_SRC) \
|
|
$(WIRESHARK_TAP_SRC)
|
|
|
|
checkapi-todo:
|
|
$(PERL) ../tools/checkAPIs.pl -M -g deprecated-gtk-todo \
|
|
$(WIRESHARK_GTK_SRC) \
|
|
$(WIRESHARK_TAP_SRC)
|