# =========================================================================
#     This makefile was generated by
#     Bakefile 0.2.2 (http://bakefile.sourceforge.net)
#     Do not modify, all changes will be overwritten!
# =========================================================================



# -------------------------------------------------------------------------
# These are configurable options:
# -------------------------------------------------------------------------

# 'install' program location 
INSTALL := install

# Location where the package is installed by 'make install' 
prefix := /usr/local

# Destination root (/ is used if empty) 
DESTDIR := 

#  
AR := ar

#  
RANLIB := ranlib

# C++ compiler 
CXX := g++

# Standard flags for C++ 
CXXFLAGS := 

# Standard preprocessor flags (common for CC and CXX) 
CPPFLAGS := 

# Standard linker flags 
LDFLAGS := 

# Location and arguments of wx-config script 
WX_CONFIG := wx-config

# Port of the wx library to build against [gtk1,gtk2,msw,x11,motif,mgl,mac,dfb]
WX_PORT := $(shell $(WX_CONFIG) --selected-config | cut -d '-' -f 1)

# Use DLL build of wx library to use? [0,1]
WX_SHARED := $(shell if test -z `$(WX_CONFIG) --selected-config | cut -d '-' -f 5`; then echo 1; else echo 0; fi)

# Compile Unicode build of wxWidgets? [0,1]
WX_UNICODE := $(shell $(WX_CONFIG) --selected-config | cut -d '-' -f 2 | sed 's/unicode/1/;s/ansi/0/')

# Use debug build of wxWidgets (define __WXDEBUG__)? [0,1]
WX_DEBUG := $(shell $(WX_CONFIG) --selected-config | cut -d '-' -f 3 | sed 's/debug/1/;s/release/0/')

# Version of the wx library to build against. 
WX_VERSION := $(shell $(WX_CONFIG) --selected-config | sed -e 's/.*-\([0-9]*\)\.\([0-9]*\)$$/\1\2/')



# -------------------------------------------------------------------------
# Do not modify the rest of this file!
# -------------------------------------------------------------------------

### Variables: ###

CPPDEPS = -MT$@ -MF`echo $@ | sed -e 's,\.o$$,.d,'` -MD
WX_VERSION_MAJOR = $(shell echo $(WX_VERSION) | cut -c1,1)
WX_VERSION_MINOR = $(shell echo $(WX_VERSION) | cut -c2,2)
WX_CONFIG_FLAGS = $(WX_CONFIG_DEBUG_FLAG) $(WX_CONFIG_UNICODE_FLAG) \
	$(WX_CONFIG_SHARED_FLAG) --toolkit=$(WX_PORT) \
	--version=$(WX_VERSION_MAJOR).$(WX_VERSION_MINOR)
THINGS_LIB_CXXFLAGS = $(____things) $(____things_3) -W -Wall -I../include \
	`$(WX_CONFIG) --cxxflags $(WX_CONFIG_FLAGS)` $(CPPFLAGS) $(CXXFLAGS)
THINGS_LIB_OBJECTS =  \
	gcc$(WX_PORT)$(_BUILDDIR_SHARED_SUFFIX)/things_lib_block.o \
	gcc$(WX_PORT)$(_BUILDDIR_SHARED_SUFFIX)/things_lib_bmpcombo.o \
	gcc$(WX_PORT)$(_BUILDDIR_SHARED_SUFFIX)/things_lib_dropdown.o \
	gcc$(WX_PORT)$(_BUILDDIR_SHARED_SUFFIX)/things_lib_filebrws.o \
	gcc$(WX_PORT)$(_BUILDDIR_SHARED_SUFFIX)/things_lib_filedlgg.o \
	gcc$(WX_PORT)$(_BUILDDIR_SHARED_SUFFIX)/things_lib_genergdi.o \
	gcc$(WX_PORT)$(_BUILDDIR_SHARED_SUFFIX)/things_lib_geometry.o \
	gcc$(WX_PORT)$(_BUILDDIR_SHARED_SUFFIX)/things_lib_matrix2d.o \
	gcc$(WX_PORT)$(_BUILDDIR_SHARED_SUFFIX)/things_lib_menubtn.o \
	gcc$(WX_PORT)$(_BUILDDIR_SHARED_SUFFIX)/things_lib_optvalue.o \
	gcc$(WX_PORT)$(_BUILDDIR_SHARED_SUFFIX)/things_lib_range.o \
	gcc$(WX_PORT)$(_BUILDDIR_SHARED_SUFFIX)/things_lib_spinctld.o \
	gcc$(WX_PORT)$(_BUILDDIR_SHARED_SUFFIX)/things_lib_toggle.o
