6229c1d6507fa7db8100a08cb7d207a897d44389
[com/asn1c.git] / examples / sample.source.MHEG5 / Makefile
1 ASN_MODULE_SRCS=        \
2         InterchangedObject.c    \
3         RootClass.c     \
4         GroupClass.c    \
5         StandardIdentifier.c    \
6         GroupItem.c     \
7         ApplicationClass.c      \
8         DefaultAttribute.c      \
9         FontBody.c      \
10         SceneClass.c    \
11         SceneCoordinateSystem.c \
12         AspectRatio.c   \
13         NextScene.c     \
14         IngredientClass.c       \
15         ContentBody.c   \
16         ReferencedContent.c     \
17         LinkClass.c     \
18         LinkCondition.c \
19         EventType.c     \
20         EventData.c     \
21         ProgramClass.c  \
22         ResidentProgramClass.c  \
23         RemoteProgramClass.c    \
24         InterchangedProgramClass.c      \
25         PaletteClass.c  \
26         FontClass.c     \
27         CursorShapeClass.c      \
28         VariableClass.c \
29         OriginalValue.c \
30         BooleanVariableClass.c  \
31         IntegerVariableClass.c  \
32         OctetStringVariableClass.c      \
33         ObjectRefVariableClass.c        \
34         ContentRefVariableClass.c       \
35         PresentableClass.c      \
36         TokenManagerClass.c     \
37         Movement.c      \
38         TokenGroupClass.c       \
39         TokenGroupItem.c        \
40         ActionSlot.c    \
41         ListGroupClass.c        \
42         VisibleClass.c  \
43         OriginalBoxSize.c       \
44         BitmapClass.c   \
45         LineArtClass.c  \
46         RectangleClass.c        \
47         DynamicLineArtClass.c   \
48         TextClass.c     \
49         Justification.c \
50         LineOrientation.c       \
51         StartCorner.c   \
52         StreamClass.c   \
53         StreamComponent.c       \
54         Storage.c       \
55         AudioClass.c    \
56         VideoClass.c    \
57         Termination.c   \
58         RTGraphicsClass.c       \
59         InteractibleClass.c     \
60         SliderClass.c   \
61         Orientation.c   \
62         SliderStyle.c   \
63         EntryFieldClass.c       \
64         InputType.c     \
65         HyperTextClass.c        \
66         ButtonClass.c   \
67         HotspotClass.c  \
68         PushButtonClass.c       \
69         SwitchButtonClass.c     \
70         ButtonStyle.c   \
71         ActionClass.c   \
72         ElementaryAction.c      \
73         Add.c   \
74         AddItem.c       \
75         Append.c        \
76         Call.c  \
77         CallActionSlot.c        \
78         Clone.c \
79         CloseConnection.c       \
80         DelItem.c       \
81         DeselectItem.c  \
82         Divide.c        \
83         DrawArc.c       \
84         DrawLine.c      \
85         DrawOval.c      \
86         DrawPolygon.c   \
87         DrawPolyline.c  \
88         DrawRectangle.c \
89         DrawSector.c    \
90         Fork.c  \
91         GetAvailabilityStatus.c \
92         GetBoxSize.c    \
93         GetCellItem.c   \
94         GetCursorPosition.c     \
95         GetEngineSupport.c      \
96         GetEntryPoint.c \
97         GetFillColour.c \
98         GetFirstItem.c  \
99         GetHighlightStatus.c    \
100         GetInteractionStatus.c  \
101         GetItemStatus.c \
102         GetLabel.c      \
103         GetLastAnchorFired.c    \
104         GetLineColour.c \
105         GetLineStyle.c  \
106         GetLineWidth.c  \
107         GetListItem.c   \
108         GetListSize.c   \
109         GetOverwriteMode.c      \
110         GetPortion.c    \
111         GetPosition.c   \
112         GetRunningStatus.c      \
113         GetSelectionStatus.c    \
114         GetSliderValue.c        \
115         GetTextContent.c        \
116         GetTextData.c   \
117         GetTokenPosition.c      \
118         GetVolume.c     \
119         Modulo.c        \
120         Move.c  \
121         MoveTo.c        \
122         Multiply.c      \
123         OpenConnection.c        \
124         PutBefore.c     \
125         PutBehind.c     \
126         ReadPersistent.c        \
127         ScaleBitmap.c   \
128         ScaleVideo.c    \
129         ScrollItems.c   \
130         SelectItem.c    \
131         SendEvent.c     \
132         SetBoxSize.c    \
133         SetCachePriority.c      \
134         SetCounterEndPosition.c \
135         SetCounterPosition.c    \
136         SetCounterTrigger.c     \
137         SetCursorPosition.c     \
138         SetCursorShape.c        \
139         SetData.c       \
140         SetEntryPoint.c \
141         SetFillColour.c \
142         SetFirstItem.c  \
143         SetFontRef.c    \
144         SetHighlightStatus.c    \
145         SetInteractionStatus.c  \
146         SetLabel.c      \
147         SetLineColour.c \
148         SetLineStyle.c  \
149         SetLineWidth.c  \
150         SetOverwriteMode.c      \
151         SetPaletteRef.c \
152         SetPortion.c    \
153         SetPosition.c   \
154         SetSliderValue.c        \
155         SetSpeed.c      \
156         SetTimer.c      \
157         NewTimer.c      \
158         SetTransparency.c       \
159         SetVariable.c   \
160         SetVolume.c     \
161         Step.c  \
162         StorePersistent.c       \
163         Subtract.c      \
164         TestVariable.c  \
165         ToggleItem.c    \
166         TransitionTo.c  \
167         ConnectionTagOrNull.c   \
168         ComparisonValue.c       \
169         EmulatedEventData.c     \
170         NewColour.c     \
171         NewContent.c    \
172         NewFont.c       \
173         NewReferencedContent.c  \
174         NewContentSize.c        \
175         NewVariableValue.c      \
176         Parameter.c     \
177         Point.c \
178         Rational.c      \
179         ObjectReference.c       \
180         ExternalReference.c     \
181         IndirectReference.c     \
182         ContentReference.c      \
183         GenericObjectReference.c        \
184         GenericContentReference.c       \
185         GenericInteger.c        \
186         GenericBoolean.c        \
187         GenericOctetString.c    \
188         Colour.c        \
189         XYPosition.c
190
191 ASN_MODULE_HDRS=        \
192         InterchangedObject.h    \
193         RootClass.h     \
194         GroupClass.h    \
195         StandardIdentifier.h    \
196         GroupItem.h     \
197         ApplicationClass.h      \
198         DefaultAttribute.h      \
199         FontBody.h      \
200         SceneClass.h    \
201         SceneCoordinateSystem.h \
202         AspectRatio.h   \
203         NextScene.h     \
204         IngredientClass.h       \
205         ContentBody.h   \
206         ReferencedContent.h     \
207         LinkClass.h     \
208         LinkCondition.h \
209         EventType.h     \
210         EventData.h     \
211         ProgramClass.h  \
212         ResidentProgramClass.h  \
213         RemoteProgramClass.h    \
214         InterchangedProgramClass.h      \
215         PaletteClass.h  \
216         FontClass.h     \
217         CursorShapeClass.h      \
218         VariableClass.h \
219         OriginalValue.h \
220         BooleanVariableClass.h  \
221         IntegerVariableClass.h  \
222         OctetStringVariableClass.h      \
223         ObjectRefVariableClass.h        \
224         ContentRefVariableClass.h       \
225         PresentableClass.h      \
226         TokenManagerClass.h     \
227         Movement.h      \
228         TokenGroupClass.h       \
229         TokenGroupItem.h        \
230         ActionSlot.h    \
231         ListGroupClass.h        \
232         VisibleClass.h  \
233         OriginalBoxSize.h       \
234         BitmapClass.h   \
235         LineArtClass.h  \
236         RectangleClass.h        \
237         DynamicLineArtClass.h   \
238         TextClass.h     \
239         Justification.h \
240         LineOrientation.h       \
241         StartCorner.h   \
242         StreamClass.h   \
243         StreamComponent.h       \
244         Storage.h       \
245         AudioClass.h    \
246         VideoClass.h    \
247         Termination.h   \
248         RTGraphicsClass.h       \
249         InteractibleClass.h     \
250         SliderClass.h   \
251         Orientation.h   \
252         SliderStyle.h   \
253         EntryFieldClass.h       \
254         InputType.h     \
255         HyperTextClass.h        \
256         ButtonClass.h   \
257         HotspotClass.h  \
258         PushButtonClass.h       \
259         SwitchButtonClass.h     \
260         ButtonStyle.h   \
261         ActionClass.h   \
262         ElementaryAction.h      \
263         Add.h   \
264         AddItem.h       \
265         Append.h        \
266         Call.h  \
267         CallActionSlot.h        \
268         Clone.h \
269         CloseConnection.h       \
270         DelItem.h       \
271         DeselectItem.h  \
272         Divide.h        \
273         DrawArc.h       \
274         DrawLine.h      \
275         DrawOval.h      \
276         DrawPolygon.h   \
277         DrawPolyline.h  \
278         DrawRectangle.h \
279         DrawSector.h    \
280         Fork.h  \
281         GetAvailabilityStatus.h \
282         GetBoxSize.h    \
283         GetCellItem.h   \
284         GetCursorPosition.h     \
285         GetEngineSupport.h      \
286         GetEntryPoint.h \
287         GetFillColour.h \
288         GetFirstItem.h  \
289         GetHighlightStatus.h    \
290         GetInteractionStatus.h  \
291         GetItemStatus.h \
292         GetLabel.h      \
293         GetLastAnchorFired.h    \
294         GetLineColour.h \
295         GetLineStyle.h  \
296         GetLineWidth.h  \
297         GetListItem.h   \
298         GetListSize.h   \
299         GetOverwriteMode.h      \
300         GetPortion.h    \
301         GetPosition.h   \
302         GetRunningStatus.h      \
303         GetSelectionStatus.h    \
304         GetSliderValue.h        \
305         GetTextContent.h        \
306         GetTextData.h   \
307         GetTokenPosition.h      \
308         GetVolume.h     \
309         Modulo.h        \
310         Move.h  \
311         MoveTo.h        \
312         Multiply.h      \
313         OpenConnection.h        \
314         PutBefore.h     \
315         PutBehind.h     \
316         ReadPersistent.h        \
317         ScaleBitmap.h   \
318         ScaleVideo.h    \
319         ScrollItems.h   \
320         SelectItem.h    \
321         SendEvent.h     \
322         SetBoxSize.h    \
323         SetCachePriority.h      \
324         SetCounterEndPosition.h \
325         SetCounterPosition.h    \
326         SetCounterTrigger.h     \
327         SetCursorPosition.h     \
328         SetCursorShape.h        \
329         SetData.h       \
330         SetEntryPoint.h \
331         SetFillColour.h \
332         SetFirstItem.h  \
333         SetFontRef.h    \
334         SetHighlightStatus.h    \
335         SetInteractionStatus.h  \
336         SetLabel.h      \
337         SetLineColour.h \
338         SetLineStyle.h  \
339         SetLineWidth.h  \
340         SetOverwriteMode.h      \
341         SetPaletteRef.h \
342         SetPortion.h    \
343         SetPosition.h   \
344         SetSliderValue.h        \
345         SetSpeed.h      \
346         SetTimer.h      \
347         NewTimer.h      \
348         SetTransparency.h       \
349         SetVariable.h   \
350         SetVolume.h     \
351         Step.h  \
352         StorePersistent.h       \
353         Subtract.h      \
354         TestVariable.h  \
355         ToggleItem.h    \
356         TransitionTo.h  \
357         ConnectionTagOrNull.h   \
358         ComparisonValue.h       \
359         EmulatedEventData.h     \
360         NewColour.h     \
361         NewContent.h    \
362         NewFont.h       \
363         NewReferencedContent.h  \
364         NewContentSize.h        \
365         NewVariableValue.h      \
366         Parameter.h     \
367         Point.h \
368         Rational.h      \
369         ObjectReference.h       \
370         ExternalReference.h     \
371         IndirectReference.h     \
372         ContentReference.h      \
373         GenericObjectReference.h        \
374         GenericContentReference.h       \
375         GenericInteger.h        \
376         GenericBoolean.h        \
377         GenericOctetString.h    \
378         Colour.h        \
379         XYPosition.h
380
381 ASN_MODULE_HDRS+=BOOLEAN.h
382 ASN_MODULE_SRCS+=BOOLEAN.c
383 ASN_MODULE_HDRS+=INTEGER.h
384 ASN_MODULE_HDRS+=NativeEnumerated.h
385 ASN_MODULE_SRCS+=INTEGER.c
386 ASN_MODULE_HDRS+=NULL.h
387 ASN_MODULE_SRCS+=NULL.c
388 ASN_MODULE_SRCS+=NativeEnumerated.c
389 ASN_MODULE_HDRS+=NativeInteger.h
390 ASN_MODULE_SRCS+=NativeInteger.c
391 ASN_MODULE_HDRS+=asn_SEQUENCE_OF.h
392 ASN_MODULE_SRCS+=asn_SEQUENCE_OF.c
393 ASN_MODULE_HDRS+=asn_SET_OF.h
394 ASN_MODULE_SRCS+=asn_SET_OF.c
395 ASN_MODULE_HDRS+=constr_CHOICE.h
396 ASN_MODULE_SRCS+=constr_CHOICE.c
397 ASN_MODULE_HDRS+=constr_SEQUENCE.h
398 ASN_MODULE_SRCS+=constr_SEQUENCE.c
399 ASN_MODULE_HDRS+=constr_SEQUENCE_OF.h
400 ASN_MODULE_SRCS+=constr_SEQUENCE_OF.c
401 ASN_MODULE_HDRS+=constr_SET_OF.h
402 ASN_MODULE_HDRS+=constr_SET.h
403 ASN_MODULE_SRCS+=constr_SET.c
404 ASN_MODULE_SRCS+=constr_SET_OF.c
405 ASN_MODULE_HDRS+=asn_application.h
406 ASN_MODULE_HDRS+=asn_system.h
407 ASN_MODULE_HDRS+=asn_codecs.h
408 ASN_MODULE_HDRS+=asn_internal.h
409 ASN_MODULE_HDRS+=OCTET_STRING.h
410 ASN_MODULE_SRCS+=OCTET_STRING.c
411 ASN_MODULE_HDRS+=BIT_STRING.h
412 ASN_MODULE_SRCS+=BIT_STRING.c
413 ASN_MODULE_SRCS+=asn_codecs_prim.c
414 ASN_MODULE_HDRS+=asn_codecs_prim.h
415 ASN_MODULE_HDRS+=ber_tlv_length.h
416 ASN_MODULE_SRCS+=ber_tlv_length.c
417 ASN_MODULE_HDRS+=ber_tlv_tag.h
418 ASN_MODULE_SRCS+=ber_tlv_tag.c
419 ASN_MODULE_HDRS+=ber_decoder.h
420 ASN_MODULE_SRCS+=ber_decoder.c
421 ASN_MODULE_HDRS+=der_encoder.h
422 ASN_MODULE_SRCS+=der_encoder.c
423 ASN_MODULE_HDRS+=constr_TYPE.h
424 ASN_MODULE_SRCS+=constr_TYPE.c
425 ASN_MODULE_HDRS+=constraints.h
426 ASN_MODULE_SRCS+=constraints.c
427 ASN_MODULE_HDRS+=xer_support.h
428 ASN_MODULE_SRCS+=xer_support.c
429 ASN_MODULE_HDRS+=xer_decoder.h
430 ASN_MODULE_SRCS+=xer_decoder.c
431 ASN_MODULE_HDRS+=xer_encoder.h
432 ASN_MODULE_SRCS+=xer_encoder.c
433 ASN_MODULE_HDRS+=per_support.h
434 ASN_MODULE_SRCS+=per_support.c
435 ASN_MODULE_HDRS+=per_decoder.h
436 ASN_MODULE_SRCS+=per_decoder.c
437 ASN_MODULE_HDRS+=per_encoder.h
438 ASN_MODULE_SRCS+=per_encoder.c
439 ASN_MODULE_HDRS+=per_opentype.h
440 ASN_MODULE_SRCS+=per_opentype.c
441 ASN_CONVERTER_SOURCES+=converter-sample.c
442
443
444 lib_LTLIBRARIES=libsomething.la
445 libsomething_la_SOURCES=$(ASN_MODULE_SRCS) $(ASN_MODULE_HDRS)
446
447 # This file may be used as an input for make(3)
448 # Remove the lines below to convert it into a pure .am file
449 TARGET = mheg5dump
450 CFLAGS += -DHAVE_CONFIG_H -DJUNKTEST -D_DEFAULT_SOURCE  -DPDU=InterchangedObject -I.
451 OBJS=${ASN_MODULE_SRCS:.c=.o} ${ASN_CONVERTER_SOURCES:.c=.o}
452
453 all: InterchangedObject.c $(TARGET)
454
455 $(TARGET): ${OBJS}
456         $(CC) $(CFLAGS) -o $(TARGET) ${OBJS} $(LDFLAGS) $(LIBS)
457
458 .SUFFIXES:
459 .SUFFIXES: .c .o
460
461 .c.o:
462         $(CC) $(CFLAGS) -o $@ -c $<
463
464 clean:
465         rm -f $(TARGET)
466         rm -f $(OBJS)
467
468 regen: regenerate-from-asn1-source
469
470 regenerate-from-asn1-source:
471         ../../asn1c/asn1c -S ../../skeletons -pdu=InterchangedObject -fcompound-names ../ISO13522-MHEG-5.asn
472
473
474 InterchangedObject.c: ../sample.makefile.regen ../ISO13522-MHEG-5.asn
475         make regen-makefile
476         @touch InterchangedObject.c
477         make
478
479 regen-makefile:
480         ASN_CMDOPTS="-fcompound-names" \
481         ASN_MODULES="../ISO13522-MHEG-5.asn" \
482         ASN_PDU=InterchangedObject \
483         ASN_PROGRAM=mheg5dump \
484         CFLAGS="" \
485         ../sample.makefile.regen
486
487 check: ${TARGET} check-ber check-xer check-per
488         @echo ================
489         @echo All tests passed
490         @echo ================
491
492 check-ber:
493         @if test -f sample-InterchangedObject-1.[db]er ; then \
494         for f in sample-InterchangedObject-*.[db]er; do \
495         for b in 1 17 33 980 8192; do \
496         echo "Recoding $$f into XER and back ($$b)..."; \
497         ./${TARGET} -b $$b -iber -oxer $$f > ./.tmp.1.$$$$ || exit 2; \
498         ./${TARGET} -b $$b -ixer -oxer ./.tmp.1.$$$$ > ./.tmp.2.$$$$ || exit 3; \
499         diff ./.tmp.1.$$$$ ./.tmp.2.$$$$ || exit 4; \
500         rm -f ./.tmp.[12].$$$$; \
501         echo "Test junking $$f (please wait)..."; \
502         ./${TARGET} -J0.0001 -n 1000 -b $$b -iber -onull $$f || exit 5; \
503         ./${TARGET} -J0.001 -n 1000 -b $$b -iber -onull $$f || exit 6; \
504         done; done; fi
505
506 check-xer:
507         @if test -f sample-InterchangedObject-1.xer ; then \
508         for f in sample-InterchangedObject-*.xer; do \
509         for b in 1 17 33 980 8192; do \
510         echo "Recoding $$f into DER and back ($$b)..."; \
511         ./${TARGET} -b $$b -ixer -oder $$f > ./.tmp.1.$$$$ || exit 2; \
512         ./${TARGET} -b $$b -iber -oxer ./.tmp.1.$$$$ > ./.tmp.2.$$$$ || exit 3; \
513         diff $$f ./.tmp.2.$$$$ || exit 4; \
514         rm -f ./.tmp.[12].$$$$; \
515         echo "Test junking $$f (please wait)..."; \
516         ./${TARGET} -J0.0001 -n 1000 -b $$b -ixer -onull $$f || exit 5; \
517         ./${TARGET} -J0.001 -n 1000 -b $$b -ixer -onull $$f || exit 6; \
518         done; done; fi
519
520 check-per:
521         @if test -f sample-InterchangedObject-1-nopad.per ; then \
522         for f in sample-InterchangedObject-[1-9]-nopad.per; do \
523         for b in 1 17 33 980 8192; do \
524         echo "Recoding non-padded $$f into DER into XER and back ($$b)..."; \
525         ./${TARGET} -b $$b -per-nopad -iper -oder $$f > ./.tmp.1.$$$$ || exit 2; \
526         ./${TARGET} -b $$b -iber -oxer ./.tmp.1.$$$$ > ./.tmp.2.$$$$ || exit 3; \
527         ./${TARGET} -b $$b -ixer -oder ./.tmp.2.$$$$ > ./.tmp.3.$$$$ || exit 4; \
528         diff ./.tmp.1.$$$$ ./.tmp.3.$$$$ || exit 5; \
529         rm -f ./.tmp.[123].$$$$; \
530         echo "Test junking $$f (please wait)..."; \
531         ./${TARGET} -J0.0001 -n 1000 -b $$b -per-nopad -iper -onull $$f || exit 6; \
532         ./${TARGET} -J0.001 -n 1000 -b $$b -per-nopad -iper -onull $$f || exit 7; \
533         done; done; fi
534         @if test -f sample-InterchangedObject-1.per ; then \
535         for f in sample-*-[1-9].per; do \
536         pdu=`echo $$f | sed -E -e "s/sample-([A-Za-z-]+)-[0-9].*/\1/"`; \
537         for b in 1 17 33 980 8192; do \
538         echo "Recoding $$f into DER into XER and back ($$b)..."; \
539         ./${TARGET} -b $$b -p $$pdu -iper -oder $$f > ./.tmp.1.$$$$ || exit 3; \
540         ./${TARGET} -b $$b -p $$pdu -iber -oxer ./.tmp.1.$$$$ > ./.tmp.2.$$$$ || exit 4; \
541         ./${TARGET} -b $$b -p $$pdu -ixer -oper ./.tmp.2.$$$$ > ./.tmp.1.$$$$ || exit 5; \
542         diff $$f ./.tmp.1.$$$$ || exit 6; \
543         rm -f ./.tmp.[12].$$$$; \
544         echo "Test junking $$f (please wait)..."; \
545         ./${TARGET} -J0.0001 -n 1000 -b $$b -iper -onull $$f || exit 7; \
546         ./${TARGET} -J0.001 -n 1000 -b $$b -iper -onull $$f || exit 8; \
547         done; done; fi
548
549 distclean: clean
550         rm -f $(ASN_MODULE_SRCS)
551         rm -f $(ASN_MODULE_HDRS)
552         rm -f $(ASN_CONVERTER_SOURCES) $(ASN_CONVERTER_HEADERS)
553         rm -f Makefile.am.sample