makefile.unx 3.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116
  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. CC = gcc
  11. # C++ compiler
  12. CXX = `$(WX_CONFIG) --cxx`
  13. # Standard flags for CC
  14. CFLAGS ?=
  15. # Standard flags for C++
  16. CXXFLAGS ?=
  17. # Standard preprocessor flags (common for CC and CXX)
  18. CPPFLAGS ?=
  19. # Standard linker flags
  20. LDFLAGS ?=
  21. # Location and arguments of wx-config script
  22. WX_CONFIG ?= wx-config
  23. # Port of the wx library to build against [gtk1,gtk2,msw,x11,motif,osx_cocoa,osx_carbon,dfb]
  24. WX_PORT ?= $(shell $(WX_CONFIG) --query-toolkit)
  25. # Use DLL build of wx library to use? [0,1]
  26. WX_SHARED ?= $(shell if test -z `$(WX_CONFIG) --query-linkage`; then echo 1; else echo 0; fi)
  27. # Compile Unicode build of wxWidgets? [0,1]
  28. WX_UNICODE ?= $(shell $(WX_CONFIG) --query-chartype | sed 's/unicode/1/;s/ansi/0/')
  29. # Version of the wx library to build against.
  30. WX_VERSION ?= $(shell $(WX_CONFIG) --query-version | sed -e 's/\([0-9]*\)\.\([0-9]*\)/\1\2/')
  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. PENGUIN_CFLAGS = -I. `$(WX_CONFIG) --cflags $(WX_CONFIG_FLAGS)` $(CPPFLAGS) \
  41. $(CFLAGS)
  42. PENGUIN_CXXFLAGS = -I. `$(WX_CONFIG) --cxxflags $(WX_CONFIG_FLAGS)` $(CPPFLAGS) \
  43. $(CXXFLAGS)
  44. PENGUIN_OBJECTS = \
  45. penguin_penguin.o \
  46. penguin_dxfrenderer.o \
  47. penguin_trackball.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. ### Targets: ###
  62. all: test_for_selected_wxbuild penguin
  63. install:
  64. uninstall:
  65. clean:
  66. rm -f ./*.o
  67. rm -f ./*.d
  68. rm -f penguin
  69. test_for_selected_wxbuild:
  70. @$(WX_CONFIG) $(WX_CONFIG_FLAGS)
  71. penguin: $(PENGUIN_OBJECTS)
  72. $(CXX) -o $@ $(PENGUIN_OBJECTS) $(LDFLAGS) `$(WX_CONFIG) $(WX_CONFIG_FLAGS) --libs gl,core,base`
  73. penguin_penguin.o: ./penguin.cpp
  74. $(CXX) -c -o $@ $(PENGUIN_CXXFLAGS) $(CPPDEPS) $<
  75. penguin_dxfrenderer.o: ./dxfrenderer.cpp
  76. $(CXX) -c -o $@ $(PENGUIN_CXXFLAGS) $(CPPDEPS) $<
  77. penguin_trackball.o: ./trackball.c
  78. $(CC) -c -o $@ $(PENGUIN_CFLAGS) $(CPPDEPS) $<
  79. .PHONY: all install uninstall clean
  80. # Dependencies tracking:
  81. -include ./*.d