Makefile.am 3.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586
  1. AM_CFLAGS = $(GLOBAL_AM_CFLAGS) -I$(top_builddir)/src -I. -I$(top_builddir)/src/util
  2. TOOL_DIR = $(top_builddir)/tools
  3. SCHEMA_DIR = $(top_builddir)/schema
  4. lib_LTLIBRARIES = libopen62541.la
  5. lib_LTLIBRARIES: generate_types generate_namespace_0
  6. libopen62541_la_LDFLAGS = -avoid-version -no-undefined
  7. libopen62541_la_SOURCES = ua_types.c \
  8. ua_types_encoding_binary.c \
  9. ua_types_generated.c \
  10. ua_namespace_0.c \
  11. util/ua_util.c \
  12. util/ua_list.c \
  13. util/ua_indexedList.c \
  14. util/ua_base64.c \
  15. ua_transport.c \
  16. ua_transport_binary.c \
  17. ua_transport_binary_secure.c \
  18. ua_services_attribute.c \
  19. ua_services_session.c \
  20. ua_services_discovery.c \
  21. ua_services_securechannel.c \
  22. ua_services_nodemanagement.c \
  23. ua_services_view.c \
  24. ua_services_subscription.c\
  25. ua_services_monitoreditems.c\
  26. ua_application.c \
  27. ua_stack_session.c\
  28. ua_stack_session_manager.c\
  29. ua_stack_channel.c \
  30. ua_stack_channel_manager.c \
  31. ua_transport_connection_manager.c \
  32. ua_transport_connection.c
  33. if MULTITHREADING
  34. libopen62541_la_SOURCES += ua_namespace_concurrent.c
  35. else
  36. libopen62541_la_SOURCES += ua_namespace.c
  37. endif
  38. WITH_XML =
  39. if UA_ENCODING_XML
  40. libopen62541_la_SOURCES += ua_types_encoding_xml.c \
  41. ua_namespace_xml.c \
  42. ua_xml.c
  43. WITH_XML = --with-xml
  44. endif
  45. ua_types.c: ua_namespace_0.h
  46. ua_namespace_0.h: ua_types_generated.h
  47. ua_types_generated.c ua_types_generated.h: $(SCHEMA_DIR)/Opc.Ua.Types.bsd $(TOOL_DIR)/generate_builtin.py
  48. python $(TOOL_DIR)/generate_builtin.py $(SCHEMA_DIR)/Opc.Ua.Types.bsd ua_types_generated $(WITH_XML)
  49. ua_namespace_0.c ua_namespace_0.h: $(SCHEMA_DIR)/NodeIds.csv $(TOOL_DIR)/generate_namespace.py
  50. python $(TOOL_DIR)/generate_namespace.py $(SCHEMA_DIR)/NodeIds.csv ua_namespace_0 $(WITH_XML)
  51. .PHONY: convenience-link clean-convenience-link
  52. convenience-link: $(lib_LTLIBRARIES)
  53. @test -e "$(top_builddir)/lib" || mkdir "$(top_builddir)/lib"
  54. @for soname in `echo | $(EGREP) "^dlname=" $^ | $(SED) -e "s|^dlname='\(.*\)'|\1|"`; do \
  55. echo "$$soname: creating convenience link from $(abs_builddir)/.libs to $(top_builddir)/lib"; \
  56. rm -f $(top_builddir)/lib/$$soname ; \
  57. test -e "$(abs_builddir)/.libs/$$soname" && \
  58. cd "$(top_builddir)/lib" && \
  59. $(LN_S) "$(abs_builddir)/.libs/$$soname" "$$soname" || true;\
  60. done
  61. @for aname in `echo | $(EGREP) "^dlname=" $^ | $(SED) -e "s|^dlname='\(.*\)\.\(.*\)'|\1\.a|"`; do \
  62. echo "$$aname: creating convenience link from $(abs_builddir)/.libs to $(top_builddir)/lib"; \
  63. rm -f "$(top_builddir)/lib/$$aname" ; \
  64. test -e "$(abs_builddir)/.libs/$$aname" && \
  65. cd "$(top_builddir)/lib" && \
  66. $(LN_S) "$(abs_builddir)/.libs/$$aname" "$$aname" || true;\
  67. done
  68. clean-convenience-link:
  69. rm -rf $(top_builddir)/lib/ || true;
  70. all-local: convenience-link
  71. clean-local: clean-convenience-link
  72. rm -rf ua_types_generated.c ua_types_generated.h || true;
  73. rm -rf ua_namespace_0.c ua_namespace_0.h || true;
  74. rm -rf *.gcov || true;
  75. rm -rf util/*.gcov || true;