Makefile.am 3.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879
  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_namespace.c \
  19. ua_services_attribute.c \
  20. ua_services_session.c \
  21. ua_services_discovery.c \
  22. ua_services_securechannel.c \
  23. ua_services_nodemanagement.c \
  24. ua_services_view.c \
  25. ua_services_subscription.c\
  26. ua_services_monitoreditems.c\
  27. ua_application.c \
  28. ua_stack_session.c\
  29. ua_stack_session_manager.c\
  30. ua_stack_channel.c \
  31. ua_stack_channel_manager.c \
  32. ua_transport_connection_manager.c \
  33. ua_transport_connection.c
  34. WITH_XML =
  35. if UA_ENCODING_XML
  36. libopen62541_la_SOURCES += ua_types_encoding_xml.c \
  37. ua_namespace_xml.c \
  38. ua_xml.c
  39. WITH_XML = --with-xml
  40. endif
  41. ua_types.c: ua_namespace_0.h
  42. ua_namespace_0.h: ua_types_generated.h
  43. ua_types_generated.c ua_types_generated.h: $(SCHEMA_DIR)/Opc.Ua.Types.bsd $(TOOL_DIR)/generate_builtin.py
  44. python $(TOOL_DIR)/generate_builtin.py $(SCHEMA_DIR)/Opc.Ua.Types.bsd ua_types_generated $(WITH_XML)
  45. ua_namespace_0.c ua_namespace_0.h: $(SCHEMA_DIR)/NodeIds.csv $(TOOL_DIR)/generate_namespace.py
  46. python $(TOOL_DIR)/generate_namespace.py $(SCHEMA_DIR)/NodeIds.csv ua_namespace_0 $(WITH_XML)
  47. .PHONY: convenience-link clean-convenience-link
  48. convenience-link: $(lib_LTLIBRARIES)
  49. @test -e "$(top_builddir)/lib" || mkdir "$(top_builddir)/lib"
  50. @for soname in `echo | $(EGREP) "^dlname=" $^ | $(SED) -e "s|^dlname='\(.*\)'|\1|"`; do \
  51. echo "$$soname: creating convenience link from $(abs_builddir)/.libs to $(top_builddir)/lib"; \
  52. rm -f $(top_builddir)/lib/$$soname ; \
  53. test -e "$(abs_builddir)/.libs/$$soname" && \
  54. cd "$(top_builddir)/lib" && \
  55. $(LN_S) "$(abs_builddir)/.libs/$$soname" "$$soname" || true;\
  56. done
  57. @for aname in `echo | $(EGREP) "^dlname=" $^ | $(SED) -e "s|^dlname='\(.*\)\.\(.*\)'|\1\.a|"`; do \
  58. echo "$$aname: creating convenience link from $(abs_builddir)/.libs to $(top_builddir)/lib"; \
  59. rm -f "$(top_builddir)/lib/$$aname" ; \
  60. test -e "$(abs_builddir)/.libs/$$aname" && \
  61. cd "$(top_builddir)/lib" && \
  62. $(LN_S) "$(abs_builddir)/.libs/$$aname" "$$aname" || true;\
  63. done
  64. clean-convenience-link:
  65. rm -rf $(top_builddir)/lib/ || true;
  66. all-local: convenience-link
  67. clean-local: clean-convenience-link
  68. rm -rf ua_types_generated.c ua_types_generated.h || true;
  69. rm -rf ua_namespace_0.c ua_namespace_0.h || true;
  70. rm -rf *.gcov || true;
  71. rm -rf util/*.gcov || true;