CPP	=	g++
CC	=	gcc
MOC	=	moc

INCL	=	-I../../include

CPPINCL =	$(INCL)

OBJS	=	$(OBJDIR)/treelist.o \
		$(OBJDIR)/transformwidget.o \
		$(OBJDIR)/getfilewidget.o \
		$(OBJDIR)/tabwidget.o \
		$(OBJDIR)/percentwidget.o \
		$(OBJDIR)/vectorwidget.o \
		$(OBJDIR)/spinbox.o \
		$(OBJDIR)/sliderwidget.o

MOBJS	=	treelist.moc \
		transformwidget.moc \
		getfilewidget.moc \
		tabwidget.moc \
		percentwidget.moc \
		spinbox.moc \
		vectorwidget.moc \
		sliderwidget.moc

%.moc:		%.h
		$(MOC) $< -o $@

all:		$(MOBJS) $(OBJS)

$(OBJS):	$(MOBJS) build

build:	

$(OBJS):	$(MOBJS) build

build:	
		@for OBJ in $(OBJS) ; do \
			SRC=`basename $$OBJ .o` ; \
			if test ! -f "$$OBJ" -o "$$SRC.cpp" -nt "$$OBJ" -o "$$SRC.h" -nt "$$OBJ" ; then \
				echo "Compiling $$SRC.cpp" ; \
				$(CPP) $(CPPFLAGS) $(CPPINCL) -c $$SRC.cpp -o $$OBJ ; \
			fi \
		done
			

new:		clean all

clean:
		rm -f $(MOBJS) $(OBJS) *~ icons/*~