THINGS_LIB_HEADERS =  \
	include/wx/things/block.h \
	include/wx/things/bmpcombo.h \
	include/wx/things/dropdown.h \
	include/wx/things/filebrws.h \
	include/wx/things/genergdi.h \
	include/wx/things/geometry.h \
	include/wx/things/matrix2d.h \
	include/wx/things/medsort.h \
	include/wx/things/menubtn.h \
	include/wx/things/optvalue.h \
	include/wx/things/range.h \
	include/wx/things/spinctld.h \
	include/wx/things/thingdef.h \
	include/wx/things/toggle.h
THINGS_DLL_CXXFLAGS = $(____things) $(____things_3) -W -Wall -I../include \
	-DWXMAKINGDLL_THINGS -fPIC -DPIC `$(WX_CONFIG) --cxxflags $(WX_CONFIG_FLAGS)` \
	$(CPPFLAGS) $(CXXFLAGS)
THINGS_DLL_OBJECTS =  \
	gcc$(WX_PORT)$(_BUILDDIR_SHARED_SUFFIX)/things_dll_block.o \
	gcc$(WX_PORT)$(_BUILDDIR_SHARED_SUFFIX)/things_dll_bmpcombo.o \
	gcc$(WX_PORT)$(_BUILDDIR_SHARED_SUFFIX)/things_dll_dropdown.o \
	gcc$(WX_PORT)$(_BUILDDIR_SHARED_SUFFIX)/things_dll_filebrws.o \
	gcc$(WX_PORT)$(_BUILDDIR_SHARED_SUFFIX)/things_dll_filedlgg.o \
	gcc$(WX_PORT)$(_BUILDDIR_SHARED_SUFFIX)/things_dll_genergdi.o \
	gcc$(WX_PORT)$(_BUILDDIR_SHARED_SUFFIX)/things_dll_geometry.o \
	gcc$(WX_PORT)$(_BUILDDIR_SHARED_SUFFIX)/things_dll_matrix2d.o \
	gcc$(WX_PORT)$(_BUILDDIR_SHARED_SUFFIX)/things_dll_menubtn.o \
	gcc$(WX_PORT)$(_BUILDDIR_SHARED_SUFFIX)/things_dll_optvalue.o \
	gcc$(WX_PORT)$(_BUILDDIR_SHARED_SUFFIX)/things_dll_range.o \
	gcc$(WX_PORT)$(_BUILDDIR_SHARED_SUFFIX)/things_dll_spinctld.o \
	gcc$(WX_PORT)$(_BUILDDIR_SHARED_SUFFIX)/things_dll_toggle.o
THINGS_DLL_HEADERS =  \
	include/wx/things/block.h \
	include/wx/things/bmpcombo.h \
	include/wx/things/dropdown.h \
	include/wx/things/filebrws.h \
	include/wx/things/genergdi.h \
	include/wx/things/geometry.h \
	include/wx/things/matrix2d.h \
	include/wx/things/medsort.h \
	include/wx/things/menubtn.h \
	include/wx/things/optvalue.h \
	include/wx/things/range.h \
	include/wx/things/spinctld.h \
	include/wx/things/thingdef.h \
	include/wx/things/toggle.h
THINGSDEMO_CXXFLAGS = $(____things) $(____things_3) -W -Wall -I../include \
	`$(WX_CONFIG) --cxxflags $(WX_CONFIG_FLAGS)` $(CPPFLAGS) $(CXXFLAGS)
THINGSDEMO_OBJECTS =  \
	gcc$(WX_PORT)$(_BUILDDIR_SHARED_SUFFIX)/thingsdemo_thingsdemo.o

### Conditionally set variables: ###

