From 31303c098199b84db6d3a59d86ce20302d35b981 Mon Sep 17 00:00:00 2001
From: Lev Walkin <vlm@lionet.info>
Date: Wed, 13 Apr 2005 12:02:54 +0000
Subject: [PATCH] generalization

---
 examples/sample.source.PKIX1/Makefile | 6 +++---
 examples/sample.source.PKIX1/config.h | 2 --
 examples/sample.source.TAP3/Makefile  | 2 +-
 examples/sample.source.TAP3/config.h  | 2 --
 4 files changed, 4 insertions(+), 8 deletions(-)

diff --git a/examples/sample.source.PKIX1/Makefile b/examples/sample.source.PKIX1/Makefile
index c625ed8c..8125af7c 100644
--- a/examples/sample.source.PKIX1/Makefile
+++ b/examples/sample.source.PKIX1/Makefile
@@ -358,14 +358,14 @@ regenerate-from-asn1-source:
 	../../asn1c/asn1c -S ../../skeletons ../rfc3280-PKIX1Explicit88.asn1 ../rfc3280-PKIX1Implicit88.asn1
 
 
-Attribute.c: regenerate.Makefile
+Certificate.c: regenerate.Makefile
 	./regenerate.Makefile
-	@touch Attribute.c
+	@touch Certificate.c
 	make
 
 ASN_DECODER_TEMPLATE=../../skeletons/asn-decoder-template.c
 $(TARGET).o: $(ASN_DECODER_TEMPLATE)
-	$(CC) $(CFLAGS) -o $(TARGET).o -c $(ASN_DECODER_TEMPLATE)
+	$(CC) $(CFLAGS) -Dasn_DEF=asn_DEF_Certificate -o $(TARGET).o -c $(ASN_DECODER_TEMPLATE)
 
 distclean: clean
 	rm -f $(ASN_MODULE_SOURCES) $(ASN_MODULE_HEADERS)
diff --git a/examples/sample.source.PKIX1/config.h b/examples/sample.source.PKIX1/config.h
index 2f6a3921..2dda9297 100644
--- a/examples/sample.source.PKIX1/config.h
+++ b/examples/sample.source.PKIX1/config.h
@@ -8,5 +8,3 @@ extern int opt_debug;
 			__FILE__, __LINE__);	\
 	} while(0)
 
-/* Which type is the PDU; for ../../skeletons/asn-decoder-template.c */
-#define	asn_DEF	asn_DEF_Certificate
diff --git a/examples/sample.source.TAP3/Makefile b/examples/sample.source.TAP3/Makefile
index fcc51262..f990b6d5 100644
--- a/examples/sample.source.TAP3/Makefile
+++ b/examples/sample.source.TAP3/Makefile
@@ -702,7 +702,7 @@ DataInterChange.c: ../tap3.asn1 regenerate.Makefile
 
 ASN_DECODER_TEMPLATE=../../skeletons/asn-decoder-template.c
 $(TARGET).o: $(ASN_DECODER_TEMPLATE)
-	$(CC) $(CFLAGS) -o $(TARGET).o -c $(ASN_DECODER_TEMPLATE)
+	$(CC) $(CFLAGS) -Dasn_DEF=asn_DEF_DataInterChange -o $(TARGET).o -c $(ASN_DECODER_TEMPLATE)
 
 distclean: clean
 	rm -f $(ASN_MODULE_SOURCES) $(ASN_MODULE_HEADERS)
diff --git a/examples/sample.source.TAP3/config.h b/examples/sample.source.TAP3/config.h
index 30728e12..2dda9297 100644
--- a/examples/sample.source.TAP3/config.h
+++ b/examples/sample.source.TAP3/config.h
@@ -8,5 +8,3 @@ extern int opt_debug;
 			__FILE__, __LINE__);	\
 	} while(0)
 
-/* Which type is the PDU; for ../../skeletons/asn-decoder-template.c */
-#define	asn_DEF	asn_DEF_DataInterChange
-- 
GitLab