Makefile.am 2.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475
  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. WITH_XML =
  29. if UA_ENCODING_XML
  30. libopen62541_la_SOURCES += ua_types_encoding_xml.c \
  31. ua_namespace_xml.c \
  32. ua_xml.c
  33. WITH_XML = --with-xml
  34. endif
  35. ua_types.c: ua_namespace_0.h
  36. ua_namespace_0.h: ua_types_generated.h
  37. ua_types_generated.c ua_types_generated.h: $(SCHEMA_DIR)/Opc.Ua.Types.bsd $(TOOL_DIR)/generate_builtin.py
  38. python $(TOOL_DIR)/generate_builtin.py $(SCHEMA_DIR)/Opc.Ua.Types.bsd ua_types_generated $(WITH_XML)
  39. ua_namespace_0.c ua_namespace_0.h: $(SCHEMA_DIR)/NodeIds.csv $(TOOL_DIR)/generate_namespace.py
  40. python $(TOOL_DIR)/generate_namespace.py $(SCHEMA_DIR)/NodeIds.csv ua_namespace_0 $(WITH_XML)
  41. .PHONY: convenience-link clean-convenience-link
  42. convenience-link: $(lib_LTLIBRARIES)
  43. @test -e "$(top_builddir)/lib" || mkdir "$(top_builddir)/lib"
  44. @for soname in `echo | $(EGREP) "^dlname=" $^ | $(SED) -e "s|^dlname='\(.*\)'|\1|"`; do \
  45. echo "$$soname: creating convenience link from $(abs_builddir)/.libs to $(top_builddir)/lib"; \
  46. rm -f $(top_builddir)/lib/$$soname ; \
  47. test -e "$(abs_builddir)/.libs/$$soname" && \
  48. cd "$(top_builddir)/lib" && \
  49. $(LN_S) "$(abs_builddir)/.libs/$$soname" "$$soname" || true;\
  50. done
  51. @for aname in `echo | $(EGREP) "^dlname=" $^ | $(SED) -e "s|^dlname='\(.*\)\.\(.*\)'|\1\.a|"`; do \
  52. echo "$$aname: creating convenience link from $(abs_builddir)/.libs to $(top_builddir)/lib"; \
  53. rm -f "$(top_builddir)/lib/$$aname" ; \
  54. test -e "$(abs_builddir)/.libs/$$aname" && \
  55. cd "$(top_builddir)/lib" && \
  56. $(LN_S) "$(abs_builddir)/.libs/$$aname" "$$aname" || true;\
  57. done
  58. clean-convenience-link:
  59. rm -rf $(top_builddir)/lib/ || true;
  60. all-local: convenience-link
  61. clean-local: clean-convenience-link
  62. rm -rf ua_types_generated.c ua_types_generated.h || true;
  63. rm -rf ua_namespace_0.c ua_namespace_0.h || true;
  64. rm -rf *.gcov || true;
  65. rm -rf util/*.gcov || true;