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
12 all: generate_dissector
14 generate_dissector: $(DISSECTOR_FILES)
16 $(DISSECTOR_FILES): ../../tools/asn2eth.py CRMF.asn packet-crmf-template.c packet-crmf-template.h crmf.cnf
18 $(PYTHON) ../../tools/asn2eth.py -X -b -e -p $(PROTOCOL_NAME) -c crmf.cnf -s packet-crmf-template CRMF.asn
20 @echo Error: You need Python to use asn2eth.py
25 rm -f parsetab.py parsetab.pyc $(DISSECTOR_FILES)
29 maintainer-clean: distclean
31 # Fix EOL in generated dissectors. Cygwin's python generates files with
32 # mixed EOL styles, which can't be commited to the SVN repository.
33 # Stuff included from template and "cnf" files has "\r\n" on windows, while
34 # the generated stuff has "\n".
36 fix_eol: generate_dissector
37 move packet-$(PROTOCOL_NAME).c packet-$(PROTOCOL_NAME).c.tmp
38 move packet-$(PROTOCOL_NAME).h packet-$(PROTOCOL_NAME).h.tmp
39 $(UNIX2DOS) < packet-$(PROTOCOL_NAME).c.tmp > packet-$(PROTOCOL_NAME).c
40 $(UNIX2DOS) < packet-$(PROTOCOL_NAME).h.tmp > packet-$(PROTOCOL_NAME).h
41 del /f packet-$(PROTOCOL_NAME).c.tmp packet-$(PROTOCOL_NAME).h.tmp
43 copy_files: generate_dissector fix_eol
44 xcopy packet-$(PROTOCOL_NAME).c ..\..\epan\dissectors /d /y
45 xcopy packet-$(PROTOCOL_NAME).h ..\..\epan\dissectors /d /y