#############################################################################

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

CXX	=	$(SYSCONF_CXX) $(QT_CXX_MT)
CXXFLAGS=	$(SYSCONF_CXXFLAGS_QT) $(SYSCONF_CXXFLAGS_YACC) $(SYSCONF_CXXFLAGS) -DQT_NO_CODECS -DQT_LITE_UNICODE
CC	=	$(SYSCONF_CC) $(QT_C_MT)
CFLAGS	=	$(SYSCONF_CFLAGS) -DQT_NO_CODECS -DQT_LITE_UNICODE
INCPATH =	-I../../include -I../tools -I.
LFLAGS	=	$(SYSCONF_LFLAGS) $(QT_LFLAGS_MT)
LIBS	=	$(SUBLIBS) $(SYSCONF_LIBS_YACC) $(SYSCONF_LIBS) $(SYSCONF_LIBS_QTAPP)
MOC	=	$(SYSCONF_MOC)
UIC	=	$(SYSCONF_UIC)

####### Target

DESTDIR = ./
VER_MAJ = 1
VER_MIN = 0
VER_PATCH = 0
TARGET	= moc
TARGET1 = lib$(TARGET).so.$(VER_MAJ)

####### Files

HEADERS =	
SOURCES =	mocgen.cpp \
		../tools/qbuffer.cpp \
		../tools/qcollection.cpp \
		../tools/qcstring.cpp \
		../tools/qdatastream.cpp \
		../tools/qdatetime.cpp \
		../tools/qfile.cpp \
		../tools/qgarray.cpp \
		../tools/qgdict.cpp \
		../tools/qglist.cpp \
		../tools/qglobal.cpp \
		../tools/qgvector.cpp \
		../tools/qiodevice.cpp \
		../tools/qregexp.cpp \
		../tools/qstring.cpp \
		../tools/qtextcodec.cpp \
		../tools/qtextstream.cpp \
		../tools/qutfcodec.cpp \
		../tools/qfile_unix.cpp
OBJECTS =	mocgen.o \
		qbuffer.o \
		qcollection.o \
		qcstring.o \
		qdatastream.o \
		qdatetime.o \
		qfile.o \
		qgarray.o \
		qgdict.o \
		qglist.o \
		qglobal.o \
		qgvector.o \
		qiodevice.o \
		qregexp.o \
		qstring.o \
		qtextcodec.o \
		qtextstream.o \
		qutfcodec.o \
		qfile_unix.o
INTERFACES =    
UICDECLS =      
UICIMPLS =      
SRCMOC	=	
OBJMOC	=	


####### Implicit rules

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

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

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

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

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

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

####### Build rules


all: $(DESTDIR)$(TARGET)

$(DESTDIR)$(TARGET): $(UICDECLS) $(OBJECTS) $(OBJMOC) $(SUBLIBS)
	$(SYSCONF_LINK) $(LFLAGS) -o $(DESTDIR)$(TARGET) $(OBJECTS) $(OBJMOC) $(LIBS)

moc: $(SRCMOC)

tmake:
	tmake moc.pro

clean:
	-rm -f $(OBJECTS) $(OBJMOC) $(SRCMOC) $(UICIMPLS) $(UICDECLS)
	-rm -f *~ core
	-rm -f allmoc.cpp

####### Extension Modules

listpromodules:
	@echo 

listallmodules:
	@echo 

listaddonpromodules:
	@echo 

listaddonentmodules:
	@echo 


REQUIRES=

####### Sub-libraries


###### Combined headers



####### Compile

mocgen.o: mocgen.cpp \
		../../include/qlist.h \
		../../include/qglist.h \
		../../include/qcollection.h \
		../../include/qglobal.h \
		../../include/qconfig.h \
		../../include/qfeatures.h \
		../../include/qasciidict.h \
		../../include/qgdict.h \
		../../include/qstring.h \
		../../include/qcstring.h \
		../../include/qarray.h \
		../../include/qgarray.h \
		../../include/qshared.h \
		../../include/qdict.h \
		../../include/qstrlist.h \
		../../include/qdatastream.h \
		../../include/qiodevice.h \
		../../include/qdatetime.h \
		../../include/qfile.h \
		../tools/qfiledefs_p.h \
		lex.yy.c
	$(CXX) -c $(CXXFLAGS) $(INCPATH) -o mocgen.o mocgen.cpp

qbuffer.o: ../tools/qbuffer.cpp \
		../../include/qbuffer.h \
		../../include/qiodevice.h \
		../../include/qglobal.h \
		../../include/qconfig.h \
		../../include/qfeatures.h \
		../../include/qcstring.h \
		../../include/qarray.h \
		../../include/qgarray.h \
		../../include/qshared.h \
		../../include/qstring.h
	$(CXX) -c $(CXXFLAGS) $(INCPATH) -o qbuffer.o ../tools/qbuffer.cpp

qcollection.o: ../tools/qcollection.cpp \
		../../include/qcollection.h \
		../../include/qglobal.h \
		../../include/qconfig.h \
		../../include/qfeatures.h
	$(CXX) -c $(CXXFLAGS) $(INCPATH) -o qcollection.o ../tools/qcollection.cpp

