#############################################################################
# Makefile for building: txtreader
# Generated by qmake (2.01a) (Qt 4.6.3) on: Mon Feb 28 17:53:27 2011
# Project:  txtreader.pro
# Template: app
# Command: /usr/bin/qmake -unix -o Makefile txtreader.pro
#############################################################################

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

CC            = gcc
CXX           = g++
DEFINES       = -DQT_NO_DEBUG -DQT_GUI_LIB -DQT_CORE_LIB -DQT_SHARED
CFLAGS        = -pipe -O2 -fomit-frame-pointer -fmessage-length=0 -O2 -Wall -D_FORTIFY_SOURCE=2 -fstack-protector -funwind-tables -fasynchronous-unwind-tables -g -Wall -W -D_REENTRANT $(DEFINES)
CXXFLAGS      = -pipe -O2 -fomit-frame-pointer -fmessage-length=0 -O2 -Wall -D_FORTIFY_SOURCE=2 -fstack-protector -funwind-tables -fasynchronous-unwind-tables -g -Wall -W -D_REENTRANT $(DEFINES)
INCPATH       = -I/usr/share/qt4/mkspecs/default -I. -I/usr/include/QtCore -I/usr/include/QtGui -I/usr/include -I. -Isrc -I.
LINK          = g++
LFLAGS        = -Wl,-O1
LIBS          = $(SUBLIBS)  -L/usr/lib -lQtGui -L/usr/lib -L/usr/X11R6/lib -lQtCore -lpthread 
AR            = ar cqs
RANLIB        = 
QMAKE         = /usr/bin/qmake
TAR           = tar -cf
COMPRESS      = gzip -9f
COPY          = cp -f
SED           = sed
COPY_FILE     = $(COPY)
COPY_DIR      = $(COPY) -r
STRIP         = strip
INSTALL_FILE  = install -m 644 -p
INSTALL_DIR   = $(COPY_DIR)
INSTALL_PROGRAM = install -m 755 -p
DEL_FILE      = rm -f
SYMLINK       = ln -f -s
DEL_DIR       = rmdir
MOVE          = mv -f
CHK_DIR_EXISTS= test -d
MKDIR         = mkdir -p

####### Output directory

OBJECTS_DIR   = ./

####### Files

SOURCES       = src/main.cpp \
		src/TxtReader.cpp \
		src/ReaderView.cpp moc_TxtReader.cpp \
		moc_ReaderView.cpp \
		qrc_txtreader.cpp
OBJECTS       = main.o \
		TxtReader.o \
		ReaderView.o \
		moc_TxtReader.o \
		moc_ReaderView.o \
		qrc_txtreader.o
DIST          = /usr/share/qt4/mkspecs/common/g++.conf \
		/usr/share/qt4/mkspecs/common/unix.conf \
		/usr/share/qt4/mkspecs/common/linux.conf \
		/usr/share/qt4/mkspecs/qconfig.pri \
		/usr/share/qt4/mkspecs/features/qt_functions.prf \
		/usr/share/qt4/mkspecs/features/qt_config.prf \
		/usr/share/qt4/mkspecs/features/exclusive_builds.prf \
		/usr/share/qt4/mkspecs/features/default_pre.prf \
		/usr/share/qt4/mkspecs/features/release.prf \
		/usr/share/qt4/mkspecs/features/default_post.prf \
		/usr/share/qt4/mkspecs/features/warn_on.prf \
		/usr/share/qt4/mkspecs/features/qt.prf \
		/usr/share/qt4/mkspecs/features/unix/thread.prf \
		/usr/share/qt4/mkspecs/features/moc.prf \
		/usr/share/qt4/mkspecs/features/resources.prf \
		/usr/share/qt4/mkspecs/features/uic.prf \
		/usr/share/qt4/mkspecs/features/yacc.prf \
		/usr/share/qt4/mkspecs/features/lex.prf \
		/usr/share/qt4/mkspecs/features/include_source_dir.prf \
		txtreader.pro
QMAKE_TARGET  = txtreader
DESTDIR       = 
TARGET        = txtreader

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

.SUFFIXES: .o .c .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):  $(OBJECTS)  
	$(LINK) $(LFLAGS) -o $(TARGET) $(OBJECTS) $(OBJCOMP) $(LIBS)

