vlm | 4362b1d | 2007-06-29 12:46:06 +0000 | [diff] [blame] | 1 | ASN_MODULE_SOURCES= \ |
| 2 | ULP-PDU.c \ |
| 3 | UlpMessage.c \ |
| 4 | SUPLINIT.c \ |
| 5 | Notification.c \ |
| 6 | NotificationType.c \ |
| 7 | EncodingType.c \ |
| 8 | FormatIndicator.c \ |
| 9 | SLPMode.c \ |
| 10 | MAC.c \ |
| 11 | KeyIdentity.c \ |
| 12 | SUPLSTART.c \ |
| 13 | SETCapabilities.c \ |
| 14 | PosTechnology.c \ |
| 15 | PrefMethod.c \ |
| 16 | PosProtocol.c \ |
| 17 | SUPLRESPONSE.c \ |
| 18 | SETAuthKey.c \ |
| 19 | KeyIdentity4.c \ |
| 20 | SUPLPOSINIT.c \ |
| 21 | RequestedAssistData.c \ |
| 22 | NavigationModel.c \ |
| 23 | SatelliteInfo.c \ |
| 24 | SatelliteInfoElement.c \ |
| 25 | SUPLPOS.c \ |
| 26 | PosPayLoad.c \ |
| 27 | SUPLEND.c \ |
| 28 | SUPLAUTHREQ.c \ |
| 29 | SETNonce.c \ |
| 30 | KeyIdentity2.c \ |
| 31 | SUPLAUTHRESP.c \ |
| 32 | SPCAuthKey.c \ |
| 33 | KeyIdentity3.c \ |
| 34 | Version.c \ |
| 35 | SessionID.c \ |
| 36 | SetSessionID.c \ |
| 37 | SETId.c \ |
| 38 | SlpSessionID.c \ |
| 39 | IPAddress.c \ |
| 40 | SLPAddress.c \ |
| 41 | FQDN.c \ |
| 42 | Ver.c \ |
| 43 | LocationId.c \ |
| 44 | Status.c \ |
| 45 | CellInfo.c \ |
| 46 | Position.c \ |
| 47 | PositionEstimate.c \ |
| 48 | AltitudeInfo.c \ |
| 49 | CdmaCellInformation.c \ |
| 50 | GsmCellInformation.c \ |
| 51 | WcdmaCellInformation.c \ |
| 52 | FrequencyInfo.c \ |
| 53 | FrequencyInfoFDD.c \ |
| 54 | FrequencyInfoTDD.c \ |
| 55 | UARFCN.c \ |
| 56 | NMR.c \ |
| 57 | NMRelement.c \ |
| 58 | MeasuredResultsList.c \ |
| 59 | MeasuredResults.c \ |
| 60 | CellMeasuredResultsList.c \ |
| 61 | UTRA-CarrierRSSI.c \ |
| 62 | CellMeasuredResults.c \ |
| 63 | CellParametersID.c \ |
| 64 | TGSN.c \ |
| 65 | PrimaryCCPCH-RSCP.c \ |
| 66 | TimeslotISCP.c \ |
| 67 | TimeslotISCP-List.c \ |
| 68 | PrimaryCPICH-Info.c \ |
| 69 | CPICH-Ec-N0.c \ |
| 70 | CPICH-RSCP.c \ |
| 71 | Pathloss.c \ |
| 72 | StatusCode.c \ |
| 73 | QoP.c \ |
| 74 | Velocity.c \ |
| 75 | Horvel.c \ |
| 76 | Horandvervel.c \ |
| 77 | Horveluncert.c \ |
| 78 | Horandveruncert.c \ |
| 79 | PosMethod.c |
| 80 | |
| 81 | ASN_MODULE_HEADERS= \ |
| 82 | ULP-PDU.h \ |
| 83 | UlpMessage.h \ |
| 84 | SUPLINIT.h \ |
| 85 | Notification.h \ |
| 86 | NotificationType.h \ |
| 87 | EncodingType.h \ |
| 88 | FormatIndicator.h \ |
| 89 | SLPMode.h \ |
| 90 | MAC.h \ |
| 91 | KeyIdentity.h \ |
| 92 | SUPLSTART.h \ |
| 93 | SETCapabilities.h \ |
| 94 | PosTechnology.h \ |
| 95 | PrefMethod.h \ |
| 96 | PosProtocol.h \ |
| 97 | SUPLRESPONSE.h \ |
| 98 | SETAuthKey.h \ |
| 99 | KeyIdentity4.h \ |
| 100 | SUPLPOSINIT.h \ |
| 101 | RequestedAssistData.h \ |
| 102 | NavigationModel.h \ |
| 103 | SatelliteInfo.h \ |
| 104 | SatelliteInfoElement.h \ |
| 105 | SUPLPOS.h \ |
| 106 | PosPayLoad.h \ |
| 107 | SUPLEND.h \ |
| 108 | SUPLAUTHREQ.h \ |
| 109 | SETNonce.h \ |
| 110 | KeyIdentity2.h \ |
| 111 | SUPLAUTHRESP.h \ |
| 112 | SPCAuthKey.h \ |
| 113 | KeyIdentity3.h \ |
| 114 | Version.h \ |
| 115 | SessionID.h \ |
| 116 | SetSessionID.h \ |
| 117 | SETId.h \ |
| 118 | SlpSessionID.h \ |
| 119 | IPAddress.h \ |
| 120 | SLPAddress.h \ |
| 121 | FQDN.h \ |
| 122 | Ver.h \ |
| 123 | LocationId.h \ |
| 124 | Status.h \ |
| 125 | CellInfo.h \ |
| 126 | Position.h \ |
| 127 | PositionEstimate.h \ |
| 128 | AltitudeInfo.h \ |
| 129 | CdmaCellInformation.h \ |
| 130 | GsmCellInformation.h \ |
| 131 | WcdmaCellInformation.h \ |
| 132 | FrequencyInfo.h \ |
| 133 | FrequencyInfoFDD.h \ |
| 134 | FrequencyInfoTDD.h \ |
| 135 | UARFCN.h \ |
| 136 | NMR.h \ |
| 137 | NMRelement.h \ |
| 138 | MeasuredResultsList.h \ |
| 139 | MeasuredResults.h \ |
| 140 | CellMeasuredResultsList.h \ |
| 141 | UTRA-CarrierRSSI.h \ |
| 142 | CellMeasuredResults.h \ |
| 143 | CellParametersID.h \ |
| 144 | TGSN.h \ |
| 145 | PrimaryCCPCH-RSCP.h \ |
| 146 | TimeslotISCP.h \ |
| 147 | TimeslotISCP-List.h \ |
| 148 | PrimaryCPICH-Info.h \ |
| 149 | CPICH-Ec-N0.h \ |
| 150 | CPICH-RSCP.h \ |
| 151 | Pathloss.h \ |
| 152 | StatusCode.h \ |
| 153 | QoP.h \ |
| 154 | Velocity.h \ |
| 155 | Horvel.h \ |
| 156 | Horandvervel.h \ |
| 157 | Horveluncert.h \ |
| 158 | Horandveruncert.h \ |
| 159 | PosMethod.h |
| 160 | |
| 161 | ASN_MODULE_HEADERS+=BOOLEAN.h |
| 162 | ASN_MODULE_SOURCES+=BOOLEAN.c |
| 163 | ASN_MODULE_HEADERS+=ENUMERATED.h |
| 164 | ASN_MODULE_SOURCES+=ENUMERATED.c |
| 165 | ASN_MODULE_HEADERS+=INTEGER.h |
| 166 | ASN_MODULE_HEADERS+=NativeEnumerated.h |
| 167 | ASN_MODULE_HEADERS+=GeneralizedTime.h |
| 168 | ASN_MODULE_SOURCES+=GeneralizedTime.c |
| 169 | ASN_MODULE_HEADERS+=IA5String.h |
| 170 | ASN_MODULE_SOURCES+=IA5String.c |
| 171 | ASN_MODULE_SOURCES+=INTEGER.c |
| 172 | ASN_MODULE_SOURCES+=NativeEnumerated.c |
| 173 | ASN_MODULE_HEADERS+=NativeInteger.h |
| 174 | ASN_MODULE_SOURCES+=NativeInteger.c |
| 175 | ASN_MODULE_HEADERS+=UTCTime.h |
| 176 | ASN_MODULE_SOURCES+=UTCTime.c |
| 177 | ASN_MODULE_HEADERS+=VisibleString.h |
| 178 | ASN_MODULE_SOURCES+=VisibleString.c |
| 179 | ASN_MODULE_HEADERS+=asn_SEQUENCE_OF.h |
| 180 | ASN_MODULE_SOURCES+=asn_SEQUENCE_OF.c |
| 181 | ASN_MODULE_HEADERS+=asn_SET_OF.h |
| 182 | ASN_MODULE_SOURCES+=asn_SET_OF.c |
| 183 | ASN_MODULE_HEADERS+=constr_CHOICE.h |
| 184 | ASN_MODULE_SOURCES+=constr_CHOICE.c |
| 185 | ASN_MODULE_HEADERS+=constr_SEQUENCE.h |
| 186 | ASN_MODULE_SOURCES+=constr_SEQUENCE.c |
| 187 | ASN_MODULE_HEADERS+=constr_SEQUENCE_OF.h |
| 188 | ASN_MODULE_SOURCES+=constr_SEQUENCE_OF.c |
| 189 | ASN_MODULE_HEADERS+=constr_SET_OF.h |
| 190 | ASN_MODULE_SOURCES+=constr_SET_OF.c |
| 191 | ASN_MODULE_HEADERS+=asn_application.h |
| 192 | ASN_MODULE_HEADERS+=asn_system.h |
| 193 | ASN_MODULE_HEADERS+=asn_codecs.h |
| 194 | ASN_MODULE_HEADERS+=asn_internal.h |
| 195 | ASN_MODULE_HEADERS+=OCTET_STRING.h |
| 196 | ASN_MODULE_SOURCES+=OCTET_STRING.c |
| 197 | ASN_MODULE_HEADERS+=BIT_STRING.h |
| 198 | ASN_MODULE_SOURCES+=BIT_STRING.c |
| 199 | ASN_MODULE_SOURCES+=asn_codecs_prim.c |
| 200 | ASN_MODULE_HEADERS+=asn_codecs_prim.h |
| 201 | ASN_MODULE_HEADERS+=ber_tlv_length.h |
| 202 | ASN_MODULE_SOURCES+=ber_tlv_length.c |
| 203 | ASN_MODULE_HEADERS+=ber_tlv_tag.h |
| 204 | ASN_MODULE_SOURCES+=ber_tlv_tag.c |
| 205 | ASN_MODULE_HEADERS+=ber_decoder.h |
| 206 | ASN_MODULE_SOURCES+=ber_decoder.c |
| 207 | ASN_MODULE_HEADERS+=der_encoder.h |
| 208 | ASN_MODULE_SOURCES+=der_encoder.c |
| 209 | ASN_MODULE_HEADERS+=constr_TYPE.h |
| 210 | ASN_MODULE_SOURCES+=constr_TYPE.c |
| 211 | ASN_MODULE_HEADERS+=constraints.h |
| 212 | ASN_MODULE_SOURCES+=constraints.c |
| 213 | ASN_MODULE_HEADERS+=xer_support.h |
| 214 | ASN_MODULE_SOURCES+=xer_support.c |
| 215 | ASN_MODULE_HEADERS+=xer_decoder.h |
| 216 | ASN_MODULE_SOURCES+=xer_decoder.c |
| 217 | ASN_MODULE_HEADERS+=xer_encoder.h |
| 218 | ASN_MODULE_SOURCES+=xer_encoder.c |
| 219 | ASN_MODULE_HEADERS+=per_support.h |
| 220 | ASN_MODULE_SOURCES+=per_support.c |
| 221 | ASN_MODULE_HEADERS+=per_decoder.h |
| 222 | ASN_MODULE_SOURCES+=per_decoder.c |
| 223 | ASN_MODULE_HEADERS+=per_encoder.h |
| 224 | ASN_MODULE_SOURCES+=per_encoder.c |
| 225 | ASN_MODULE_HEADERS+=per_opentype.h |
| 226 | ASN_MODULE_SOURCES+=per_opentype.c |
| 227 | ASN_CONVERTER_SOURCES+=converter-sample.c |
vlm | 7489c7f | 2007-06-29 12:59:12 +0000 | [diff] [blame^] | 228 | ASN_CONVERTER_SOURCES+=pdu_collection.c |
vlm | 4362b1d | 2007-06-29 12:46:06 +0000 | [diff] [blame] | 229 | |
| 230 | |
| 231 | lib_LTLIBRARIES=libsomething.la |
| 232 | libsomething_la_SOURCES=$(ASN_MODULE_SOURCES) $(ASN_MODULE_HEADERS) |
| 233 | |
| 234 | # This file may be used as an input for make(3) |
| 235 | # Remove the lines below to convert it into a pure .am file |
| 236 | TARGET = ulp-dump |
vlm | 7489c7f | 2007-06-29 12:59:12 +0000 | [diff] [blame^] | 237 | CFLAGS += -DASN_CONVERTER_TITLE="OMA UserPlane Location Protocol decoder" -DHAVE_CONFIG_H -DJUNKTEST -DPDU=ULP_PDU -DASN_PDU_COLLECTION -I. |
vlm | 4362b1d | 2007-06-29 12:46:06 +0000 | [diff] [blame] | 238 | OBJS=${ASN_MODULE_SOURCES:.c=.o} ${ASN_CONVERTER_SOURCES:.c=.o} |
| 239 | |
| 240 | all: ULP-PDU.c $(TARGET) |
| 241 | |
| 242 | $(TARGET): ${OBJS} |
| 243 | $(CC) $(CFLAGS) -o $(TARGET) ${OBJS} $(LDFLAGS) $(LIBS) |
| 244 | |
| 245 | .SUFFIXES: |
| 246 | .SUFFIXES: .c .o |
| 247 | |
| 248 | .c.o: |
| 249 | $(CC) $(CFLAGS) -o $@ -c $< |
| 250 | |
| 251 | clean: |
| 252 | rm -f $(TARGET) |
| 253 | rm -f $(OBJS) |
| 254 | |
| 255 | regen: regenerate-from-asn1-source |
| 256 | |
| 257 | regenerate-from-asn1-source: |
vlm | 7489c7f | 2007-06-29 12:59:12 +0000 | [diff] [blame^] | 258 | ../../asn1c/asn1c -S ../../skeletons -pdu=ULP-PDU -pdu=auto -fcompound-names -gen-PER ../ulp.asn1 |
vlm | 4362b1d | 2007-06-29 12:46:06 +0000 | [diff] [blame] | 259 | |
| 260 | |
| 261 | ULP-PDU.c: ../sample.makefile.regen ../ulp.asn1 |
| 262 | make regen-makefile |
| 263 | @touch ULP-PDU.c |
| 264 | make |
| 265 | |
| 266 | regen-makefile: |
| 267 | TITLE="OMA UserPlane Location Protocol decoder" \ |
vlm | 7489c7f | 2007-06-29 12:59:12 +0000 | [diff] [blame^] | 268 | ASN1CMDOPTS="-pdu=auto -fcompound-names -gen-PER" \ |
vlm | 4362b1d | 2007-06-29 12:46:06 +0000 | [diff] [blame] | 269 | ASN1MODULES="../ulp.asn1" \ |
| 270 | ASN1PDU=ULP-PDU \ |
| 271 | PROGNAME=ulp-dump \ |
| 272 | ../sample.makefile.regen |
| 273 | |
| 274 | check: ${TARGET} check-ber check-xer check-per |
| 275 | @echo ================ |
| 276 | @echo All tests passed |
| 277 | @echo ================ |
| 278 | |
| 279 | check-ber: |
| 280 | @if test -f sample-ULP-PDU-1.[db]er ; then \ |
| 281 | for f in sample-ULP-PDU-*.[db]er; do \ |
| 282 | for b in 1 17 33 980 8192; do \ |
| 283 | echo "Recoding $$f into XER and back ($$b)..."; \ |
| 284 | ./${TARGET} -b $$b -iber -oxer $$f > ./.tmp.1.$$$$ || exit 2; \ |
| 285 | ./${TARGET} -b $$b -ixer -oxer ./.tmp.1.$$$$ > ./.tmp.2.$$$$ || exit 3; \ |
| 286 | diff ./.tmp.1.$$$$ ./.tmp.2.$$$$ || exit 4; \ |
| 287 | rm -f ./.tmp.[12].$$$$; \ |
| 288 | echo "Test junking $$f (please wait)..."; \ |
| 289 | ./${TARGET} -J0.0001 -n 1000 -b $$b -iber -onull $$f || exit 5; \ |
| 290 | ./${TARGET} -J0.001 -n 1000 -b $$b -iber -onull $$f || exit 6; \ |
| 291 | done; done; fi |
| 292 | |
| 293 | check-xer: |
| 294 | @if test -f sample-ULP-PDU-1.xer ; then \ |
| 295 | for f in sample-ULP-PDU-*.xer; do \ |
| 296 | for b in 1 17 33 980 8192; do \ |
| 297 | echo "Recoding $$f into DER and back ($$b)..."; \ |
| 298 | ./${TARGET} -b $$b -ixer -oder $$f > ./.tmp.1.$$$$ || exit 2; \ |
| 299 | ./${TARGET} -b $$b -iber -oxer ./.tmp.1.$$$$ > ./.tmp.2.$$$$ || exit 3; \ |
| 300 | diff $$f ./.tmp.2.$$$$ || exit 4; \ |
| 301 | rm -f ./.tmp.[12].$$$$; \ |
| 302 | echo "Test junking $$f (please wait)..."; \ |
| 303 | ./${TARGET} -J0.0001 -n 1000 -b $$b -ixer -onull $$f || exit 5; \ |
| 304 | ./${TARGET} -J0.001 -n 1000 -b $$b -ixer -onull $$f || exit 6; \ |
| 305 | done; done; fi |
| 306 | |
| 307 | check-per: |
| 308 | @if test -f sample-ULP-PDU-1-nopad.per ; then \ |
| 309 | for f in sample-ULP-PDU-[1-9]-nopad.per; do \ |
| 310 | for b in 1 17 33 980 8192; do \ |
| 311 | echo "Recoding non-padded $$f into DER into XER and back ($$b)..."; \ |
| 312 | ./${TARGET} -b $$b -per-nopad -iper -oder $$f > ./.tmp.1.$$$$ || exit 2; \ |
| 313 | ./${TARGET} -b $$b -iber -oxer ./.tmp.1.$$$$ > ./.tmp.2.$$$$ || exit 3; \ |
| 314 | ./${TARGET} -b $$b -ixer -oder ./.tmp.2.$$$$ > ./.tmp.3.$$$$ || exit 4; \ |
| 315 | diff ./.tmp.1.$$$$ ./.tmp.3.$$$$ || exit 5; \ |
| 316 | rm -f ./.tmp.[123].$$$$; \ |
| 317 | echo "Test junking $$f (please wait)..."; \ |
| 318 | ./${TARGET} -J0.0001 -n 1000 -b $$b -per-nopad -iper -onull $$f || exit 6; \ |
| 319 | ./${TARGET} -J0.001 -n 1000 -b $$b -per-nopad -iper -onull $$f || exit 7; \ |
| 320 | done; done; fi |
| 321 | @if test -f sample-ULP-PDU-1.per ; then \ |
| 322 | for f in sample-*-[1-9].per; do \ |
| 323 | pdu=`echo $$f | sed -E -e "s/sample-([A-Za-z-]+)-[0-9].*/\1/"`; \ |
| 324 | for b in 1 17 33 980 8192; do \ |
| 325 | echo "Recoding $$f into DER into XER and back ($$b)..."; \ |
| 326 | ./${TARGET} -b $$b -p $$pdu -iper -oder $$f > ./.tmp.1.$$$$ || exit 3; \ |
| 327 | ./${TARGET} -b $$b -p $$pdu -iber -oxer ./.tmp.1.$$$$ > ./.tmp.2.$$$$ || exit 4; \ |
| 328 | ./${TARGET} -b $$b -p $$pdu -ixer -oper ./.tmp.2.$$$$ > ./.tmp.1.$$$$ || exit 5; \ |
| 329 | diff $$f ./.tmp.1.$$$$ || exit 6; \ |
| 330 | rm -f ./.tmp.[12].$$$$; \ |
| 331 | echo "Test junking $$f (please wait)..."; \ |
| 332 | ./${TARGET} -J0.0001 -n 1000 -b $$b -iper -onull $$f || exit 7; \ |
| 333 | ./${TARGET} -J0.001 -n 1000 -b $$b -iper -onull $$f || exit 8; \ |
| 334 | done; done; fi |
| 335 | |
| 336 | distclean: clean |
| 337 | rm -f $(ASN_MODULE_SOURCES) |
| 338 | rm -f $(ASN_MODULE_HEADERS) |
| 339 | rm -f $(ASN_CONVERTER_SOURCES) $(ASN_CONVERTER_HEADERS) |
| 340 | rm -f Makefile.am.sample |