aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAnders Broman <anders.broman@ericsson.com>2007-05-06 19:56:01 +0000
committerAnders Broman <anders.broman@ericsson.com>2007-05-06 19:56:01 +0000
commit91466a5503f7aab0f674e097dcfa31836df4b757 (patch)
tree378b6ffca6b38bb931d43770d2e16c384b46073e
parent3da55888e6d89aa1dc0cc59fc52b4cd1b31cfa2e (diff)
Add mpeg to the Win makefiles.
svn path=/trunk/; revision=21702
-rw-r--r--asn1/Makefile.nmake9
-rw-r--r--asn1/mpeg/Makefile.nmake54
2 files changed, 63 insertions, 0 deletions
diff --git a/asn1/Makefile.nmake b/asn1/Makefile.nmake
index fcafaa5010..daf64dcdfb 100644
--- a/asn1/Makefile.nmake
+++ b/asn1/Makefile.nmake
@@ -29,6 +29,7 @@ ber: \
logotype-cert-extn \
MAP_Dialogue \
mms \
+ mpeg \
ns-cert-exts \
ocsp \
pkcs1 \
@@ -155,6 +156,9 @@ clean:
cd mms
$(MAKE) /$(MAKEFLAGS) -f Makefile.nmake clean
cd ..
+ cd mpeg
+ $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake clean
+ cd ..
cd nbap
$(MAKE) /$(MAKEFLAGS) -f Makefile.nmake clean
cd ..
@@ -405,6 +409,11 @@ mms::
$(MAKE) /$(MAKEFLAGS) -f Makefile.nmake copy_files
cd ..
+mpeg::
+ cd mpeg
+ $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake copy_files
+ cd ..
+
nbap::
cd nbap
$(MAKE) /$(MAKEFLAGS) -f Makefile.nmake copy_files
diff --git a/asn1/mpeg/Makefile.nmake b/asn1/mpeg/Makefile.nmake
new file mode 100644
index 0000000000..41e17408cf
--- /dev/null
+++ b/asn1/mpeg/Makefile.nmake
@@ -0,0 +1,54 @@
+## Use: $(MAKE) /$(MAKEFLAGS) -f makefile.nmake
+#
+# $Id$
+
+include ../../config.nmake
+
+UNIX2DOS=$(PERL) ../../tools/unix2dos.pl
+
+PROTOCOL_NAME=mpeg
+MPEG_AUDIO=packet-$(PROTOCOL_NAME)-audio.c
+MPEG_PES=packet-$(PROTOCOL_NAME)-pes.c
+DISSECTOR_FILES=$(MPEG_AUDIO) $(MPEG_PES)
+all: generate_dissector
+
+generate_dissector: $(DISSECTOR_FILES)
+
+$(MPEG_AUDIO): ../../tools/asn2wrs.py $(PROTOCOL_NAME)-audio.asn packet-$(PROTOCOL_NAME)-audio-template.c $(PROTOCOL_NAME)-audio.cnf
+!IFDEF PYTHON
+ $(PYTHON) "../../tools/asn2wrs.py" -b -e -p $(PROTOCOL_NAME)-audio -c $(PROTOCOL_NAME)-audio.cnf -s packet-$(PROTOCOL_NAME)-audio-template mpeg-audio.asn
+!ELSE
+ @echo Error: You need Python to use asn2wrs.py
+ @exit 1
+!ENDIF
+
+$(MPEG_PES): ../../tools/asn2wrs.py $(PROTOCOL_NAME)-pes.asn packet-$(PROTOCOL_NAME)-pes-template.c $(PROTOCOL_NAME)-pes.cnf
+!IFDEF PYTHON
+ $(PYTHON) "../../tools/asn2wrs.py" -b -e -p $(PROTOCOL_NAME)-pes -c $(PROTOCOL_NAME)-pes.cnf -o $(PROTOCOL_NAME)-pes -s packet-$(PROTOCOL_NAME)-pes-template $(PROTOCOL_NAME)-pes.asn
+!ELSE
+ @echo Error: You need Python to use asn2wrs.py
+ @exit 1
+!ENDIF
+
+clean:
+ rm -f parsetab.py parsetab.pyc $(DISSECTOR_FILES)
+
+distclean: clean
+
+maintainer-clean: distclean
+
+# Fix EOL in generated dissectors. Cygwin's python generates files with
+# mixed EOL styles, which can't be commited to the SVN repository.
+# Stuff included from template and "cnf" files has "\r\n" on windows, while
+# the generated stuff has "\n".
+
+fix_eol: generate_dissector
+ move packet-$(PROTOCOL_NAME)-audio.c packet-$(PROTOCOL_NAME)-audio.c.tmp
+ move packet-$(PROTOCOL_NAME)-pes.c packet-$(PROTOCOL_NAME)-pes.c.tmp
+ $(UNIX2DOS) < packet-$(PROTOCOL_NAME)-audio.c.tmp > packet-$(PROTOCOL_NAME)-audio.c
+ $(UNIX2DOS) < packet-$(PROTOCOL_NAME)-pes.c.tmp > packet-$(PROTOCOL_NAME)-pes.c
+ del /f packet-$(PROTOCOL_NAME)-audio.c.tmp packet-$(PROTOCOL_NAME)-pes.c.tmp
+
+copy_files: generate_dissector fix_eol
+ xcopy packet-$(PROTOCOL_NAME)-audio.c ..\..\epan\dissectors /d /y
+ xcopy packet-$(PROTOCOL_NAME)-pes.c ..\..\epan\dissectors /d /y