ifeq ($(WX_DEBUG),0)
WX_CONFIG_DEBUG_FLAG = --debug=no
endif
ifeq ($(WX_DEBUG),1)
WX_CONFIG_DEBUG_FLAG = --debug=yes
endif
ifeq ($(WX_UNICODE),0)
WX_CONFIG_UNICODE_FLAG = --unicode=no
endif
ifeq ($(WX_UNICODE),1)
WX_CONFIG_UNICODE_FLAG = --unicode=yes
endif
ifeq ($(WX_SHARED),0)
WX_CONFIG_SHARED_FLAG = --static=yes
endif
ifeq ($(WX_SHARED),1)
WX_CONFIG_SHARED_FLAG = --static=no
endif
ifeq ($(WX_SHARED),0)
_BUILDDIR_SHARED_SUFFIX = 
endif
ifeq ($(WX_SHARED),1)
_BUILDDIR_SHARED_SUFFIX = _dll
endif
ifeq ($(WX_SHARED),0)
__things_lib___depname = \
	../lib/gcc_$(__things)/libwxcode_$(WX_PORT)_things-$(WX_VERSION_MAJOR).$(WX_VERSION_MINOR).a
endif
ifeq ($(WX_SHARED),0)
__install_things_lib___depname = install_things_lib
endif
ifeq ($(WX_SHARED),0)
__uninstall_things_lib___depname = uninstall_things_lib
endif
ifeq ($(WX_SHARED),0)
__install_things_lib_headers___depname = install_things_lib_headers
endif
ifeq ($(WX_SHARED),0)
__uninstall_things_lib_headers___depname = uninstall_things_lib_headers
endif
ifeq ($(WX_SHARED),1)
__things_dll___depname = \
	../lib/gcc_$(__things)/libwxcode_$(WX_PORT)_things-$(WX_VERSION_MAJOR).$(WX_VERSION_MINOR).so
endif
ifeq ($(WX_SHARED),1)
__install_things_dll___depname = install_things_dll
endif
ifeq ($(WX_SHARED),1)
__uninstall_things_dll___depname = uninstall_things_dll
endif
ifeq ($(WX_SHARED),1)
__install_things_dll_headers___depname = install_things_dll_headers
endif
ifeq ($(WX_SHARED),1)
__uninstall_things_dll_headers___depname = uninstall_things_dll_headers
endif
ifeq ($(WX_SHARED),1)
__thingsdemo_RPATH = -Wl,-rpath,../../lib/gcc_dll
endif
ifeq ($(WX_SHARED),0)
__things = lib
endif
ifeq ($(WX_SHARED),1)
__things = dll
endif
ifeq ($(WX_DEBUG),0)
____things = -O2
endif
ifeq ($(WX_DEBUG),1)
____things = -O0
endif
ifeq ($(WX_DEBUG),0)
____things_3 = 
endif
ifeq ($(WX_DEBUG),1)
____things_3 = -g
endif


all: gcc$(WX_PORT)$(_BUILDDIR_SHARED_SUFFIX)
gcc$(WX_PORT)$(_BUILDDIR_SHARED_SUFFIX):
	@mkdir -p gcc$(WX_PORT)$(_BUILDDIR_SHARED_SUFFIX)

### Targets: ###

all: test_for_selected_wxbuild $(__things_lib___depname) $(__things_dll___depname) ../samples/things/thingsdemo

install: all $(__install_things_lib___depname) $(__install_things_lib_headers___depname) $(__install_things_dll___depname) $(__install_things_dll_headers___depname)

uninstall: $(__uninstall_things_lib___depname) $(__uninstall_things_lib_headers___depname) $(__uninstall_things_dll___depname) $(__uninstall_things_dll_headers___depname)