qcstring.o: ../tools/qcstring.cpp \
		../../include/qstring.h \
		../../include/qcstring.h \
		../../include/qarray.h \
		../../include/qgarray.h \
		../../include/qshared.h \
		../../include/qglobal.h \
		../../include/qconfig.h \
		../../include/qfeatures.h \
		../../include/qregexp.h \
		../../include/qdatastream.h \
		../../include/qiodevice.h
	$(CXX) -c $(CXXFLAGS) $(INCPATH) -o qcstring.o ../tools/qcstring.cpp

qdatastream.o: ../tools/qdatastream.cpp \
		../../include/qdatastream.h \
		../../include/qiodevice.h \
		../../include/qglobal.h \
		../../include/qconfig.h \
		../../include/qfeatures.h \
		../../include/qcstring.h \
		../../include/qarray.h \
		../../include/qgarray.h \
		../../include/qshared.h \
		../../include/qstring.h \
		../../include/qbuffer.h
	$(CXX) -c $(CXXFLAGS) $(INCPATH) -o qdatastream.o ../tools/qdatastream.cpp

qdatetime.o: ../tools/qdatetime.cpp \
		../../include/qdatetime.h \
		../../include/qstring.h \
		../../include/qcstring.h \
		../../include/qarray.h \
		../../include/qgarray.h \
		../../include/qshared.h \
		../../include/qglobal.h \
		../../include/qconfig.h \
		../../include/qfeatures.h \
		../../include/qdatastream.h \
		../../include/qiodevice.h
	$(CXX) -c $(CXXFLAGS) $(INCPATH) -o qdatetime.o ../tools/qdatetime.cpp

qfile.o: ../tools/qfile.cpp \
		../../include/qglobal.h \
		../../include/qconfig.h \
		../../include/qfeatures.h \
		../../include/qfile.h \
		../../include/qiodevice.h \
		../../include/qcstring.h \
		../../include/qarray.h \
		../../include/qgarray.h \
		../../include/qshared.h \
		../../include/qstring.h \
		../tools/qfiledefs_p.h
	$(CXX) -c $(CXXFLAGS) $(INCPATH) -o qfile.o ../tools/qfile.cpp

qgarray.o: ../tools/qgarray.cpp \
		../../include/qgarray.h \
		../../include/qshared.h \
		../../include/qglobal.h \
		../../include/qconfig.h \
		../../include/qfeatures.h \
		../../include/qstring.h \
		../../include/qcstring.h \
		../../include/qarray.h
	$(CXX) -c $(CXXFLAGS) $(INCPATH) -o qgarray.o ../tools/qgarray.cpp

qgdict.o: ../tools/qgdict.cpp \
		../../include/qgdict.h \
		../../include/qcollection.h \
		../../include/qglobal.h \
		../../include/qconfig.h \
		../../include/qfeatures.h \
		../../include/qstring.h \
		../../include/qcstring.h \
		../../include/qarray.h \
		../../include/qgarray.h \
		../../include/qshared.h \
		../../include/qlist.h \
		../../include/qglist.h \
		../../include/qdatastream.h \
		../../include/qiodevice.h
	$(CXX) -c $(CXXFLAGS) $(INCPATH) -o qgdict.o ../tools/qgdict.cpp

qglist.o: ../tools/qglist.cpp \
		../../include/qglist.h \
		../../include/qcollection.h \
		../../include/qglobal.h \
		../../include/qconfig.h \
		../../include/qfeatures.h \
		../../include/qgvector.h \
		../../include/qdatastream.h \
		../../include/qiodevice.h \
		../../include/qcstring.h \
		../../include/qarray.h \
		../../include/qgarray.h \
		../../include/qshared.h \
		../../include/qstring.h
	$(CXX) -c $(CXXFLAGS) $(INCPATH) -o qglist.o ../tools/qglist.cpp

qglobal.o: ../tools/qglobal.cpp \
		../../include/qglobal.h \
		../../include/qconfig.h \
		../../include/qfeatures.h \
		../../include/qasciidict.h \
		../../include/qgdict.h \
		../../include/qcollection.h \
		../../include/qstring.h \
		../../include/qcstring.h \
		../../include/qarray.h \
		../../include/qgarray.h \
		../../include/qshared.h
	$(CXX) -c $(CXXFLAGS) $(INCPATH) -o qglobal.o ../tools/qglobal.cpp

qgvector.o: ../tools/qgvector.cpp \
		../../include/qgvector.h \
		../../include/qcollection.h \
		../../include/qglobal.h \
		../../include/qconfig.h \
		../../include/qfeatures.h \
		../../include/qglist.h \
		../../include/qstring.h \
		../../include/qcstring.h \
		../../include/qarray.h \
		../../include/qgarray.h \
		../../include/qshared.h \
		../../include/qdatastream.h \
		../../include/qiodevice.h
	$(CXX) -c $(CXXFLAGS) $(INCPATH) -o qgvector.o ../tools/qgvector.cpp

