blob: 73f73ed6908f9c3507197d3641934f2c4ecd797b [file] [log] [blame]
Harry Tran1f1098a2020-03-10 10:40:10 -04001/*****************************************************************************
2# *
3# Copyright 2019 AT&T Intellectual Property *
4# *
5# Licensed under the Apache License, Version 2.0 (the "License"); *
6# you may not use this file except in compliance with the License. *
7# You may obtain a copy of the License at *
8# *
9# http://www.apache.org/licenses/LICENSE-2.0 *
10# *
11# Unless required by applicable law or agreed to in writing, software *
12# distributed under the License is distributed on an "AS IS" BASIS, *
13# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. *
14# See the License for the specific language governing permissions and *
15# limitations under the License. *
16# *
17******************************************************************************/
18include ./Makefile.am.libasncodec
19
20LIBS += -lm
21CFLAGS += $(ASN_MODULE_CFLAGS) -DASN_PDU_COLLECTION -I.
22ASN_LIBRARY ?= libasncodec.a
23ASN_PROGRAM ?= converter-example
24ASN_PROGRAM_SRCS ?= \
25 ./converter-example.c\
26 ./pdu_collection.c
27
28all: $(ASN_PROGRAM)
29
30$(ASN_PROGRAM): $(ASN_LIBRARY) $(ASN_PROGRAM_SRCS:.c=.o)
31 $(CC) $(CFLAGS) $(CPPFLAGS) -o $(ASN_PROGRAM) $(ASN_PROGRAM_SRCS:.c=.o) $(LDFLAGS) $(ASN_LIBRARY) $(LIBS)
32
33$(ASN_LIBRARY): $(ASN_MODULE_SRCS:.c=.o)
34 $(AR) rcs $@ $(ASN_MODULE_SRCS:.c=.o)
35
36.SUFFIXES:
37.SUFFIXES: .c .o
38
39.c.o:
40 $(CC) $(CFLAGS) -o $@ -c $<
41
42clean:
43 rm -f $(ASN_PROGRAM) $(ASN_LIBRARY)
44 rm -f $(ASN_MODULE_SRCS:.c=.o) $(ASN_PROGRAM_SRCS:.c=.o)
45
46regen: regenerate-from-asn1-source
47
48regenerate-from-asn1-source:
49 asn1c -fcompound-names -fincludes-quoted -fno-include-deps -findirect-choice -gen-PER -no-gen-OER -D. ../../asnFiles/e2ap-v031.asn ../../asnFiles/X2AP-PDU-Contents.asn ../../asnFiles/X2AP-Constants.asn ../../asnFiles/X2AP-Containers.asn ../../asnFiles/X2AP-IEs.asn ../../asnFiles/X2AP-CommonDataTypes.asn ../../asnFiles/e2sm-gNB-X2-release-1-v041.asn
50