#############################################################################
# Makefile for building: marote
# Generated by qmake (1.07a) (Qt 3.3.4) on: Tue May 24 09:39:59 2005
# Project:  marote.pro
# Template: app
# Command: $(QMAKE) -o Makefile marote.pro
#############################################################################

####### Compiler, tools and options

CC       = gcc
CXX      = g++
LEX      = flex
YACC     = yacc
CFLAGS   = -pipe -Wall -W -O3 -march=athlon-xp -pipe -D_REENTRANT  -DQT_NO_DEBUG -DQT_THREAD_SUPPORT
CXXFLAGS = -pipe -Wall -W -O3 -march=athlon-xp -pipe -D_REENTRANT  -DQT_NO_DEBUG -DQT_THREAD_SUPPORT
LEXFLAGS = 
YACCFLAGS= -d
INCPATH  = -I/usr/qt/3/mkspecs/linux-g++ -I. -I$(QTDIR)/include
LINK     = g++
LFLAGS   = 
LIBS     = $(SUBLIBS) -L$(QTDIR)/lib -L/usr/X11R6/lib -lqt-mt -lXext -lX11 -lm -lpthread
AR       = ar cqs
RANLIB   = 
MOC      = $(QTDIR)/bin/moc
UIC      = $(QTDIR)/bin/uic
QMAKE    = qmake
TAR      = tar -cf
GZIP     = gzip -9f
COPY     = cp -f
COPY_FILE= $(COPY)
COPY_DIR = $(COPY) -r
INSTALL_FILE= $(COPY_FILE)
INSTALL_DIR = $(COPY_DIR)
DEL_FILE = rm -f
SYMLINK  = ln -sf
DEL_DIR  = rmdir
MOVE     = mv -f
CHK_DIR_EXISTS= test -d
MKDIR    = mkdir -p

####### Output directory

OBJECTS_DIR = ./

####### Files

HEADERS = k2.h \
		findpowermate.h \
		pwrmate.h \
		k2_thr.h \
		xlogger.h
SOURCES = main.cpp \
		pwrmate.cpp \
		findpowermate.cpp \
		k2.cpp \
		k2_thr.cpp \
		xlogger.cpp
OBJECTS = main.o \
		pwrmate.o \
		findpowermate.o \
		k2.o \
		k2_thr.o \
		xlogger.o \
		form2.o \
		qmake_image_collection.o
FORMS = form2.ui
UICDECLS = form2.h
UICIMPLS = form2.cpp
SRCMOC   = moc_pwrmate.cpp \
		moc_k2_thr.cpp \
		moc_form2.cpp
OBJMOC = moc_pwrmate.o \
		moc_k2_thr.o \
		moc_form2.o
DIST	   = marote.pro
QMAKE_TARGET = marote
DESTDIR  = 
TARGET   = marote

first: all
####### Implicit rules

.SUFFIXES: .c .o .cpp .cc .cxx .C

.cpp.o:
	$(CXX) -c $(CXXFLAGS) $(INCPATH) -o $@ $<

.cc.o:
	$(CXX) -c $(CXXFLAGS) $(INCPATH) -o $@ $<

.cxx.o:
	$(CXX) -c $(CXXFLAGS) $(INCPATH) -o $@ $<

.C.o:
	$(CXX) -c $(CXXFLAGS) $(INCPATH) -o $@ $<

.c.o:
	$(CC) -c $(CFLAGS) $(INCPATH) -o $@ $<

####### Build rules

all: Makefile $(TARGET)

$(TARGET):  $(UICDECLS) $(OBJECTS) $(OBJMOC)  
	$(LINK) $(LFLAGS) -o $(TARGET) $(OBJECTS) $(OBJMOC) $(OBJCOMP) $(LIBS)

mocables: $(SRCMOC)
uicables: $(UICDECLS) $(UICIMPLS)

$(MOC): 
	( cd $(QTDIR)/src/moc && $(MAKE) )

Makefile: marote.pro  /usr/qt/3/mkspecs/linux-g++/qmake.conf 
	$(QMAKE) -o Makefile marote.pro
qmake: 
	@$(QMAKE) -o Makefile marote.pro