clean: 
	rm -f gcc$(WX_PORT)$(_BUILDDIR_SHARED_SUFFIX)/*.o
	rm -f gcc$(WX_PORT)$(_BUILDDIR_SHARED_SUFFIX)/*.d
	rm -f ../lib/gcc_$(__things)/libwxcode_$(WX_PORT)_things-$(WX_VERSION_MAJOR).$(WX_VERSION_MINOR).a
	rm -f ../lib/gcc_$(__things)/libwxcode_$(WX_PORT)_things-$(WX_VERSION_MAJOR).$(WX_VERSION_MINOR).so
	rm -f ../lib/gcc_$(__things)/libwxcode_$(WX_PORT)_things-$(WX_VERSION_MAJOR).$(WX_VERSION_MINOR).so
	rm -f ../samples/things/thingsdemo

test_for_selected_wxbuild: 
	@$(WX_CONFIG) $(WX_CONFIG_FLAGS)

ifeq ($(WX_SHARED),0)
../lib/gcc_$(__things)/libwxcode_$(WX_PORT)_things-$(WX_VERSION_MAJOR).$(WX_VERSION_MINOR).a: make_dir_things_lib  $(THINGS_LIB_OBJECTS)
	rm -f $@
	$(AR) rcu $@ $(THINGS_LIB_OBJECTS)
	$(RANLIB) $@
endif

ifeq ($(WX_SHARED),0)
install_things_lib: 
	$(INSTALL) -d $(DESTDIR)$(prefix)/lib
	$(INSTALL) -m 644 ../lib/gcc_$(__things)/libwxcode_$(WX_PORT)_things-$(WX_VERSION_MAJOR).$(WX_VERSION_MINOR).a $(DESTDIR)$(prefix)/lib
endif

ifeq ($(WX_SHARED),0)
uninstall_things_lib: 
	rm -f $(DESTDIR)$(prefix)/lib/libwxcode_$(WX_PORT)_things-$(WX_VERSION_MAJOR).$(WX_VERSION_MINOR).a
endif

make_dir_things_lib: 
	@mkdir -p ../lib/gcc_$(__things)

ifeq ($(WX_SHARED),0)
install_things_lib_headers: 
	$(INSTALL) -d $(DESTDIR)$(prefix)
	for f in $(THINGS_LIB_HEADERS); do \
	if test ! -d $(DESTDIR)$(prefix)/`dirname $$f` ; then \
	$(INSTALL) -d $(DESTDIR)$(prefix)/`dirname $$f`; \
	fi; \
	$(INSTALL) -m 644 ../$$f $(DESTDIR)$(prefix)/$$f; \
	done
endif

ifeq ($(WX_SHARED),0)
uninstall_things_lib_headers: 
	for f in $(THINGS_LIB_HEADERS); do \
	rm -f $(DESTDIR)$(prefix)/$$f; \
	done
endif

ifeq ($(WX_SHARED),1)
../lib/gcc_$(__things)/libwxcode_$(WX_PORT)_things-$(WX_VERSION_MAJOR).$(WX_VERSION_MINOR).so: make_dir_things_dll  $(THINGS_DLL_OBJECTS)
	$(CXX) -shared -fPIC -o $@ $(THINGS_DLL_OBJECTS) $(LDFLAGS) $(____things_3) -L../lib  `$(WX_CONFIG) $(WX_CONFIG_FLAGS) --libs adv,core,base`
endif

ifeq ($(WX_SHARED),1)
install_things_dll: 
	$(INSTALL) -d $(DESTDIR)$(prefix)/lib
	$(INSTALL) -m 644 ../lib/gcc_$(__things)/libwxcode_$(WX_PORT)_things-$(WX_VERSION_MAJOR).$(WX_VERSION_MINOR).so $(DESTDIR)$(prefix)/lib
	install -c ../lib/gcc_$(__things)/libwxcode_$(WX_PORT)_things-$(WX_VERSION_MAJOR).$(WX_VERSION_MINOR).so $(DESTDIR)$(prefix)/lib
endif

ifeq ($(WX_SHARED),1)
uninstall_things_dll: 
	rm -f $(DESTDIR)$(prefix)/lib/libwxcode_$(WX_PORT)_things-$(WX_VERSION_MAJOR).$(WX_VERSION_MINOR).so
	rm -f $(DESTDIR)$(prefix)/lib/libwxcode_$(WX_PORT)_things-$(WX_VERSION_MAJOR).$(WX_VERSION_MINOR).so
endif

make_dir_things_dll: 
	@mkdir -p ../lib/gcc_$(__things)

ifeq ($(WX_SHARED),1)
install_things_dll_headers: 
	$(INSTALL) -d $(DESTDIR)$(prefix)
	for f in $(THINGS_DLL_HEADERS); do \
	if test ! -d $(DESTDIR)$(prefix)/`dirname $$f` ; then \
	$(INSTALL) -d $(DESTDIR)$(prefix)/`dirname $$f`; \
	fi; \
	$(INSTALL) -m 644 ../$$f $(DESTDIR)$(prefix)/$$f; \
	done
endif

ifeq ($(WX_SHARED),1)
uninstall_things_dll_headers: 
	for f in $(THINGS_DLL_HEADERS); do \
	rm -f $(DESTDIR)$(prefix)/$$f; \
	done
endif

../samples/things/thingsdemo: $(THINGSDEMO_OBJECTS) make_sample_dir_thingsdemo $(__things_lib___depname)
	$(CXX) -o $@ $(THINGSDEMO_OBJECTS) $(LDFLAGS) $(____things_3) -L../lib  $(__thingsdemo_RPATH)  ../lib/gcc_$(__things)/libwxcode_$(WX_PORT)_things-$(WX_VERSION_MAJOR).$(WX_VERSION_MINOR).a `$(WX_CONFIG) $(WX_CONFIG_FLAGS) --libs adv,core,base`

make_sample_dir_thingsdemo: 
	@mkdir -p ../samples/things

gcc$(WX_PORT)$(_BUILDDIR_SHARED_SUFFIX)/things_lib_block.o: ../src/block.cpp
	$(CXX) -c -o $@ $(THINGS_LIB_CXXFLAGS) $(CPPDEPS) $<

gcc$(WX_PORT)$(_BUILDDIR_SHARED_SUFFIX)/things_lib_bmpcombo.o: ../src/bmpcombo.cpp
	$(CXX) -c -o $@ $(THINGS_LIB_CXXFLAGS) $(CPPDEPS) $<

gcc$(WX_PORT)$(_BUILDDIR_SHARED_SUFFIX)/things_lib_dropdown.o: ../src/dropdown.cpp
	$(CXX) -c -o $@ $(THINGS_LIB_CXXFLAGS) $(CPPDEPS) $<

gcc$(WX_PORT)$(_BUILDDIR_SHARED_SUFFIX)/things_lib_filebrws.o: ../src/filebrws.cpp
	$(CXX) -c -o $@ $(THINGS_LIB_CXXFLAGS) $(CPPDEPS) $<

gcc$(WX_PORT)$(_BUILDDIR_SHARED_SUFFIX)/things_lib_filedlgg.o: ../src/filedlgg.cpp
	$(CXX) -c -o $@ $(THINGS_LIB_CXXFLAGS) $(CPPDEPS) $<

gcc$(WX_PORT)$(_BUILDDIR_SHARED_SUFFIX)/things_lib_genergdi.o: ../src/genergdi.cpp
	$(CXX) -c -o $@ $(THINGS_LIB_CXXFLAGS) $(CPPDEPS) $<

gcc$(WX_PORT)$(_BUILDDIR_SHARED_SUFFIX)/things_lib_geometry.o: ../src/geometry.cpp
	$(CXX) -c -o $@ $(THINGS_LIB_CXXFLAGS) $(CPPDEPS) $<

gcc$(WX_PORT)$(_BUILDDIR_SHARED_SUFFIX)/things_lib_matrix2d.o: ../src/matrix2d.cpp
	$(CXX) -c -o $@ $(THINGS_LIB_CXXFLAGS) $(CPPDEPS) $<

gcc$(WX_PORT)$(_BUILDDIR_SHARED_SUFFIX)/things_lib_menubtn.o: ../src/menubtn.cpp
	$(CXX) -c -o $@ $(THINGS_LIB_CXXFLAGS) $(CPPDEPS) $<

gcc$(WX_PORT)$(_BUILDDIR_SHARED_SUFFIX)/things_lib_optvalue.o: ../src/optvalue.cpp
	$(CXX) -c -o $@ $(THINGS_LIB_CXXFLAGS) $(CPPDEPS) $<

gcc$(WX_PORT)$(_BUILDDIR_SHARED_SUFFIX)/things_lib_range.o: ../src/range.cpp
	$(CXX) -c -o $@ $(THINGS_LIB_CXXFLAGS) $(CPPDEPS) $<

gcc$(WX_PORT)$(_BUILDDIR_SHARED_SUFFIX)/things_lib_spinctld.o: ../src/spinctld.cpp
	$(CXX) -c -o $@ $(THINGS_LIB_CXXFLAGS) $(CPPDEPS) $<

gcc$(WX_PORT)$(_BUILDDIR_SHARED_SUFFIX)/things_lib_toggle.o: ../src/toggle.cpp
	$(CXX) -c -o $@ $(THINGS_LIB_CXXFLAGS) $(CPPDEPS) $<

gcc$(WX_PORT)$(_BUILDDIR_SHARED_SUFFIX)/things_dll_block.o: ../src/block.cpp
	$(CXX) -c -o $@ $(THINGS_DLL_CXXFLAGS) $(CPPDEPS) $<

gcc$(WX_PORT)$(_BUILDDIR_SHARED_SUFFIX)/things_dll_bmpcombo.o: ../src/bmpcombo.cpp
	$(CXX) -c -o $@ $(THINGS_DLL_CXXFLAGS) $(CPPDEPS) $<

gcc$(WX_PORT)$(_BUILDDIR_SHARED_SUFFIX)/things_dll_dropdown.o: ../src/dropdown.cpp
	$(CXX) -c -o $@ $(THINGS_DLL_CXXFLAGS) $(CPPDEPS) $<

gcc$(WX_PORT)$(_BUILDDIR_SHARED_SUFFIX)/things_dll_filebrws.o: ../src/filebrws.cpp
	$(CXX) -c -o $@ $(THINGS_DLL_CXXFLAGS) $(CPPDEPS) $<

gcc$(WX_PORT)$(_BUILDDIR_SHARED_SUFFIX)/things_dll_filedlgg.o: ../src/filedlgg.cpp
	$(CXX) -c -o $@ $(THINGS_DLL_CXXFLAGS) $(CPPDEPS) $<

gcc$(WX_PORT)$(_BUILDDIR_SHARED_SUFFIX)/things_dll_genergdi.o: ../src/genergdi.cpp
	$(CXX) -c -o $@ $(THINGS_DLL_CXXFLAGS) $(CPPDEPS) $<

gcc$(WX_PORT)$(_BUILDDIR_SHARED_SUFFIX)/things_dll_geometry.o: ../src/geometry.cpp
	$(CXX) -c -o $@ $(THINGS_DLL_CXXFLAGS) $(CPPDEPS) $<

gcc$(WX_PORT)$(_BUILDDIR_SHARED_SUFFIX)/things_dll_matrix2d.o: ../src/matrix2d.cpp
	$(CXX) -c -o $@ $(THINGS_DLL_CXXFLAGS) $(CPPDEPS) $<

gcc$(WX_PORT)$(_BUILDDIR_SHARED_SUFFIX)/things_dll_menubtn.o: ../src/menubtn.cpp
	$(CXX) -c -o $@ $(THINGS_DLL_CXXFLAGS) $(CPPDEPS) $<

gcc$(WX_PORT)$(_BUILDDIR_SHARED_SUFFIX)/things_dll_optvalue.o: ../src/optvalue.cpp
	$(CXX) -c -o $@ $(THINGS_DLL_CXXFLAGS) $(CPPDEPS) $<

gcc$(WX_PORT)$(_BUILDDIR_SHARED_SUFFIX)/things_dll_range.o: ../src/range.cpp
	$(CXX) -c -o $@ $(THINGS_DLL_CXXFLAGS) $(CPPDEPS) $<

gcc$(WX_PORT)$(_BUILDDIR_SHARED_SUFFIX)/things_dll_spinctld.o: ../src/spinctld.cpp
	$(CXX) -c -o $@ $(THINGS_DLL_CXXFLAGS) $(CPPDEPS) $<

gcc$(WX_PORT)$(_BUILDDIR_SHARED_SUFFIX)/things_dll_toggle.o: ../src/toggle.cpp
	$(CXX) -c -o $@ $(THINGS_DLL_CXXFLAGS) $(CPPDEPS) $<

gcc$(WX_PORT)$(_BUILDDIR_SHARED_SUFFIX)/thingsdemo_thingsdemo.o: ../samples/things/thingsdemo.cpp
	$(CXX) -c -o $@ $(THINGSDEMO_CXXFLAGS) $(CPPDEPS) $<

.PHONY: all install uninstall clean install_things_lib uninstall_things_lib install_things_lib_headers uninstall_things_lib_headers install_things_dll uninstall_things_dll install_things_dll_headers uninstall_things_dll_headers


# Dependencies tracking:
-include gcc$(WX_PORT)$(_BUILDDIR_SHARED_SUFFIX)/*.d
