aboutsummaryrefslogtreecommitdiffstats
path: root/asn1/q932
diff options
context:
space:
mode:
authorGuy Harris <guy@alum.mit.edu>2007-04-30 08:55:59 +0000
committerGuy Harris <guy@alum.mit.edu>2007-04-30 08:55:59 +0000
commit358b838924a8f4254b0ce64095e99b17354b6735 (patch)
tree1ed5ebdd8de8e5578ba4c0589fd3f1d7706ae612 /asn1/q932
parent864003260334393725cf8fc7b6184bf1f7cea6d0 (diff)
Fix up the asn/q932 Makefile as per Tomas Kukosa's suggestion - and make
it a lot more like the Makefile.nmake file. Also, use $(PROTOCOL_NAME) in a couple of places in Makefile.nmake where it wasn't being used before. (It might be interesting to see whether we can use a template for these Makefiles, and just tweak some variables at the beginning.) That lets us get a Q.932 ROS dissector with the right file name and with "q932.ros" rather than "q932-ros" as the dissector name; do that. svn path=/trunk/; revision=21625
Diffstat (limited to 'asn1/q932')
-rw-r--r--asn1/q932/Makefile14
-rw-r--r--asn1/q932/Makefile.nmake4
-rw-r--r--asn1/q932/packet-q932-ros-template.c4
-rw-r--r--asn1/q932/packet-q932-template.c8
4 files changed, 17 insertions, 13 deletions
diff --git a/asn1/q932/Makefile b/asn1/q932/Makefile
index b1f8966d58..eeea5bcd30 100644
--- a/asn1/q932/Makefile
+++ b/asn1/q932/Makefile
@@ -1,16 +1,20 @@
# $Id$
-DISSECTOR_FILES=packet-q932.c packet-q932.h packet-q932-ros.c packet-q932-ros.h
+PROTOCOL_NAME=q932
+Q932_FILES=packet-$(PROTOCOL_NAME).c packet-$(PROTOCOL_NAME).h
+Q932_ROS_FILES=packet-$(PROTOCOL_NAME)-ros.c packet-$(PROTOCOL_NAME)-ros.h
+DISSECTOR_FILES=$(Q932_FILES) $(Q932_ROS_FILES)
+Q932_ASN=Addressing-Data-Elements.asn Network-Facility-Extension.asn Network-Protocol-Profile-component.asn Interpretation-component.asn
all: generate_dissector
generate_dissector: $(DISSECTOR_FILES)
-packet-q932.c packet-q932.h: ../../tools/asn2wrs.py packet-q932-template.c packet-q932-template.h q932.cnf
- python ../../tools/asn2wrs.py -b -T -e -p q932 -c q932.cnf -s packet-q932-template Addressing-Data-Elements.asn Network-Facility-Extension.asn Network-Protocol-Profile-component.asn Interpretation-component.asn
+$(Q932_FILES): ../../tools/asn2wrs.py $(Q932_ASN) packet-$(PROTOCOL_NAME)-template.c packet-$(PROTOCOL_NAME)-template.h $(PROTOCOL_NAME).cnf
+ python ../../tools/asn2wrs.py -b -T -e -p $(PROTOCOL_NAME) -c $(PROTOCOL_NAME).cnf -s packet-$(PROTOCOL_NAME)-template $(Q932_ASN)
-packet-q932-ros.c packet-q932-ros.h: ../../tools/asn2wrs.py packet-q932-ros-template.c packet-q932-ros-template.h q932-ros.cnf
- python ../../tools/asn2wrs.py -b -T -e -p q932-ros -c q932-ros.cnf -s packet-q932-ros-template q932-ros.asn
+$(Q932_ROS_FILES): ../../tools/asn2wrs.py $(PROTOCOL_NAME)-ros.asn packet-$(PROTOCOL_NAME)-ros-template.c packet-$(PROTOCOL_NAME)-ros-template.h $(PROTOCOL_NAME)-ros.cnf
+ python ../../tools/asn2wrs.py -b -T -e -p $(PROTOCOL_NAME).ros -c $(PROTOCOL_NAME)-ros.cnf -o $(PROTOCOL_NAME)-ros -s packet-$(PROTOCOL_NAME)-ros-template $(PROTOCOL_NAME)-ros.asn
clean:
rm -f parsetab.py $(DISSECTOR_FILES)
diff --git a/asn1/q932/Makefile.nmake b/asn1/q932/Makefile.nmake
index 146374b713..bf829d3b2e 100644
--- a/asn1/q932/Makefile.nmake
+++ b/asn1/q932/Makefile.nmake
@@ -24,9 +24,9 @@ $(Q932_FILES): ../../tools/asn2wrs.py $(Q932_ASN) packet-$(PROTOCOL_NAME)-templa
@exit 1
!ENDIF
-$(Q932_ROS_FILES): ../../tools/asn2wrs.py q932-ros.asn packet-$(PROTOCOL_NAME)-ros-template.c packet-$(PROTOCOL_NAME)-ros-template.h $(PROTOCOL_NAME)-ros.cnf
+$(Q932_ROS_FILES): ../../tools/asn2wrs.py $(PROTOCOL_NAME)-ros.asn packet-$(PROTOCOL_NAME)-ros-template.c packet-$(PROTOCOL_NAME)-ros-template.h $(PROTOCOL_NAME)-ros.cnf
!IFDEF PYTHON
- $(PYTHON) "../../tools/asn2wrs.py" -b -T -p $(PROTOCOL_NAME).ros -c $(PROTOCOL_NAME)-ros.cnf -o $(PROTOCOL_NAME)-ros -s packet-$(PROTOCOL_NAME)-ros-template q932-ros.asn
+ $(PYTHON) "../../tools/asn2wrs.py" -b -T -p $(PROTOCOL_NAME).ros -c $(PROTOCOL_NAME)-ros.cnf -o $(PROTOCOL_NAME)-ros -s packet-$(PROTOCOL_NAME)-ros-template $(PROTOCOL_NAME)-ros.asn
!ELSE
@echo Error: You need Python to use asn2wrs.py
@exit 1
diff --git a/asn1/q932/packet-q932-ros-template.c b/asn1/q932/packet-q932-ros-template.c
index de6570646b..d2a7a8450d 100644
--- a/asn1/q932/packet-q932-ros-template.c
+++ b/asn1/q932/packet-q932-ros-template.c
@@ -38,8 +38,8 @@
#include "packet-q932-ros.h"
#define PNAME "Q.932 Operations Service Element"
-#define PSNAME "Q932-ROS"
-#define PFNAME "q932-ros"
+#define PSNAME "Q932.ROS"
+#define PFNAME "q932.ros"
/* Initialize the protocol and registered fields */
int proto_rose = -1;
diff --git a/asn1/q932/packet-q932-template.c b/asn1/q932/packet-q932-template.c
index 46a3f65140..e67f35c935 100644
--- a/asn1/q932/packet-q932-template.c
+++ b/asn1/q932/packet-q932-template.c
@@ -311,10 +311,10 @@ void proto_register_q932(void) {
proto_register_subtree_array(ett, array_length(ett));
/* Register dissector tables */
- q932_rose_ctx.arg_global_dissector_table = register_dissector_table("q932-ros.global.arg", "Q.932 Operation Argument (global opcode)", FT_STRING, BASE_NONE);
- q932_rose_ctx.res_global_dissector_table = register_dissector_table("q932-ros.global.res", "Q.932 Operation Result (global opcode)", FT_STRING, BASE_NONE);
- q932_rose_ctx.arg_local_dissector_table = register_dissector_table("q932-ros.local.arg", "Q.932 Operation Argument (local opcode)", FT_UINT32, BASE_HEX);
- q932_rose_ctx.res_local_dissector_table = register_dissector_table("q932-ros.local.res", "Q.932 Operation Result (local opcode)", FT_UINT32, BASE_HEX);
+ q932_rose_ctx.arg_global_dissector_table = register_dissector_table("q932.ros.global.arg", "Q.932 Operation Argument (global opcode)", FT_STRING, BASE_NONE);
+ q932_rose_ctx.res_global_dissector_table = register_dissector_table("q932.ros.global.res", "Q.932 Operation Result (global opcode)", FT_STRING, BASE_NONE);
+ q932_rose_ctx.arg_local_dissector_table = register_dissector_table("q932.ros.local.arg", "Q.932 Operation Argument (local opcode)", FT_UINT32, BASE_HEX);
+ q932_rose_ctx.res_local_dissector_table = register_dissector_table("q932.ros.local.res", "Q.932 Operation Result (local opcode)", FT_UINT32, BASE_HEX);
}
/*--- proto_reg_handoff_q932 ------------------------------------------------*/