dist: 
	@mkdir -p .tmp/marote && $(COPY_FILE) --parents $(SOURCES) $(HEADERS) $(FORMS) $(DIST) .tmp/marote/ && $(COPY_FILE) --parents left.png right.png grnDot.png redDot.png grnBtn.png blueDot.png greenLED.png redLED.png yellowLED.png k2bkgnd.png .tmp/marote/ && $(COPY_FILE) --parents form2.ui.h .tmp/marote/ && ( cd `dirname .tmp/marote` && $(TAR) marote.tar marote && $(GZIP) marote.tar ) && $(MOVE) `dirname .tmp/marote`/marote.tar.gz . && $(DEL_FILE) -r .tmp/marote

mocclean:
	-$(DEL_FILE) $(OBJMOC)
	-$(DEL_FILE) $(SRCMOC)

uiclean:
	-$(DEL_FILE) $(UICIMPLS) $(UICDECLS)

yaccclean:
lexclean:
clean: mocclean uiclean
	-$(DEL_FILE) $(OBJECTS)
		-$(DEL_FILE) qmake_image_collection.cpp
	-$(DEL_FILE) *~ core *.core


####### Sub-libraries

distclean: clean
	-$(DEL_FILE) $(TARGET) $(TARGET)


FORCE:

####### Compile

main.o: main.cpp form2.h \
		logform.h \
		pwrmate.h \
		k2_thr.h \
		xlogger.h \
		findpowermate.h \
		k2.h

pwrmate.o: pwrmate.cpp pwrmate.h \
		findpowermate.h

findpowermate.o: findpowermate.cpp findpowermate.h

k2.o: k2.cpp k2.h

k2_thr.o: k2_thr.cpp k2_thr.h \
		k2.h

xlogger.o: xlogger.cpp xlogger.h

form2.h: form2.ui pwrmate.h \
		k2_thr.h \
		xlogger.h \
		logform.h \
		findpowermate.h \
		k2.h
	$(UIC) form2.ui -o form2.h

form2.cpp: form2.h form2.ui form2.ui.h pwrmate.h \
		k2_thr.h \
		xlogger.h \
		logform.h \
		findpowermate.h \
		k2.h
	$(UIC) form2.ui -i form2.h -o form2.cpp

form2.o: form2.cpp form2.ui.h \
		form2.h

moc_pwrmate.o: moc_pwrmate.cpp  pwrmate.h findpowermate.h

moc_k2_thr.o: moc_k2_thr.cpp  k2_thr.h k2.h

moc_form2.o: moc_form2.cpp  form2.h pwrmate.h \
		k2_thr.h \
		xlogger.h \
		logform.h \
		findpowermate.h \
		k2.h

moc_pwrmate.cpp: $(MOC) pwrmate.h
	$(MOC) pwrmate.h -o moc_pwrmate.cpp

moc_k2_thr.cpp: $(MOC) k2_thr.h
	$(MOC) k2_thr.h -o moc_k2_thr.cpp

moc_form2.cpp: $(MOC) form2.h
	$(MOC) form2.h -o moc_form2.cpp

qmake_image_collection.o: qmake_image_collection.cpp

qmake_image_collection.cpp: left.png \
		right.png \
		grnDot.png \
		redDot.png \
		grnBtn.png \
		blueDot.png \
		greenLED.png \
		redLED.png \
		yellowLED.png \
		k2bkgnd.png
	$(UIC)  -embed marote left.png right.png grnDot.png redDot.png grnBtn.png blueDot.png greenLED.png redLED.png yellowLED.png k2bkgnd.png -o qmake_image_collection.cpp

####### Install

install_target: all 
	@$(CHK_DIR_EXISTS) "$(INSTALL_ROOT)/usr/local/bin/" || $(MKDIR) "$(INSTALL_ROOT)/usr/local/bin/"
	-$(INSTALL_FILE) "$(QMAKE_TARGET)" "$(INSTALL_ROOT)/usr/local/bin/$(QMAKE_TARGET)"
	-strip "$(INSTALL_ROOT)/usr/local/bin/$(QMAKE_TARGET)"

uninstall_target: 
	-$(DEL_FILE) "$(INSTALL_ROOT)/usr/local/bin/$(QMAKE_TARGET)"
	-$(DEL_DIR) "$(INSTALL_ROOT)/usr/local/bin/"


install: install_target  

uninstall: uninstall_target  

