diff --git a/examples/Makefile.am b/examples/Makefile.am index f10d6c1d055cc3186d603c94a23132d71a369787..525ca48911374b7134425ae1529194886a40db04 100644 --- a/examples/Makefile.am +++ b/examples/Makefile.am @@ -26,10 +26,10 @@ $(ASN1_FILES_3): crfc2asn1.pl $(ASN1_SOURCE_3) ./crfc2asn1.pl $(ASN1_SOURCE_3) EXTRA_DIST = $(srcdir)/rfc*.txt \ + $(srcdir)/sample.source.regen \ $(srcdir)/sample.source.*/README \ $(srcdir)/sample.source.*/config.h \ $(srcdir)/sample.source.*/Makefile \ - $(srcdir)/sample.source.*/regenerate.Makefile \ $(srcdir)/sample.source.*/sample-* CLEANFILES = $(ASN1_FILES_1) $(ASN1_FILES_2) $(ASN1_FILES_3) diff --git a/examples/Makefile.in b/examples/Makefile.in index 0786322851b2429e6aeb4cc8f45ac0045e10377c..852a2981dc05570c60ba52722473d69fee6c343f 100644 --- a/examples/Makefile.in +++ b/examples/Makefile.in @@ -177,10 +177,10 @@ ASN1_FILES_3 = \ rfc4511-Lightweight-Directory-Access-Protocol-V3.asn1 EXTRA_DIST = $(srcdir)/rfc*.txt \ + $(srcdir)/sample.source.regen \ $(srcdir)/sample.source.*/README \ $(srcdir)/sample.source.*/config.h \ $(srcdir)/sample.source.*/Makefile \ - $(srcdir)/sample.source.*/regenerate.Makefile \ $(srcdir)/sample.source.*/sample-* CLEANFILES = $(ASN1_FILES_1) $(ASN1_FILES_2) $(ASN1_FILES_3) diff --git a/examples/README b/examples/README index 2ce340a1030fdb924d3ceb4d2b54d211206c29f9..85247f3901b55877d9dbe6243cb317913d93d566 100644 --- a/examples/README +++ b/examples/README @@ -2,7 +2,7 @@ This directory contains a few examples. 1. The ./sample.source.PKIX1 directory contains the X.509 Certificate decoder, - as specified in rfc3280.txt. + as specified in rfc3280.txt. Just type `make` in there to compile. 2. The ./sample.source.TAP3 directory contains the GSM TAP3 decoder. Before trying to compile, read the README file in that directory. diff --git a/examples/sample.source.LDAP3/Makefile b/examples/sample.source.LDAP3/Makefile index 7063af7192c1985fd6e74cdff5be1b7fc32690b4..6337062eb0be8404501b4aaed6ea428fdcd05ff5 100644 --- a/examples/sample.source.LDAP3/Makefile +++ b/examples/sample.source.LDAP3/Makefile @@ -96,18 +96,60 @@ ASN_MODULE_HEADERS= \ ExtendedResponse.h \ IntermediateResponse.h +ASN_MODULE_HEADERS+=ANY.h +ASN_MODULE_SOURCES+=ANY.c +ASN_MODULE_HEADERS+=BMPString.h +ASN_MODULE_SOURCES+=BMPString.c +ASN_MODULE_HEADERS+=UTF8String.h ASN_MODULE_HEADERS+=BOOLEAN.h ASN_MODULE_SOURCES+=BOOLEAN.c ASN_MODULE_HEADERS+=ENUMERATED.h ASN_MODULE_SOURCES+=ENUMERATED.c ASN_MODULE_HEADERS+=INTEGER.h ASN_MODULE_HEADERS+=NativeEnumerated.h +ASN_MODULE_HEADERS+=GeneralString.h +ASN_MODULE_SOURCES+=GeneralString.c +ASN_MODULE_HEADERS+=GeneralizedTime.h +ASN_MODULE_SOURCES+=GeneralizedTime.c +ASN_MODULE_HEADERS+=GraphicString.h +ASN_MODULE_SOURCES+=GraphicString.c +ASN_MODULE_HEADERS+=IA5String.h +ASN_MODULE_SOURCES+=IA5String.c ASN_MODULE_SOURCES+=INTEGER.c +ASN_MODULE_HEADERS+=ISO646String.h +ASN_MODULE_SOURCES+=ISO646String.c ASN_MODULE_HEADERS+=NULL.h ASN_MODULE_SOURCES+=NULL.c ASN_MODULE_SOURCES+=NativeEnumerated.c ASN_MODULE_HEADERS+=NativeInteger.h ASN_MODULE_SOURCES+=NativeInteger.c +ASN_MODULE_HEADERS+=NativeReal.h +ASN_MODULE_SOURCES+=NativeReal.c +ASN_MODULE_HEADERS+=REAL.h +ASN_MODULE_HEADERS+=NumericString.h +ASN_MODULE_SOURCES+=NumericString.c +ASN_MODULE_HEADERS+=OBJECT_IDENTIFIER.h +ASN_MODULE_SOURCES+=OBJECT_IDENTIFIER.c +ASN_MODULE_HEADERS+=ObjectDescriptor.h +ASN_MODULE_SOURCES+=ObjectDescriptor.c +ASN_MODULE_HEADERS+=PrintableString.h +ASN_MODULE_SOURCES+=PrintableString.c +ASN_MODULE_SOURCES+=REAL.c +ASN_MODULE_HEADERS+=RELATIVE-OID.h +ASN_MODULE_SOURCES+=RELATIVE-OID.c +ASN_MODULE_HEADERS+=T61String.h +ASN_MODULE_SOURCES+=T61String.c +ASN_MODULE_HEADERS+=TeletexString.h +ASN_MODULE_SOURCES+=TeletexString.c +ASN_MODULE_HEADERS+=UTCTime.h +ASN_MODULE_SOURCES+=UTCTime.c +ASN_MODULE_SOURCES+=UTF8String.c +ASN_MODULE_HEADERS+=UniversalString.h +ASN_MODULE_SOURCES+=UniversalString.c +ASN_MODULE_HEADERS+=VideotexString.h +ASN_MODULE_SOURCES+=VideotexString.c +ASN_MODULE_HEADERS+=VisibleString.h +ASN_MODULE_SOURCES+=VisibleString.c ASN_MODULE_HEADERS+=asn_SEQUENCE_OF.h ASN_MODULE_SOURCES+=asn_SEQUENCE_OF.c ASN_MODULE_HEADERS+=asn_SET_OF.h @@ -119,6 +161,8 @@ ASN_MODULE_SOURCES+=constr_SEQUENCE.c ASN_MODULE_HEADERS+=constr_SEQUENCE_OF.h ASN_MODULE_SOURCES+=constr_SEQUENCE_OF.c ASN_MODULE_HEADERS+=constr_SET_OF.h +ASN_MODULE_HEADERS+=constr_SET.h +ASN_MODULE_SOURCES+=constr_SET.c ASN_MODULE_SOURCES+=constr_SET_OF.c ASN_MODULE_HEADERS+=asn_application.h ASN_MODULE_HEADERS+=asn_system.h @@ -154,6 +198,7 @@ ASN_MODULE_HEADERS+=per_decoder.h ASN_MODULE_SOURCES+=per_decoder.c ASN_MODULE_HEADERS+=per_encoder.h ASN_MODULE_SOURCES+=per_encoder.c +ASN_CONVERTER_SOURCES+=converter-sample.c lib_LTLIBRARIES=libsomething.la @@ -162,8 +207,8 @@ libsomething_la_SOURCES=$(ASN_MODULE_SOURCES) $(ASN_MODULE_HEADERS) # This file may be used as an input for make(3) # Remove the lines below to convert it into a pure .am file TARGET = ldap3dump -CFLAGS += -I. -DHAVE_CONFIG_H -OBJS=${ASN_MODULE_SOURCES:.c=.o} $(TARGET).o +CFLAGS += -I. -DHAVE_CONFIG_H -DPDU=LDAPMessage +OBJS=${ASN_MODULE_SOURCES:.c=.o} ${ASN_CONVERTER_SOURCES:.c=.o} all: LDAPMessage.c $(TARGET) @@ -183,18 +228,19 @@ clean: regen: regenerate-from-asn1-source regenerate-from-asn1-source: - ../../asn1c/asn1c -fcompound-names -S ../../skeletons ../rfc4511-Lightweight-Directory-Access-Protocol-V3.asn1 + ../../asn1c/asn1c -S ../../skeletons -fcompound-names ../rfc4511-Lightweight-Directory-Access-Protocol-V3.asn1 -LDAPMessage.c: regenerate.Makefile - ./regenerate.Makefile +LDAPMessage.c: ../sample.source.regen + ASN1CMDOPTS="-fcompound-names" \ + ASN1MODULES="../rfc4511-Lightweight-Directory-Access-Protocol-V3.asn1" \ + ASN1PDU=LDAPMessage \ + PROGNAME=ldap3dump \ + ../sample.source.regen @touch LDAPMessage.c make -ASN_CONVERTER=../../skeletons/converter-sample.c -$(TARGET).o: $(ASN_CONVERTER) - $(CC) $(CFLAGS) -DPDU=LDAPMessage -o $(TARGET).o -c $(ASN_CONVERTER) - distclean: clean rm -f $(ASN_MODULE_SOURCES) $(ASN_MODULE_HEADERS) + rm -f $(ASN_CONVERTER_SOURCES) $(ASN_CONVERTER_HEADERS) rm -f Makefile.am.sample diff --git a/examples/sample.source.MEGACO/Makefile b/examples/sample.source.MEGACO/Makefile index e250b52f78c51ade61329a6c67118a04e174b2df..ce307266681b2932ce91c8728295737a7071498b 100644 --- a/examples/sample.source.MEGACO/Makefile +++ b/examples/sample.source.MEGACO/Makefile @@ -214,22 +214,60 @@ ASN_MODULE_HEADERS= \ TimeNotation.h \ Value.h +ASN_MODULE_HEADERS+=ANY.h +ASN_MODULE_SOURCES+=ANY.c +ASN_MODULE_HEADERS+=BMPString.h +ASN_MODULE_SOURCES+=BMPString.c +ASN_MODULE_HEADERS+=UTF8String.h ASN_MODULE_HEADERS+=BOOLEAN.h ASN_MODULE_SOURCES+=BOOLEAN.c ASN_MODULE_HEADERS+=ENUMERATED.h ASN_MODULE_SOURCES+=ENUMERATED.c ASN_MODULE_HEADERS+=INTEGER.h ASN_MODULE_HEADERS+=NativeEnumerated.h +ASN_MODULE_HEADERS+=GeneralString.h +ASN_MODULE_SOURCES+=GeneralString.c +ASN_MODULE_HEADERS+=GeneralizedTime.h +ASN_MODULE_SOURCES+=GeneralizedTime.c +ASN_MODULE_HEADERS+=GraphicString.h +ASN_MODULE_SOURCES+=GraphicString.c ASN_MODULE_HEADERS+=IA5String.h ASN_MODULE_SOURCES+=IA5String.c ASN_MODULE_SOURCES+=INTEGER.c +ASN_MODULE_HEADERS+=ISO646String.h +ASN_MODULE_SOURCES+=ISO646String.c ASN_MODULE_HEADERS+=NULL.h ASN_MODULE_SOURCES+=NULL.c ASN_MODULE_SOURCES+=NativeEnumerated.c ASN_MODULE_HEADERS+=NativeInteger.h ASN_MODULE_SOURCES+=NativeInteger.c +ASN_MODULE_HEADERS+=NativeReal.h +ASN_MODULE_SOURCES+=NativeReal.c +ASN_MODULE_HEADERS+=REAL.h +ASN_MODULE_HEADERS+=NumericString.h +ASN_MODULE_SOURCES+=NumericString.c ASN_MODULE_HEADERS+=OBJECT_IDENTIFIER.h ASN_MODULE_SOURCES+=OBJECT_IDENTIFIER.c +ASN_MODULE_HEADERS+=ObjectDescriptor.h +ASN_MODULE_SOURCES+=ObjectDescriptor.c +ASN_MODULE_HEADERS+=PrintableString.h +ASN_MODULE_SOURCES+=PrintableString.c +ASN_MODULE_SOURCES+=REAL.c +ASN_MODULE_HEADERS+=RELATIVE-OID.h +ASN_MODULE_SOURCES+=RELATIVE-OID.c +ASN_MODULE_HEADERS+=T61String.h +ASN_MODULE_SOURCES+=T61String.c +ASN_MODULE_HEADERS+=TeletexString.h +ASN_MODULE_SOURCES+=TeletexString.c +ASN_MODULE_HEADERS+=UTCTime.h +ASN_MODULE_SOURCES+=UTCTime.c +ASN_MODULE_SOURCES+=UTF8String.c +ASN_MODULE_HEADERS+=UniversalString.h +ASN_MODULE_SOURCES+=UniversalString.c +ASN_MODULE_HEADERS+=VideotexString.h +ASN_MODULE_SOURCES+=VideotexString.c +ASN_MODULE_HEADERS+=VisibleString.h +ASN_MODULE_SOURCES+=VisibleString.c ASN_MODULE_HEADERS+=asn_SEQUENCE_OF.h ASN_MODULE_SOURCES+=asn_SEQUENCE_OF.c ASN_MODULE_HEADERS+=asn_SET_OF.h @@ -241,6 +279,8 @@ ASN_MODULE_SOURCES+=constr_SEQUENCE.c ASN_MODULE_HEADERS+=constr_SEQUENCE_OF.h ASN_MODULE_SOURCES+=constr_SEQUENCE_OF.c ASN_MODULE_HEADERS+=constr_SET_OF.h +ASN_MODULE_HEADERS+=constr_SET.h +ASN_MODULE_SOURCES+=constr_SET.c ASN_MODULE_SOURCES+=constr_SET_OF.c ASN_MODULE_HEADERS+=asn_application.h ASN_MODULE_HEADERS+=asn_system.h @@ -276,6 +316,7 @@ ASN_MODULE_HEADERS+=per_decoder.h ASN_MODULE_SOURCES+=per_decoder.c ASN_MODULE_HEADERS+=per_encoder.h ASN_MODULE_SOURCES+=per_encoder.c +ASN_CONVERTER_SOURCES+=converter-sample.c lib_LTLIBRARIES=libsomething.la @@ -284,8 +325,8 @@ libsomething_la_SOURCES=$(ASN_MODULE_SOURCES) $(ASN_MODULE_HEADERS) # This file may be used as an input for make(3) # Remove the lines below to convert it into a pure .am file TARGET = megacoDump -CFLAGS += -I. -DHAVE_CONFIG_H -OBJS=${ASN_MODULE_SOURCES:.c=.o} $(TARGET).o +CFLAGS += -I. -DHAVE_CONFIG_H -DPDU=MegacoMessage +OBJS=${ASN_MODULE_SOURCES:.c=.o} ${ASN_CONVERTER_SOURCES:.c=.o} all: MegacoMessage.c $(TARGET) @@ -305,18 +346,19 @@ clean: regen: regenerate-from-asn1-source regenerate-from-asn1-source: - ../../asn1c/asn1c -fcompound-names -S ../../skeletons ../rfc3525-MEDIA-GATEWAY-CONTROL.asn1 + ../../asn1c/asn1c -S ../../skeletons -fcompound-names ../rfc3525-MEDIA-GATEWAY-CONTROL.asn1 -MegacoMessage.c: regenerate.Makefile - ./regenerate.Makefile +MegacoMessage.c: ../sample.source.regen + ASN1CMDOPTS="-fcompound-names" \ + ASN1MODULES="../rfc3525-MEDIA-GATEWAY-CONTROL.asn1" \ + ASN1PDU=MegacoMessage \ + PROGNAME=megacoDump \ + ../sample.source.regen @touch MegacoMessage.c make -ASN_CONVERTER=../../skeletons/converter-sample.c -$(TARGET).o: $(ASN_CONVERTER) - $(CC) $(CFLAGS) -DPDU=MegacoMessage -o $(TARGET).o -c $(ASN_CONVERTER) - distclean: clean rm -f $(ASN_MODULE_SOURCES) $(ASN_MODULE_HEADERS) + rm -f $(ASN_CONVERTER_SOURCES) $(ASN_CONVERTER_HEADERS) rm -f Makefile.am.sample diff --git a/examples/sample.source.MHEG5/Makefile b/examples/sample.source.MHEG5/Makefile index 43e6b90cf6da229dbd246b2202bc65ed9299473b..dc3afa60dad3abc14ad09cb0d668f5e666cb08c2 100644 --- a/examples/sample.source.MHEG5/Makefile +++ b/examples/sample.source.MHEG5/Makefile @@ -186,7 +186,8 @@ ASN_MODULE_SOURCES= \ GenericBoolean.c \ GenericOctetString.c \ Colour.c \ - XYPosition.c + XYPosition.c \ + OctetString.c ASN_MODULE_HEADERS= \ InterchangedObject.h \ @@ -376,16 +377,63 @@ ASN_MODULE_HEADERS= \ GenericBoolean.h \ GenericOctetString.h \ Colour.h \ - XYPosition.h + XYPosition.h \ + OctetString.h +ASN_MODULE_HEADERS+=ANY.h +ASN_MODULE_SOURCES+=ANY.c +ASN_MODULE_HEADERS+=BMPString.h +ASN_MODULE_SOURCES+=BMPString.c +ASN_MODULE_HEADERS+=UTF8String.h ASN_MODULE_HEADERS+=BOOLEAN.h ASN_MODULE_SOURCES+=BOOLEAN.c ASN_MODULE_HEADERS+=ENUMERATED.h ASN_MODULE_SOURCES+=ENUMERATED.c ASN_MODULE_HEADERS+=INTEGER.h +ASN_MODULE_HEADERS+=NativeEnumerated.h +ASN_MODULE_HEADERS+=GeneralString.h +ASN_MODULE_SOURCES+=GeneralString.c +ASN_MODULE_HEADERS+=GeneralizedTime.h +ASN_MODULE_SOURCES+=GeneralizedTime.c +ASN_MODULE_HEADERS+=GraphicString.h +ASN_MODULE_SOURCES+=GraphicString.c +ASN_MODULE_HEADERS+=IA5String.h +ASN_MODULE_SOURCES+=IA5String.c ASN_MODULE_SOURCES+=INTEGER.c +ASN_MODULE_HEADERS+=ISO646String.h +ASN_MODULE_SOURCES+=ISO646String.c ASN_MODULE_HEADERS+=NULL.h ASN_MODULE_SOURCES+=NULL.c +ASN_MODULE_SOURCES+=NativeEnumerated.c +ASN_MODULE_HEADERS+=NativeInteger.h +ASN_MODULE_SOURCES+=NativeInteger.c +ASN_MODULE_HEADERS+=NativeReal.h +ASN_MODULE_SOURCES+=NativeReal.c +ASN_MODULE_HEADERS+=REAL.h +ASN_MODULE_HEADERS+=NumericString.h +ASN_MODULE_SOURCES+=NumericString.c +ASN_MODULE_HEADERS+=OBJECT_IDENTIFIER.h +ASN_MODULE_SOURCES+=OBJECT_IDENTIFIER.c +ASN_MODULE_HEADERS+=ObjectDescriptor.h +ASN_MODULE_SOURCES+=ObjectDescriptor.c +ASN_MODULE_HEADERS+=PrintableString.h +ASN_MODULE_SOURCES+=PrintableString.c +ASN_MODULE_SOURCES+=REAL.c +ASN_MODULE_HEADERS+=RELATIVE-OID.h +ASN_MODULE_SOURCES+=RELATIVE-OID.c +ASN_MODULE_HEADERS+=T61String.h +ASN_MODULE_SOURCES+=T61String.c +ASN_MODULE_HEADERS+=TeletexString.h +ASN_MODULE_SOURCES+=TeletexString.c +ASN_MODULE_HEADERS+=UTCTime.h +ASN_MODULE_SOURCES+=UTCTime.c +ASN_MODULE_SOURCES+=UTF8String.c +ASN_MODULE_HEADERS+=UniversalString.h +ASN_MODULE_SOURCES+=UniversalString.c +ASN_MODULE_HEADERS+=VideotexString.h +ASN_MODULE_SOURCES+=VideotexString.c +ASN_MODULE_HEADERS+=VisibleString.h +ASN_MODULE_SOURCES+=VisibleString.c ASN_MODULE_HEADERS+=asn_SEQUENCE_OF.h ASN_MODULE_SOURCES+=asn_SEQUENCE_OF.c ASN_MODULE_HEADERS+=asn_SET_OF.h @@ -428,6 +476,13 @@ ASN_MODULE_HEADERS+=xer_decoder.h ASN_MODULE_SOURCES+=xer_decoder.c ASN_MODULE_HEADERS+=xer_encoder.h ASN_MODULE_SOURCES+=xer_encoder.c +ASN_MODULE_HEADERS+=per_support.h +ASN_MODULE_SOURCES+=per_support.c +ASN_MODULE_HEADERS+=per_decoder.h +ASN_MODULE_SOURCES+=per_decoder.c +ASN_MODULE_HEADERS+=per_encoder.h +ASN_MODULE_SOURCES+=per_encoder.c +ASN_CONVERTER_SOURCES+=converter-sample.c lib_LTLIBRARIES=libsomething.la @@ -436,8 +491,8 @@ libsomething_la_SOURCES=$(ASN_MODULE_SOURCES) $(ASN_MODULE_HEADERS) # This file may be used as an input for make(3) # Remove the lines below to convert it into a pure .am file TARGET = mheg5dump -CFLAGS += -I. -DHAVE_CONFIG_H -OBJS=${ASN_MODULE_SOURCES:.c=.o} $(TARGET).o +CFLAGS += -I. -DHAVE_CONFIG_H -DPDU=InterchangedObject +OBJS=${ASN_MODULE_SOURCES:.c=.o} ${ASN_CONVERTER_SOURCES:.c=.o} all: InterchangedObject.c $(TARGET) @@ -460,20 +515,16 @@ regenerate-from-asn1-source: ../../asn1c/asn1c -S ../../skeletons -fcompound-names ../ISO13522-MHEG-5.asn -../ISO13522-MHEG-5.asn: - @echo The ../ISO13522-MHEG-5.asn file is not yet present. - @echo Please read the README file on how to obtain this file. - @exit 42 - -InterchangedObject.c: ../ISO13522-MHEG-5.asn regenerate.Makefile - ./regenerate.Makefile +InterchangedObject.c: ../sample.source.regen + ASN1CMDOPTS="-fcompound-names" \ + ASN1MODULES="../ISO13522-MHEG-5.asn" \ + ASN1PDU=InterchangedObject \ + PROGNAME=mheg5dump \ + ../sample.source.regen @touch InterchangedObject.c make -ASN_CONVERTER=../../skeletons/converter-sample.c -$(TARGET).o: $(ASN_CONVERTER) - $(CC) $(CFLAGS) -DPDU=InterchangedObject -o $(TARGET).o -c $(ASN_CONVERTER) - distclean: clean rm -f $(ASN_MODULE_SOURCES) $(ASN_MODULE_HEADERS) + rm -f $(ASN_CONVERTER_SOURCES) $(ASN_CONVERTER_HEADERS) rm -f Makefile.am.sample diff --git a/examples/sample.source.PKIX1/Makefile b/examples/sample.source.PKIX1/Makefile index 8ea848d24cd52029f0d0d0f9a3aaf981ba472a7a..caa5b851272952e77be7c5888773b62e2fe132fb 100644 --- a/examples/sample.source.PKIX1/Makefile +++ b/examples/sample.source.PKIX1/Makefile @@ -265,20 +265,38 @@ ASN_MODULE_HEADERS+=ENUMERATED.h ASN_MODULE_SOURCES+=ENUMERATED.c ASN_MODULE_HEADERS+=INTEGER.h ASN_MODULE_HEADERS+=NativeEnumerated.h +ASN_MODULE_HEADERS+=GeneralString.h +ASN_MODULE_SOURCES+=GeneralString.c ASN_MODULE_HEADERS+=GeneralizedTime.h ASN_MODULE_SOURCES+=GeneralizedTime.c +ASN_MODULE_HEADERS+=GraphicString.h +ASN_MODULE_SOURCES+=GraphicString.c ASN_MODULE_HEADERS+=IA5String.h ASN_MODULE_SOURCES+=IA5String.c ASN_MODULE_SOURCES+=INTEGER.c +ASN_MODULE_HEADERS+=ISO646String.h +ASN_MODULE_SOURCES+=ISO646String.c +ASN_MODULE_HEADERS+=NULL.h +ASN_MODULE_SOURCES+=NULL.c ASN_MODULE_SOURCES+=NativeEnumerated.c ASN_MODULE_HEADERS+=NativeInteger.h ASN_MODULE_SOURCES+=NativeInteger.c +ASN_MODULE_HEADERS+=NativeReal.h +ASN_MODULE_SOURCES+=NativeReal.c +ASN_MODULE_HEADERS+=REAL.h ASN_MODULE_HEADERS+=NumericString.h ASN_MODULE_SOURCES+=NumericString.c ASN_MODULE_HEADERS+=OBJECT_IDENTIFIER.h ASN_MODULE_SOURCES+=OBJECT_IDENTIFIER.c +ASN_MODULE_HEADERS+=ObjectDescriptor.h +ASN_MODULE_SOURCES+=ObjectDescriptor.c ASN_MODULE_HEADERS+=PrintableString.h ASN_MODULE_SOURCES+=PrintableString.c +ASN_MODULE_SOURCES+=REAL.c +ASN_MODULE_HEADERS+=RELATIVE-OID.h +ASN_MODULE_SOURCES+=RELATIVE-OID.c +ASN_MODULE_HEADERS+=T61String.h +ASN_MODULE_SOURCES+=T61String.c ASN_MODULE_HEADERS+=TeletexString.h ASN_MODULE_SOURCES+=TeletexString.c ASN_MODULE_HEADERS+=UTCTime.h @@ -286,6 +304,8 @@ ASN_MODULE_SOURCES+=UTCTime.c ASN_MODULE_SOURCES+=UTF8String.c ASN_MODULE_HEADERS+=UniversalString.h ASN_MODULE_SOURCES+=UniversalString.c +ASN_MODULE_HEADERS+=VideotexString.h +ASN_MODULE_SOURCES+=VideotexString.c ASN_MODULE_HEADERS+=VisibleString.h ASN_MODULE_SOURCES+=VisibleString.c ASN_MODULE_HEADERS+=asn_SEQUENCE_OF.h @@ -336,6 +356,7 @@ ASN_MODULE_HEADERS+=per_decoder.h ASN_MODULE_SOURCES+=per_decoder.c ASN_MODULE_HEADERS+=per_encoder.h ASN_MODULE_SOURCES+=per_encoder.c +ASN_CONVERTER_SOURCES+=converter-sample.c lib_LTLIBRARIES=libsomething.la @@ -344,8 +365,8 @@ libsomething_la_SOURCES=$(ASN_MODULE_SOURCES) $(ASN_MODULE_HEADERS) # This file may be used as an input for make(3) # Remove the lines below to convert it into a pure .am file TARGET = x509dump -CFLAGS += -I. -DHAVE_CONFIG_H -OBJS=${ASN_MODULE_SOURCES:.c=.o} $(TARGET).o +CFLAGS += -I. -DHAVE_CONFIG_H -DPDU=Certificate +OBJS=${ASN_MODULE_SOURCES:.c=.o} ${ASN_CONVERTER_SOURCES:.c=.o} all: Certificate.c $(TARGET) @@ -368,15 +389,16 @@ regenerate-from-asn1-source: ../../asn1c/asn1c -S ../../skeletons ../rfc3280-PKIX1Explicit88.asn1 ../rfc3280-PKIX1Implicit88.asn1 -Certificate.c: regenerate.Makefile - ./regenerate.Makefile +Certificate.c: ../sample.source.regen + ASN1CMDOPTS="" \ + ASN1MODULES="../rfc3280-*.asn1" \ + ASN1PDU=Certificate \ + PROGNAME=x509dump \ + ../sample.source.regen @touch Certificate.c make -ASN_CONVERTER=../../skeletons/converter-sample.c -$(TARGET).o: $(ASN_CONVERTER) - $(CC) $(CFLAGS) -DPDU=Certificate -o $(TARGET).o -c $(ASN_CONVERTER) - distclean: clean rm -f $(ASN_MODULE_SOURCES) $(ASN_MODULE_HEADERS) + rm -f $(ASN_CONVERTER_SOURCES) $(ASN_CONVERTER_HEADERS) rm -f Makefile.am.sample diff --git a/examples/sample.source.TAP3/Makefile b/examples/sample.source.TAP3/Makefile index 7b4f3977667818ab7e03da25ec35abc2e40a84fa..f260ed48e3f65ee2c5210a9fdd0bfccc87812c30 100644 --- a/examples/sample.source.TAP3/Makefile +++ b/examples/sample.source.TAP3/Makefile @@ -616,8 +616,60 @@ ASN_MODULE_HEADERS= \ NumberString.h \ PercentageRate.h +ASN_MODULE_HEADERS+=ANY.h +ASN_MODULE_SOURCES+=ANY.c +ASN_MODULE_HEADERS+=BMPString.h +ASN_MODULE_SOURCES+=BMPString.c +ASN_MODULE_HEADERS+=UTF8String.h +ASN_MODULE_HEADERS+=BOOLEAN.h +ASN_MODULE_SOURCES+=BOOLEAN.c +ASN_MODULE_HEADERS+=ENUMERATED.h +ASN_MODULE_SOURCES+=ENUMERATED.c ASN_MODULE_HEADERS+=INTEGER.h +ASN_MODULE_HEADERS+=NativeEnumerated.h +ASN_MODULE_HEADERS+=GeneralString.h +ASN_MODULE_SOURCES+=GeneralString.c +ASN_MODULE_HEADERS+=GeneralizedTime.h +ASN_MODULE_SOURCES+=GeneralizedTime.c +ASN_MODULE_HEADERS+=GraphicString.h +ASN_MODULE_SOURCES+=GraphicString.c +ASN_MODULE_HEADERS+=IA5String.h +ASN_MODULE_SOURCES+=IA5String.c ASN_MODULE_SOURCES+=INTEGER.c +ASN_MODULE_HEADERS+=ISO646String.h +ASN_MODULE_SOURCES+=ISO646String.c +ASN_MODULE_HEADERS+=NULL.h +ASN_MODULE_SOURCES+=NULL.c +ASN_MODULE_SOURCES+=NativeEnumerated.c +ASN_MODULE_HEADERS+=NativeInteger.h +ASN_MODULE_SOURCES+=NativeInteger.c +ASN_MODULE_HEADERS+=NativeReal.h +ASN_MODULE_SOURCES+=NativeReal.c +ASN_MODULE_HEADERS+=REAL.h +ASN_MODULE_HEADERS+=NumericString.h +ASN_MODULE_SOURCES+=NumericString.c +ASN_MODULE_HEADERS+=OBJECT_IDENTIFIER.h +ASN_MODULE_SOURCES+=OBJECT_IDENTIFIER.c +ASN_MODULE_HEADERS+=ObjectDescriptor.h +ASN_MODULE_SOURCES+=ObjectDescriptor.c +ASN_MODULE_HEADERS+=PrintableString.h +ASN_MODULE_SOURCES+=PrintableString.c +ASN_MODULE_SOURCES+=REAL.c +ASN_MODULE_HEADERS+=RELATIVE-OID.h +ASN_MODULE_SOURCES+=RELATIVE-OID.c +ASN_MODULE_HEADERS+=T61String.h +ASN_MODULE_SOURCES+=T61String.c +ASN_MODULE_HEADERS+=TeletexString.h +ASN_MODULE_SOURCES+=TeletexString.c +ASN_MODULE_HEADERS+=UTCTime.h +ASN_MODULE_SOURCES+=UTCTime.c +ASN_MODULE_SOURCES+=UTF8String.c +ASN_MODULE_HEADERS+=UniversalString.h +ASN_MODULE_SOURCES+=UniversalString.c +ASN_MODULE_HEADERS+=VideotexString.h +ASN_MODULE_SOURCES+=VideotexString.c +ASN_MODULE_HEADERS+=VisibleString.h +ASN_MODULE_SOURCES+=VisibleString.c ASN_MODULE_HEADERS+=asn_SEQUENCE_OF.h ASN_MODULE_SOURCES+=asn_SEQUENCE_OF.c ASN_MODULE_HEADERS+=asn_SET_OF.h @@ -629,6 +681,8 @@ ASN_MODULE_SOURCES+=constr_SEQUENCE.c ASN_MODULE_HEADERS+=constr_SEQUENCE_OF.h ASN_MODULE_SOURCES+=constr_SEQUENCE_OF.c ASN_MODULE_HEADERS+=constr_SET_OF.h +ASN_MODULE_HEADERS+=constr_SET.h +ASN_MODULE_SOURCES+=constr_SET.c ASN_MODULE_SOURCES+=constr_SET_OF.c ASN_MODULE_HEADERS+=asn_application.h ASN_MODULE_HEADERS+=asn_system.h @@ -658,6 +712,13 @@ ASN_MODULE_HEADERS+=xer_decoder.h ASN_MODULE_SOURCES+=xer_decoder.c ASN_MODULE_HEADERS+=xer_encoder.h ASN_MODULE_SOURCES+=xer_encoder.c +ASN_MODULE_HEADERS+=per_support.h +ASN_MODULE_SOURCES+=per_support.c +ASN_MODULE_HEADERS+=per_decoder.h +ASN_MODULE_SOURCES+=per_decoder.c +ASN_MODULE_HEADERS+=per_encoder.h +ASN_MODULE_SOURCES+=per_encoder.c +ASN_CONVERTER_SOURCES+=converter-sample.c lib_LTLIBRARIES=libsomething.la @@ -666,8 +727,8 @@ libsomething_la_SOURCES=$(ASN_MODULE_SOURCES) $(ASN_MODULE_HEADERS) # This file may be used as an input for make(3) # Remove the lines below to convert it into a pure .am file TARGET = tap3dump -CFLAGS += -I. -DHAVE_CONFIG_H -OBJS=${ASN_MODULE_SOURCES:.c=.o} $(TARGET).o +CFLAGS += -I. -DHAVE_CONFIG_H -DPDU=DataInterChange +OBJS=${ASN_MODULE_SOURCES:.c=.o} ${ASN_CONVERTER_SOURCES:.c=.o} all: DataInterChange.c $(TARGET) @@ -690,20 +751,16 @@ regenerate-from-asn1-source: ../../asn1c/asn1c -S ../../skeletons ../tap3.asn1 -../tap3.asn1: - @echo The ../tap3.asn1 file is not yet present. - @echo Please read the README file on how to obtain this file. - @exit 42 - -DataInterChange.c: ../tap3.asn1 regenerate.Makefile - ./regenerate.Makefile +DataInterChange.c: ../sample.source.regen + ASN1CMDOPTS="" \ + ASN1MODULES="../tap3.asn1" \ + ASN1PDU=DataInterChange \ + PROGNAME=tap3dump \ + ../sample.source.regen @touch DataInterChange.c make -ASN_CONVERTER=../../skeletons/converter-sample.c -$(TARGET).o: $(ASN_CONVERTER) - $(CC) $(CFLAGS) -DPDU=DataInterChange -o $(TARGET).o -c $(ASN_CONVERTER) - distclean: clean rm -f $(ASN_MODULE_SOURCES) $(ASN_MODULE_HEADERS) + rm -f $(ASN_CONVERTER_SOURCES) $(ASN_CONVERTER_HEADERS) rm -f Makefile.am.sample