RTSE and PRES relies on the TCP conversation to do reassembly, switch to
[metze/wireshark/wip.git] / asn1 / Makefile.inc.nmake
1 # To be included into the asn1 Makefiles for Windows builds
2 #
3 # Wireshark - Network traffic analyzer
4 # By Gerald Combs <gerald@wireshark.org>
5 # Copyright 1998 Gerald Combs
6 #
7 # This program is free software; you can redistribute it and/or
8 # modify it under the terms of the GNU General Public License
9 # as published by the Free Software Foundation; either version 2
10 # of the License, or (at your option) any later version.
11 #
12 # This program is distributed in the hope that it will be useful,
13 # but WITHOUT ANY WARRANTY; without even the implied warranty of
14 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
15 # GNU General Public License for more details.
16 #
17 # You should have received a copy of the GNU General Public License
18 # along with this program; if not, write to the Free Software
19 # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
20
21
22 DISSECTOR=../../epan/dissectors/packet-$(PROTOCOL_NAME).c
23 # This header file need not exist/get generated.  It is only used when cleaning.
24 DISSECTOR_HEADER=../../epan/dissectors/packet-$(PROTOCOL_NAME).h
25
26 all: generate_export $(DISSECTOR)
27
28 generate_export: $(EXPORT_FILES)
29
30 !IFNDEF PROTO_OPT
31 PROTO_OPT = -p $(PROTOCOL_NAME)
32 !ENDIF
33
34 $(DISSECTOR): ../../tools/asn2wrs.py $(SRC_FILES) $(EXTRA_CNF)
35         $(PYTHON) "../../tools/asn2wrs.py" \
36                 $(A2W_FLAGS) \
37                 $(PROTO_OPT) \
38                 -c ./$(PROTOCOL_NAME).cnf \
39                 -s ./packet-$(PROTOCOL_NAME)-template \
40                 -D . \
41                 -O ../../epan/dissectors \
42                 $(EXT_ASN_FILE_LIST) $(ASN_FILE_LIST) $(EXT_ASN_FILE_LIST_LATE)
43
44 !IFDEF EXPORT_FILES
45 $(EXPORT_FILES): ../../tools/asn2wrs.py $(SRC_FILES) $(EXPORT_DEPENDS)
46         $(PYTHON) "../../tools/asn2wrs.py" \
47                 -E $(A2W_FLAGS) \
48                 $(PROTO_OPT) \
49                 -c ./$(PROTOCOL_NAME).cnf \
50                 -D . \
51                 $(EXT_ASN_FILE_LIST) $(ASN_FILE_LIST) $(EXT_ASN_FILE_LIST_LATE)
52 !ENDIF
53
54 # Don't clean these up until/unless we start building them...
55 #               $(DISSECTOR) \
56 #               $(DISSECTOR_HEADER)
57 clean:
58         rm -f parsetab.py \
59                 parsetab.pyc \
60                 *-exp.cnf \
61                 packet-*-{dis-tab,ettarr,ett,fn,hfarr,hf,table*,val}.[hc]
62
63
64 distclean: clean
65
66 maintainer-clean: distclean
67
68 # Fix EOL in generated dissectors. Cygwin's python generates files with
69 # mixed EOL styles, which can't be commited to the SVN repository.
70 # Stuff included from template and "cnf" files has "\r\n" on windows, while
71 # the generated stuff has "\n".
72
73 fix_eol: $(DISSECTOR)
74         u2d $(DISSECTOR) $(DISSECTOR_HEADER)
75