5 include ..\config.nmake
7 include ..\Makefile.nmake.inc
9 include Makefile.common
11 CFLAGS=-WX -DYYMALLOC=malloc -DYYFREE=free -DHAVE_CONFIG_H /I. /I.. \
12 $(GLIB_CFLAGS) $(ZLIB_CFLAGS) /I$(PCAP_DIR)/include \
13 -D_U_="" $(LOCAL_CFLAGS)
15 CVARSDLL=-DWIN32 -DNULL=0 -D_MT -D_DLL
18 $(CC) $(CVARSDLL) $(CFLAGS) -Fd.\ -c $<
20 OBJECTS=$(NONGENERATED_C_FILES:.c=.obj) $(GENERATED_C_FILES:.c=.obj) file_util.obj
26 all: wiretap-$(WTAP_VERSION).dll
28 wiretap-$(WTAP_VERSION).lib: wiretap-$(WTAP_VERSION).dll
29 wiretap-$(WTAP_VERSION).exp: wiretap-$(WTAP_VERSION).dll
31 wiretap-$(WTAP_VERSION).dll : $(OBJECTS) wtap.def ..\image\wiretap.res
32 $(link) $(dlllflags) $(conlibsdll) \
34 /DEF:wtap.def /OUT:wiretap-$(WTAP_VERSION).dll \
35 /IMPLIB:wiretap-$(WTAP_VERSION).lib \
36 ..\image\wiretap.res \
37 $(OBJECTS) $(wiretap_LIBS)
38 !IF "$(MSVC_VARIANT)" == "MSVC2005" || "$(MSVC_VARIANT)" == "MSVC2005EE" || "$(MSVC_VARIANT)" == "DOTNET20"
39 mt.exe -nologo -manifest "wiretap-$(WTAP_VERSION).dll.manifest" -outputresource:wiretap-$(WTAP_VERSION).dll;2
42 RUNLEX = ..\tools\runlex.sh
44 ascend-scanner_lex.h : ascend-scanner.c
45 ascend-scanner.obj : ascend-scanner.c ascend-grammar.h
47 k12text_lex.h : k12text.c
48 k12text.obj : k12text.c
50 ascend-grammar.c ascend-grammar.h : ascend-grammar.y
51 $(YACC) $(YACC_OPTS) -d -p ascend ascend-grammar.y -o ascend-grammar.c
58 wiretap-*.dll.manifest \
62 # We remove the generated files with "distclean" because one of them,
63 # "ascend-scanner.c", needs different #includes for UN*X and Windows
64 # (UN*X versions of Flex make it include <unistd.h>, but that's a
65 # UN*X-only header), so if you're going to build from source, you need
66 # to build "ascend-scanner.c" from "ascend-scanner.l" with Flex.
67 # This might not be necessary for "ascend-grammar.{c,h}", but as
68 # long as you need Flex, you might as well get Bison....
71 rm -f $(GENERATED_FILES)
73 maintainer-clean: distclean