# Makefile for vuGui and all the related wxUtilities and wxUIElements
#
# It builds the libraries vuwxUIElements and vuwxUtilities and finally
# compiles the program vuGui.
#

#------------------------------------------------------------------------
# building libs vuwxUIElements and vuwxUtilities

srcdir = ../..
include $(MAKEBUNDLE)/pre.make
include $(srcdir)/vuGui/makewx.env

#------------------------------------------------------------------------
# building the executable vuGui

TOOL_NAME = paled

paled_SOURCES = SpecPalette.cpp

INCLS    += $(WXINCLS) -I$(srcdir)/vuGui
CPPFLAGS += $(WXFLAGS)
LIB_DIR  += $(WXLIB_DIR)
LIBS     := $(WXLIBS) $(WXLIBFLAGS) $(LIBS)
LIBS	 += -lvuwxUtilities         \
            -lvuwxUIElements        \
            -lvuVolume              \
            -lvuGeneral             \
            -lpaint                 \
            $(GLLIBS)

ifeq ($(OS),IRIX)
  LIBS += -lfftw
else
  LIBS += -lsfftw
endif

ifeq ($(DO_SPECTRAL),YES)
  LIBS += -lcoool  \
          -lla
endif

#If compiling under windows, the wxrc.rc file is needed
ifeq ($(OS),WINDOWS)
  vuGui_SOURCES += wxrc.o
endif

include $(MAKEBUNDLE)/tool.make

wxrc.o: $(WXDIR)/include/wx/msw/wx.rc
	windres --include-dir $(WXDIR)/include/wx/msw --include-dir $(WXDIR)/include --define __WIN32__ --define __GNUWIN32__ -o wxrc.o $(WXDIR)/include/wx/msw/wx.rc
