1 ## Use: $(MAKE) /$(MAKEFLAGS) -f makefile.nmake
5 include ../../config.nmake
7 UNIX2DOS=$(PERL) ../../tools/unix2dos.pl
10 DISSECTOR_FILES=packet-$(PROTOCOL_NAME).c packet-$(PROTOCOL_NAME).h
11 H235_ASN=H235-SECURITY-MESSAGES.asn H235-SRTP.asn
13 all: generate_dissector
15 generate_dissector: $(DISSECTOR_FILES)
17 $(DISSECTOR_FILES): ../../tools/asn2wrs.py $(H235_ASN) packet-$(PROTOCOL_NAME)-template.c packet-$(PROTOCOL_NAME)-template.h $(PROTOCOL_NAME).cnf
19 $(PYTHON) "../../tools/asn2wrs.py" -e -p $(PROTOCOL_NAME) -c $(PROTOCOL_NAME).cnf -s packet-$(PROTOCOL_NAME)-template $(H235_ASN)
21 @echo Error: You need Python to use asn2wrs.py
26 rm -f parsetab.py parsetab.pyc $(DISSECTOR_FILES)
30 maintainer-clean: distclean
32 # Fix EOL in generated dissectors. Cygwin's python generates files with
33 # mixed EOL styles, which can't be commited to the SVN repository.
34 # Stuff included from template and "cnf" files has "\r\n" on windows, while
35 # the generated stuff has "\n".
37 fix_eol: generate_dissector
38 move packet-$(PROTOCOL_NAME).c packet-$(PROTOCOL_NAME).c.tmp
39 move packet-$(PROTOCOL_NAME).h packet-$(PROTOCOL_NAME).h.tmp
40 $(UNIX2DOS) < packet-$(PROTOCOL_NAME).c.tmp > packet-$(PROTOCOL_NAME).c
41 $(UNIX2DOS) < packet-$(PROTOCOL_NAME).h.tmp > packet-$(PROTOCOL_NAME).h
42 del /f packet-$(PROTOCOL_NAME).c.tmp packet-$(PROTOCOL_NAME).h.tmp
44 copy_files: generate_dissector fix_eol
45 xcopy packet-$(PROTOCOL_NAME).c ..\..\epan\dissectors /d /y
46 xcopy packet-$(PROTOCOL_NAME).h ..\..\epan\dissectors /d /y