Makefile: txtreader.pro  /usr/share/qt4/mkspecs/default/qmake.conf /usr/share/qt4/mkspecs/common/g++.conf \
		/usr/share/qt4/mkspecs/common/unix.conf \
		/usr/share/qt4/mkspecs/common/linux.conf \
		/usr/share/qt4/mkspecs/qconfig.pri \
		/usr/share/qt4/mkspecs/features/qt_functions.prf \
		/usr/share/qt4/mkspecs/features/qt_config.prf \
		/usr/share/qt4/mkspecs/features/exclusive_builds.prf \
		/usr/share/qt4/mkspecs/features/default_pre.prf \
		/usr/share/qt4/mkspecs/features/release.prf \
		/usr/share/qt4/mkspecs/features/default_post.prf \
		/usr/share/qt4/mkspecs/features/warn_on.prf \
		/usr/share/qt4/mkspecs/features/qt.prf \
		/usr/share/qt4/mkspecs/features/unix/thread.prf \
		/usr/share/qt4/mkspecs/features/moc.prf \
		/usr/share/qt4/mkspecs/features/resources.prf \
		/usr/share/qt4/mkspecs/features/uic.prf \
		/usr/share/qt4/mkspecs/features/yacc.prf \
		/usr/share/qt4/mkspecs/features/lex.prf \
		/usr/share/qt4/mkspecs/features/include_source_dir.prf \
		/usr/lib/libQtGui.prl \
		/usr/lib/libQtCore.prl
	$(QMAKE) -unix -o Makefile txtreader.pro
/usr/share/qt4/mkspecs/common/g++.conf:
/usr/share/qt4/mkspecs/common/unix.conf:
/usr/share/qt4/mkspecs/common/linux.conf:
/usr/share/qt4/mkspecs/qconfig.pri:
/usr/share/qt4/mkspecs/features/qt_functions.prf:
/usr/share/qt4/mkspecs/features/qt_config.prf:
/usr/share/qt4/mkspecs/features/exclusive_builds.prf:
/usr/share/qt4/mkspecs/features/default_pre.prf:
/usr/share/qt4/mkspecs/features/release.prf:
/usr/share/qt4/mkspecs/features/default_post.prf:
/usr/share/qt4/mkspecs/features/warn_on.prf:
/usr/share/qt4/mkspecs/features/qt.prf:
/usr/share/qt4/mkspecs/features/unix/thread.prf:
/usr/share/qt4/mkspecs/features/moc.prf:
/usr/share/qt4/mkspecs/features/resources.prf:
/usr/share/qt4/mkspecs/features/uic.prf:
/usr/share/qt4/mkspecs/features/yacc.prf:
/usr/share/qt4/mkspecs/features/lex.prf:
/usr/share/qt4/mkspecs/features/include_source_dir.prf:
/usr/lib/libQtGui.prl:
/usr/lib/libQtCore.prl:
qmake:  FORCE
	@$(QMAKE) -unix -o Makefile txtreader.pro

dist: 
	@$(CHK_DIR_EXISTS) .tmp/txtreader1.0.0 || $(MKDIR) .tmp/txtreader1.0.0 
	$(COPY_FILE) --parents $(SOURCES) $(DIST) .tmp/txtreader1.0.0/ && $(COPY_FILE) --parents src/TxtReader.h src/ReaderView.h .tmp/txtreader1.0.0/ && $(COPY_FILE) --parents txtreader.qrc .tmp/txtreader1.0.0/ && $(COPY_FILE) --parents src/main.cpp src/TxtReader.cpp src/ReaderView.cpp .tmp/txtreader1.0.0/ && $(COPY_FILE) --parents i18n/txtreader_English.ts i18n/txtreader_zh_CN.ts .tmp/txtreader1.0.0/ && (cd `dirname .tmp/txtreader1.0.0` && $(TAR) txtreader1.0.0.tar txtreader1.0.0 && $(COMPRESS) txtreader1.0.0.tar) && $(MOVE) `dirname .tmp/txtreader1.0.0`/txtreader1.0.0.tar.gz . && $(DEL_FILE) -r .tmp/txtreader1.0.0


clean:compiler_clean 
	-$(DEL_FILE) $(OBJECTS)
	-$(DEL_FILE) *~ core *.core


####### Sub-libraries

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


check: first

mocclean: compiler_moc_header_clean compiler_moc_source_clean

mocables: compiler_moc_header_make_all compiler_moc_source_make_all

compiler_moc_header_make_all: moc_TxtReader.cpp moc_ReaderView.cpp
compiler_moc_header_clean:
	-$(DEL_FILE) moc_TxtReader.cpp moc_ReaderView.cpp
