-# "COMPILING E2AP Wrapper"
-RUN cd e2ap && \
- gcc -c -fPIC -Iheaders/ lib/*.c wrapper.c && \
- gcc *.o -shared -o libwrapper.so && \
- cp libwrapper.so /usr/local/lib/ && \
- cp wrapper.h headers/*.h /usr/local/include/ && \
+RUN mkdir pkg
+
+#
+#
+#
+ENV CFLAGS="-DASN_DISABLE_OER_SUPPORT"
+ENV CGO_CFLAGS="-DASN_DISABLE_OER_SUPPORT"
+
+COPY 3rdparty 3rdparty
+RUN cd 3rdparty/libe2ap && \
+ gcc -c ${CFLAGS} -I. -g -fPIC *.c && \
+ gcc *.o -g -shared -o libe2ap.so && \
+ cp libe2ap.so /usr/local/lib/ && \
+ cp *.h /usr/local/include/ && \
+ ldconfig
+
+COPY e2ap e2ap
+RUN cd e2ap/libe2ap_wrapper && \
+ gcc -c ${CFLAGS} -g -fPIC *.c && \
+ gcc *.o -g -shared -o libe2ap_wrapper.so && \
+ cp libe2ap_wrapper.so /usr/local/lib/ && \
+ cp *.h /usr/local/include/ && \