makefile.unx 3.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133
  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. # C++ compiler
  10. CXX = `$(WX_CONFIG) --cxx`
  11. # Standard flags for C++
  12. CXXFLAGS ?=
  13. # Standard preprocessor flags (common for CC and CXX)
  14. CPPFLAGS ?=
  15. # Standard linker flags
  16. LDFLAGS ?=
  17. # Location and arguments of wx-config script
  18. WX_CONFIG ?= wx-config
  19. # Port of the wx library to build against [gtk1,gtk2,msw,x11,motif,osx_cocoa,osx_carbon,dfb]
  20. WX_PORT ?= $(shell $(WX_CONFIG) --query-toolkit)
  21. # Use DLL build of wx library to use? [0,1]
  22. WX_SHARED ?= $(shell if test -z `$(WX_CONFIG) --query-linkage`; then echo 1; else echo 0; fi)
  23. # Compile Unicode build of wxWidgets? [0,1]
  24. WX_UNICODE ?= $(shell $(WX_CONFIG) --query-chartype | sed 's/unicode/1/;s/ansi/0/')
  25. # Version of the wx library to build against.
  26. WX_VERSION ?= $(shell $(WX_CONFIG) --query-version | sed -e 's/\([0-9]*\)\.\([0-9]*\)/\1\2/')
  27. # -------------------------------------------------------------------------
  28. # Do not modify the rest of this file!
  29. # -------------------------------------------------------------------------
  30. ### Variables: ###
  31. CPPDEPS = -MT$@ -MF`echo $@ | sed -e 's,\.o$$,.d,'` -MD -MP
  32. WX_VERSION_MAJOR = $(shell echo $(WX_VERSION) | cut -c1,1)
  33. WX_VERSION_MINOR = $(shell echo $(WX_VERSION) | cut -c2,2)
  34. WX_CONFIG_FLAGS = $(WX_CONFIG_UNICODE_FLAG) $(WX_CONFIG_SHARED_FLAG) \
  35. --toolkit=$(WX_PORT) --version=$(WX_VERSION_MAJOR).$(WX_VERSION_MINOR)
  36. CLIENT_CXXFLAGS = -I. `$(WX_CONFIG) --cxxflags $(WX_CONFIG_FLAGS)` $(CPPFLAGS) \
  37. $(CXXFLAGS)
  38. CLIENT_OBJECTS = \
  39. client_client.o
  40. SERVER_CXXFLAGS = -I. `$(WX_CONFIG) --cxxflags $(WX_CONFIG_FLAGS)` $(CPPFLAGS) \
  41. $(CXXFLAGS)
  42. SERVER_OBJECTS = \
  43. server_server.o
  44. BASECLIENT_CXXFLAGS = -I. `$(WX_CONFIG) --cxxflags $(WX_CONFIG_FLAGS)` \
  45. $(CPPFLAGS) $(CXXFLAGS)
  46. BASECLIENT_OBJECTS = \
  47. baseclient_baseclient.o
  48. BASESERVER_CXXFLAGS = -I. `$(WX_CONFIG) --cxxflags $(WX_CONFIG_FLAGS)` \
  49. $(CPPFLAGS) $(CXXFLAGS)
  50. BASESERVER_OBJECTS = \
  51. baseserver_baseserver.o
  52. ### Conditionally set variables: ###
  53. ifeq ($(WX_UNICODE),0)
  54. WX_CONFIG_UNICODE_FLAG = --unicode=no
  55. endif
  56. ifeq ($(WX_UNICODE),1)
  57. WX_CONFIG_UNICODE_FLAG = --unicode=yes
  58. endif
  59. ifeq ($(WX_SHARED),0)
  60. WX_CONFIG_SHARED_FLAG = --static=yes
  61. endif
  62. ifeq ($(WX_SHARED),1)
  63. WX_CONFIG_SHARED_FLAG = --static=no
  64. endif
  65. ### Targets: ###
  66. all: test_for_selected_wxbuild client server baseclient baseserver
  67. install:
  68. uninstall:
  69. clean:
  70. rm -f ./*.o
  71. rm -f ./*.d
  72. rm -f client
  73. rm -f server
  74. rm -f baseclient
  75. rm -f baseserver
  76. test_for_selected_wxbuild:
  77. @$(WX_CONFIG) $(WX_CONFIG_FLAGS)
  78. client: $(CLIENT_OBJECTS)
  79. $(CXX) -o $@ $(CLIENT_OBJECTS) $(LDFLAGS) `$(WX_CONFIG) $(WX_CONFIG_FLAGS) --libs core,net,base`
  80. server: $(SERVER_OBJECTS)
  81. $(CXX) -o $@ $(SERVER_OBJECTS) $(LDFLAGS) `$(WX_CONFIG) $(WX_CONFIG_FLAGS) --libs core,net,base`
  82. baseclient: $(BASECLIENT_OBJECTS)
  83. $(CXX) -o $@ $(BASECLIENT_OBJECTS) $(LDFLAGS) `$(WX_CONFIG) $(WX_CONFIG_FLAGS) --libs net,base`
  84. baseserver: $(BASESERVER_OBJECTS)
  85. $(CXX) -o $@ $(BASESERVER_OBJECTS) $(LDFLAGS) `$(WX_CONFIG) $(WX_CONFIG_FLAGS) --libs net,base`
  86. client_client.o: ./client.cpp
  87. $(CXX) -c -o $@ $(CLIENT_CXXFLAGS) $(CPPDEPS) $<
  88. server_server.o: ./server.cpp
  89. $(CXX) -c -o $@ $(SERVER_CXXFLAGS) $(CPPDEPS) $<
  90. baseclient_baseclient.o: ./baseclient.cpp
  91. $(CXX) -c -o $@ $(BASECLIENT_CXXFLAGS) $(CPPDEPS) $<
  92. baseserver_baseserver.o: ./baseserver.cpp
  93. $(CXX) -c -o $@ $(BASESERVER_CXXFLAGS) $(CPPDEPS) $<
  94. .PHONY: all install uninstall clean
  95. # Dependencies tracking:
  96. -include ./*.d