moc_TxtReader.cpp: src/ReaderView.h \
		src/TxtReader.h
	/usr/bin/moc $(DEFINES) $(INCPATH) src/TxtReader.h -o moc_TxtReader.cpp

moc_ReaderView.cpp: src/ReaderView.h
	/usr/bin/moc $(DEFINES) $(INCPATH) src/ReaderView.h -o moc_ReaderView.cpp

compiler_rcc_make_all: qrc_txtreader.cpp
compiler_rcc_clean:
	-$(DEL_FILE) qrc_txtreader.cpp
qrc_txtreader.cpp: txtreader.qrc \
		README_zh_CN.HTML \
		CHANGES.TXT \
		README_English.HTML \
		i18n/txtreader_English.qm \
		i18n/txtreader_zh_CN.qm \
		images/fullscreen.png \
		images/open.png \
		images/setfont.png \
		images/close.png \
		images/bg.png \
		images/instruction.png \
		images/jump.png \
		images/lang.png \
		images/bookmark-clear.png \
		images/restore.png \
		images/bookmark-del.png \
		images/about.png \
		images/icon.png \
		images/codec.png \
		images/nofullscreen.png \
		images/bookmark-new.png \
		images/font.png \
		images/reset.png \
		images/min.png \
		images/zoom-out.png \
		images/bgcolor.png \
		images/exit.png \
		images/bgimage.png \
		images/zoom-in.png \
		images/bookmark.png
	/usr/bin/rcc -name txtreader txtreader.qrc -o qrc_txtreader.cpp

compiler_image_collection_make_all: qmake_image_collection.cpp
compiler_image_collection_clean:
	-$(DEL_FILE) qmake_image_collection.cpp
compiler_moc_source_make_all:
compiler_moc_source_clean:
compiler_uic_make_all:
compiler_uic_clean:
compiler_yacc_decl_make_all:
compiler_yacc_decl_clean:
compiler_yacc_impl_make_all:
compiler_yacc_impl_clean:
compiler_lex_make_all:
compiler_lex_clean:
compiler_clean: compiler_moc_header_clean compiler_rcc_clean 

####### Compile

main.o: src/main.cpp src/TxtReader.h \
		src/ReaderView.h
	$(CXX) -c $(CXXFLAGS) $(INCPATH) -o main.o src/main.cpp

TxtReader.o: src/TxtReader.cpp src/TxtReader.h \
		src/ReaderView.h
	$(CXX) -c $(CXXFLAGS) $(INCPATH) -o TxtReader.o src/TxtReader.cpp

ReaderView.o: src/ReaderView.cpp src/ReaderView.h
	$(CXX) -c $(CXXFLAGS) $(INCPATH) -o ReaderView.o src/ReaderView.cpp

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

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

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

####### Install

install:   all
	mkdir -p /usr/share/txtreader
	cp -f txtreader /usr/share/txtreader/
	cp -f icon.png /usr/share/txtreader/
	cp -f README_*.HTML /usr/share/txtreader/
	cp -f CHANGES.TXT /usr/share/txtreader/
	mkdir -p /usr/bin
	ln -s /usr/share/txtreader/txtreader /usr/bin/txtreader
	#Install application link for X-Windows
	mkdir -p /usr/share/applications
	echo "[Desktop Entry]" > /usr/share/applications/txtreader.desktop
	echo "Name=Txt Reader" >> /usr/share/applications/txtreader.desktop
	echo "GenericName=Txt Reader" >> /usr/share/applications/txtreader.desktop
	echo "GenericName[zh_CN]=文本阅读器" >> /usr/share/applications/txtreader.desktop
	echo "Comment=Txt Reader for linux" >> /usr/share/applications/txtreader.desktop
	echo "Comment[zh_CN]=Txt Reader(文本阅读器) for linux" >> /usr/share/applications/txtreader.desktop
	echo "Exec=/usr/share/txtreader/txtreader" >> /usr/share/applications/txtreader.desktop
	echo "Icon=/usr/share/txtreader/icon.png" >> /usr/share/applications/txtreader.desktop
	echo "Terminal=0" >> /usr/share/applications/txtreader.desktop
	echo "Type=Application" >> /usr/share/applications/txtreader.desktop
	echo "Categories=Qt;KDE;Utility;" >> /usr/share/applications/txtreader.desktop

uninstall:   all
	rm -rf /usr/share/txtreader
	rm -rf /usr/bin/txtreader
	rm -rf /usr/share/applications/txtreader.desktop

FORCE:

