makefile.unx 3.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122
  1. # =========================================================================
  2. # This makefile was generated by
  3. # Bakefile 0.2.9 (http://www.bakefile.org)
  4. # Do not modify, all changes will be overwritten!
  5. # =========================================================================
  6. # -------------------------------------------------------------------------
  7. # These are configurable options:
  8. # -------------------------------------------------------------------------
  9. # Compiler flags to link loadable module
  10. LINK_MODULE_FLAGS ?= -shared
  11. # C++ compiler
  12. CXX = `$(WX_CONFIG) --cxx`
  13. # Standard flags for C++
  14. CXXFLAGS ?=
  15. # Standard preprocessor flags (common for CC and CXX)
  16. CPPFLAGS ?=
  17. # Standard linker flags
  18. LDFLAGS ?=
  19. # Location and arguments of wx-config script
  20. WX_CONFIG ?= wx-config
  21. # Port of the wx library to build against [gtk1,gtk2,msw,x11,motif,osx_cocoa,osx_carbon,dfb]
  22. WX_PORT ?= $(shell $(WX_CONFIG) --query-toolkit)
  23. # Use DLL build of wx library to use? [0,1]
  24. WX_SHARED ?= $(shell if test -z `$(WX_CONFIG) --query-linkage`; then echo 1; else echo 0; fi)
  25. # Compile Unicode build of wxWidgets? [0,1]
  26. WX_UNICODE ?= $(shell $(WX_CONFIG) --query-chartype | sed 's/unicode/1/;s/ansi/0/')
  27. # Version of the wx library to build against.
  28. WX_VERSION ?= $(shell $(WX_CONFIG) --query-version | sed -e 's/\([0-9]*\)\.\([0-9]*\)/\1\2/')
  29. # Build shared lib plugin
  30. SHARED ?= 0
  31. # -------------------------------------------------------------------------
  32. # Do not modify the rest of this file!
  33. # -------------------------------------------------------------------------
  34. ### Variables: ###
  35. CPPDEPS = -MT$@ -MF`echo $@ | sed -e 's,\.o$$,.d,'` -MD -MP
  36. WX_VERSION_MAJOR = $(shell echo $(WX_VERSION) | cut -c1,1)
  37. WX_VERSION_MINOR = $(shell echo $(WX_VERSION) | cut -c2,2)
  38. WX_CONFIG_FLAGS = $(WX_CONFIG_UNICODE_FLAG) $(WX_CONFIG_SHARED_FLAG) \
  39. --toolkit=$(WX_PORT) --version=$(WX_VERSION_MAJOR).$(WX_VERSION_MINOR)
  40. RENDER_CXXFLAGS = -I. `$(WX_CONFIG) --cxxflags $(WX_CONFIG_FLAGS)` $(CPPFLAGS) \
  41. $(CXXFLAGS)
  42. RENDER_OBJECTS = \
  43. render_render.o
  44. RENDDLL_CXXFLAGS = -I. -fPIC -DPIC `$(WX_CONFIG) --cxxflags $(WX_CONFIG_FLAGS)` \
  45. $(CPPFLAGS) $(CXXFLAGS)
  46. RENDDLL_OBJECTS = \
  47. renddll_renddll.o
  48. ### Conditionally set variables: ###
  49. ifeq ($(WX_UNICODE),0)
  50. WX_CONFIG_UNICODE_FLAG = --unicode=no
  51. endif
  52. ifeq ($(WX_UNICODE),1)
  53. WX_CONFIG_UNICODE_FLAG = --unicode=yes
  54. endif
  55. ifeq ($(WX_SHARED),0)
  56. WX_CONFIG_SHARED_FLAG = --static=yes
  57. endif
  58. ifeq ($(WX_SHARED),1)
  59. WX_CONFIG_SHARED_FLAG = --static=no
  60. endif
  61. ifeq ($(SHARED),1)
  62. __renddll___depname = renddll.so
  63. endif
  64. ### Targets: ###
  65. all: test_for_selected_wxbuild render $(__renddll___depname)
  66. install:
  67. uninstall:
  68. clean:
  69. rm -f ./*.o
  70. rm -f ./*.d
  71. rm -f render
  72. rm -f renddll.so
  73. test_for_selected_wxbuild:
  74. @$(WX_CONFIG) $(WX_CONFIG_FLAGS)
  75. render: $(RENDER_OBJECTS)
  76. $(CXX) -o $@ $(RENDER_OBJECTS) $(LDFLAGS) `$(WX_CONFIG) $(WX_CONFIG_FLAGS) --libs core,base`
  77. ifeq ($(SHARED),1)
  78. renddll.so: $(RENDDLL_OBJECTS)
  79. $(CXX) $(LINK_MODULE_FLAGS) -fPIC -o $@ $(RENDDLL_OBJECTS) $(LDFLAGS) `$(WX_CONFIG) $(WX_CONFIG_FLAGS) --libs core,base`
  80. endif
  81. render_render.o: ./render.cpp
  82. $(CXX) -c -o $@ $(RENDER_CXXFLAGS) $(CPPDEPS) $<
  83. renddll_renddll.o: ./renddll.cpp
  84. $(CXX) -c -o $@ $(RENDDLL_CXXFLAGS) $(CPPDEPS) $<
  85. .PHONY: all install uninstall clean
  86. # Dependencies tracking:
  87. -include ./*.d