qiodevice.o: ../tools/qiodevice.cpp \
		../../include/qiodevice.h \
		../../include/qglobal.h \
		../../include/qconfig.h \
		../../include/qfeatures.h \
		../../include/qcstring.h \
		../../include/qarray.h \
		../../include/qgarray.h \
		../../include/qshared.h
	$(CXX) -c $(CXXFLAGS) $(INCPATH) -o qiodevice.o ../tools/qiodevice.cpp

qregexp.o: ../tools/qregexp.cpp \
		../../include/qregexp.h \
		../../include/qstring.h \
		../../include/qcstring.h \
		../../include/qarray.h \
		../../include/qgarray.h \
		../../include/qshared.h \
		../../include/qglobal.h \
		../../include/qconfig.h \
		../../include/qfeatures.h
	$(CXX) -c $(CXXFLAGS) $(INCPATH) -o qregexp.o ../tools/qregexp.cpp

qstring.o: ../tools/qstring.cpp \
		../../include/qstring.h \
		../../include/qcstring.h \
		../../include/qarray.h \
		../../include/qgarray.h \
		../../include/qshared.h \
		../../include/qglobal.h \
		../../include/qconfig.h \
		../../include/qfeatures.h \
		../../include/qregexp.h \
		../../include/qdatastream.h \
		../../include/qiodevice.h \
		../../include/qtextcodec.h \
		../../include/qstack.h \
		../../include/qglist.h \
		../../include/qcollection.h
	$(CXX) -c $(CXXFLAGS) $(INCPATH) -o qstring.o ../tools/qstring.cpp

qtextcodec.o: ../tools/qtextcodec.cpp \
		../../include/qtextcodec.h \
		../../include/qstring.h \
		../../include/qcstring.h \
		../../include/qarray.h \
		../../include/qgarray.h \
		../../include/qshared.h \
		../../include/qglobal.h \
		../../include/qconfig.h \
		../../include/qfeatures.h \
		../../include/qlist.h \
		../../include/qglist.h \
		../../include/qcollection.h \
		../../include/qutfcodec.h \
		../../include/qgbkcodec.h \
		../../include/qeucjpcodec.h \
		../../include/qjpunicode.h \
		../../include/qjiscodec.h \
		../../include/qsjiscodec.h \
		../../include/qeuckrcodec.h \
		../../include/qbig5codec.h \
		../../include/qrtlcodec.h \
		../../include/qtsciicodec.h \
		../../include/qfile.h \
		../../include/qiodevice.h \
		../../include/qstrlist.h \
		../../include/qdatastream.h
	$(CXX) -c $(CXXFLAGS) $(INCPATH) -o qtextcodec.o ../tools/qtextcodec.cpp

qtextstream.o: ../tools/qtextstream.cpp \
		../../include/qtextstream.h \
		../../include/qiodevice.h \
		../../include/qglobal.h \
		../../include/qconfig.h \
		../../include/qfeatures.h \
		../../include/qcstring.h \
		../../include/qarray.h \
		../../include/qgarray.h \
		../../include/qshared.h \
		../../include/qstring.h \
		../../include/qtextcodec.h \
		../../include/qregexp.h \
		../../include/qbuffer.h \
		../../include/qfile.h
	$(CXX) -c $(CXXFLAGS) $(INCPATH) -o qtextstream.o ../tools/qtextstream.cpp

qutfcodec.o: ../tools/qutfcodec.cpp \
		../../include/qutfcodec.h \
		../../include/qtextcodec.h \
		../../include/qstring.h \
		../../include/qcstring.h \
		../../include/qarray.h \
		../../include/qgarray.h \
		../../include/qshared.h \
		../../include/qglobal.h \
		../../include/qconfig.h \
		../../include/qfeatures.h
	$(CXX) -c $(CXXFLAGS) $(INCPATH) -o qutfcodec.o ../tools/qutfcodec.cpp

qfile_unix.o: ../tools/qfile_unix.cpp \
		../../include/qglobal.h \
		../../include/qconfig.h \
		../../include/qfeatures.h \
		../../include/qfile.h \
		../../include/qiodevice.h \
		../../include/qcstring.h \
		../../include/qarray.h \
		../../include/qgarray.h \
		../../include/qshared.h \
		../../include/qstring.h \
		../tools/qfiledefs_p.h
	$(CXX) -c $(CXXFLAGS) $(INCPATH) -o qfile_unix.o ../tools/qfile_unix.cpp



####### Lex/yacc programs and options

LEX	=	flex
YACC	=	yacc -d

####### Lex/yacc files

LEXIN	=	moc.l
LEXOUT  =	lex.yy.c
YACCIN	=	moc.y
YACCOUT =	y.tab.c
YACCHDR =	y.tab.h
MOCGEN  =	mocgen.cpp

####### Process lex/yacc files

$(LEXOUT): $(LEXIN)
	$(LEX) $(LEXIN)

$(MOCGEN): $(YACCIN) $(LEXOUT)
	$(YACC) $(YACCIN)
	-rm -f $(MOCGEN)
	-mv $(YACCOUT) $(MOCGEN)
