Consistently use the "g_string_free returns a C string pointer" idiom.
[metze/wireshark/wip.git] / capchild / Makefile.nmake
1 ## Makefile for building wireshark.exe with Microsoft C and nmake
2 ## Use: $(MAKE) /$(MAKEFLAGS) -f makefile.nmake
3 #
4
5 include ..\config.nmake
6 include ..\Makefile.nmake.inc
7
8 ############### no need to modify below this line #########
9
10 # We use GENERATED_CFLAGS to get around flex's non-LLP64-compliant output
11 GENERATED_CFLAGS=\
12         $(STANDARD_CFLAGS) \
13         /Zm800 \
14         /I.. /I../wiretap $(GLIB_CFLAGS) $(GNUTLS_CFLAGS) \
15         /I$(PCAP_DIR)\WPCAP\LIBPCAP /I$(PCAP_DIR)\WPCAP\LIBPCAP\bpf \
16         /I$(PCAP_DIR)\WPCAP\LIBPCAP\lbl \
17         /I$(PCAP_DIR)\include $(AIRPCAP_CFLAGS) \
18         $(PORTAUDIO_CFLAGS) $(GEOIP_CFLAGS) $(WINSPARKLE_CFLAGS) \
19         $(HHC_CFLAGS)
20
21 CFLAGS=$(WARNINGS_ARE_ERRORS) $(GENERATED_CFLAGS)
22
23 .c.obj::
24         $(CC) $(CFLAGS) $(WSUG_CFLAGS) -Fd.\ -c $<
25
26 include Makefile.common
27
28
29 # if you add files here, be sure to include them also in Makefile.am EXTRA_DIST
30 CAPCHILD_OBJECTS = \
31         $(CAPCHILD_SRC:.c=.obj)
32
33 RUNLEX=../tools/runlex.sh
34
35 libcapchild.lib : ..\config.h $(CAPCHILD_OBJECTS)
36         link /lib /out:libcapchild.lib $(CAPCHILD_OBJECTS)
37
38 clean:
39         rm -f $(CAPCHILD_OBJECTS) $(WIRESHARK_TAP_OBJECTS) libcapchild.lib \
40                 *.nativecodeanalysis.xml *.pdb *.sbr \
41                 doxygen.cfg html/*.* wireshark-tap-register-cache.pkl
42         if exist html rmdir html
43
44 distclean: clean
45
46 maintainer-clean: distclean
47         rm -f $(GENERATED_FILES)
48
49 # convert doxygen.cfg.in to doxygen.cfg with stamped version info
50 doxygen.cfg: ..\config.nmake doxygen.cfg.in
51 !IFDEF DOXYGEN
52         sed -e s/@VERSION@/$(VERSION)/ \
53             < doxygen.cfg.in > $@
54 !ENDIF
55
56 doxygen-run:
57 !IFDEF DOXYGEN
58         $(DOXYGEN) doxygen.cfg
59 !ENDIF
60
61 # MS html help compiler hhc returns 1 on success, but as nmake expects 0 it would stop here.
62 # the prepended -1 will raise the accepted error levels of nmake, so it will continue
63 doxygen.chm:
64 !IFDEF HHC
65         -1 $(HHC) html\index.hhp
66 !ENDIF
67
68 doxygen: doxygen.cfg doxygen-run doxygen.chm
69
70 checkapi: checkapi-base checkapi-todo
71
72 checkapi-base:
73         $(PERL) ../tools/checkAPIs.pl -g deprecated-gtk -build \
74         $(CAPCHILD_SRC)
75
76 checkapi-todo:
77         $(PERL) ../tools/checkAPIs.pl -M -g deprecated-gtk-todo -build \
78         $(CAPCHILD_SRC)