# =========================================================================
#     This makefile was generated by
#     Bakefile 0.2.1 (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 = 

# Use DLL build of wx library to use? [0,1]
WX_SHARED = 0

# Compile Unicode build of wxWidgets? [0,1]
WX_UNICODE = 0

# Use debug build of wxWidgets (define __WXDEBUG__)? [0,1]
WX_DEBUG = 1

# Version of the wx library to build against. 
WX_VERSION = 28

# Port of the wx library to build against [gtk1,gtk2,msw,x11,motif,mgl,mac]
WX_PORT = gtk2

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



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

### Variables: ###

CPPDEPS = -MT$@ -MF`echo $@ | sed -e 's,\.o$$,.d,'` -MD
LED_CXXFLAGS = -I../../include `$(WX_CONFIG) --cxxflags $(WX_CONFIG_DEBUG_FLAG) \
	$(WX_CONFIG_UNICODE_FLAG) $(WX_CONFIG_SHARED_FLAG) --toolkit=$(WX_PORT)` \
	$(CPPFLAGS) $(CXXFLAGS)
LED_OBJECTS =  \
	led_led.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)
WX_CONFIG_SHARED_FLAG = --static=yes
endif
ifeq ($(WX_SHARED),1)
WX_CONFIG_SHARED_FLAG = --static=no
endif


### Targets: ###

all: test_for_selected_wxbuild ../../lib/libled.a

install: all install_led

uninstall: uninstall_led

clean: 
	rm -f ./*.o
	rm -f ./*.d
	rm -f ../../lib/libled.a

test_for_selected_wxbuild: 
	@$(WX_CONFIG) $(WX_CONFIG_DEBUG_FLAG) $(WX_CONFIG_UNICODE_FLAG) $(WX_CONFIG_SHARED_FLAG) --toolkit=$(WX_PORT)

../../lib/libled.a: $(LED_OBJECTS)
	rm -f $@
	$(AR) rcu $@ $(LED_OBJECTS)
	$(RANLIB) $@

install_led: 
	$(INSTALL) -d $(DESTDIR)$(prefix)/bin
	$(INSTALL) -m 644 ../../lib/libled.a $(DESTDIR)$(prefix)/bin

uninstall_led: 
	rm -f $(DESTDIR)$(prefix)/bin/libled.a

led_led.o: ../../src/led.cpp
	$(CXX) -c -o $@ $(LED_CXXFLAGS) $(CPPDEPS) $<

.PHONY: all install uninstall clean install_led uninstall_led


# Dependencies tracking:
-include ./*.d
