]> git.saurik.com Git - wxWidgets.git/blame - samples/render/makefile.unx
Use /bin/echo for creation of Mac OS X PkgInfo files.
[wxWidgets.git] / samples / render / makefile.unx
CommitLineData
2add9e3c
RD
1# =========================================================================
2# This makefile was generated by
00eef16d 3# Bakefile 0.2.9 (http://www.bakefile.org)
2add9e3c
RD
4# Do not modify, all changes will be overwritten!
5# =========================================================================
3e5e2ea5 6
3e5e2ea5 7
3e5e2ea5 8
2add9e3c
RD
9# -------------------------------------------------------------------------
10# These are configurable options:
11# -------------------------------------------------------------------------
3e5e2ea5 12
6e0fbb3d 13# Compiler flags to link loadable module
8ece421c 14LINK_MODULE_FLAGS ?= -shared
6e0fbb3d 15
2add9e3c 16# C++ compiler
d12d9eda 17CXX = `$(WX_CONFIG) --cxx`
3e5e2ea5 18
2add9e3c 19# Standard flags for C++
8ece421c 20CXXFLAGS ?=
3e5e2ea5 21
2add9e3c 22# Standard preprocessor flags (common for CC and CXX)
8ece421c 23CPPFLAGS ?=
3e5e2ea5 24
2add9e3c 25# Standard linker flags
8ece421c 26LDFLAGS ?=
3e5e2ea5 27
2add9e3c 28# Location and arguments of wx-config script
8ece421c 29WX_CONFIG ?= wx-config
2add9e3c 30
0e1f8ea4 31# Port of the wx library to build against [gtk1,gtk2,msw,x11,motif,osx_cocoa,osx_carbon,dfb]
d12d9eda 32WX_PORT ?= $(shell $(WX_CONFIG) --query-toolkit)
ae4ccf12 33
444833b3 34# Use DLL build of wx library to use? [0,1]
d12d9eda 35WX_SHARED ?= $(shell if test -z `$(WX_CONFIG) --query-linkage`; then echo 1; else echo 0; fi)
ae4ccf12 36
444833b3 37# Compile Unicode build of wxWidgets? [0,1]
d12d9eda 38WX_UNICODE ?= $(shell $(WX_CONFIG) --query-chartype | sed 's/unicode/1/;s/ansi/0/')
ae4ccf12
RD
39
40# Version of the wx library to build against.
d12d9eda 41WX_VERSION ?= $(shell $(WX_CONFIG) --query-version | sed -e 's/\([0-9]*\)\.\([0-9]*\)/\1\2/')
2add9e3c
RD
42
43# Build shared lib plugin
8ece421c 44SHARED ?= 0
2add9e3c
RD
45
46
47
48# -------------------------------------------------------------------------
49# Do not modify the rest of this file!
50# -------------------------------------------------------------------------
51
52### Variables: ###
53
509f339a 54CPPDEPS = -MT$@ -MF`echo $@ | sed -e 's,\.o$$,.d,'` -MD -MP
ae4ccf12
RD
55WX_VERSION_MAJOR = $(shell echo $(WX_VERSION) | cut -c1,1)
56WX_VERSION_MINOR = $(shell echo $(WX_VERSION) | cut -c2,2)
d12d9eda
VZ
57WX_CONFIG_FLAGS = $(WX_CONFIG_UNICODE_FLAG) $(WX_CONFIG_SHARED_FLAG) \
58 --toolkit=$(WX_PORT) --version=$(WX_VERSION_MAJOR).$(WX_VERSION_MINOR)
ae4ccf12
RD
59RENDER_CXXFLAGS = -I. `$(WX_CONFIG) --cxxflags $(WX_CONFIG_FLAGS)` $(CPPFLAGS) \
60 $(CXXFLAGS)
2add9e3c
RD
61RENDER_OBJECTS = \
62 render_render.o
ae4ccf12
RD
63RENDDLL_CXXFLAGS = -I. -fPIC -DPIC `$(WX_CONFIG) --cxxflags $(WX_CONFIG_FLAGS)` \
64 $(CPPFLAGS) $(CXXFLAGS)
2add9e3c
RD
65RENDDLL_OBJECTS = \
66 renddll_renddll.o
67
68### Conditionally set variables: ###
69
ae4ccf12
RD
70ifeq ($(WX_UNICODE),0)
71WX_CONFIG_UNICODE_FLAG = --unicode=no
72endif
73ifeq ($(WX_UNICODE),1)
74WX_CONFIG_UNICODE_FLAG = --unicode=yes
75endif
76ifeq ($(WX_SHARED),0)
77WX_CONFIG_SHARED_FLAG = --static=yes
78endif
79ifeq ($(WX_SHARED),1)
80WX_CONFIG_SHARED_FLAG = --static=no
81endif
2add9e3c
RD
82ifeq ($(SHARED),1)
83__renddll___depname = renddll.so
84endif
85
86
87### Targets: ###
88
ae4ccf12 89all: test_for_selected_wxbuild render $(__renddll___depname)
2add9e3c 90
8ece421c 91install:
2add9e3c
RD
92
93uninstall:
3e5e2ea5
JS
94
95clean:
2add9e3c
RD
96 rm -f ./*.o
97 rm -f ./*.d
98 rm -f render
99 rm -f renddll.so
100
ae4ccf12
RD
101test_for_selected_wxbuild:
102 @$(WX_CONFIG) $(WX_CONFIG_FLAGS)
103
2add9e3c 104render: $(RENDER_OBJECTS)
95ff11c4 105 $(CXX) -o $@ $(RENDER_OBJECTS) $(LDFLAGS) `$(WX_CONFIG) $(WX_CONFIG_FLAGS) --libs core,base`
2add9e3c
RD
106
107ifeq ($(SHARED),1)
108renddll.so: $(RENDDLL_OBJECTS)
95ff11c4 109 $(CXX) $(LINK_MODULE_FLAGS) -fPIC -o $@ $(RENDDLL_OBJECTS) $(LDFLAGS) `$(WX_CONFIG) $(WX_CONFIG_FLAGS) --libs core,base`
2add9e3c
RD
110endif
111
112render_render.o: ./render.cpp
113 $(CXX) -c -o $@ $(RENDER_CXXFLAGS) $(CPPDEPS) $<
114
115renddll_renddll.o: ./renddll.cpp
116 $(CXX) -c -o $@ $(RENDDLL_CXXFLAGS) $(CPPDEPS) $<
117
118.PHONY: all install uninstall clean
119
120
121# Dependencies tracking:
122-include ./*.d