#
# specific stuff for mingw g++ make
#
CXX	    =	g++
CFLAGS	    =	-c -o$@ -O \
		-I. -Igenerators -Igenerators\unix -Igenerators\win32 -Igenerators\mac -I..\include -I..\src\tools \
		-I..\mkspecs\win32-g++ \
		-DUNICODE -DTQT_NO_TEXTCODEC -DQT_LITE_COMPONENT -DQT_NODLL -DTQT_NO_STL -DTQT_NO_COMPRESS
CXXFLAGS    =   $(CFLAGS)
LFLAGS	    =	
LIBS	    = -lole32 -luuid 
LINKQMAKE   =	g++ $(LFLAGS) -o tqmake.exe $(OBJS) $(QTOBJS) $(LIBS)
ADDCLEAN    =	


#tqmake code
OBJS=project.o main.o makefile.o unixmake.o unixmake2.o borland_bmake.o mingw_make.o \
	msvc_nmake.o msvc_dsp.o msvc_vcproj.o option.o winmakefile.o projectgenerator.o \
 	metrowerks_xml.o pbuilder_pbx.o msvc_objectmodel.o property.o meta.o qtmd5.o

#qt code
QTOBJS=qstring.o quuid.o qtextstream.o qiodevice.o qglobal.o qgdict.o qcstring.o qdatastream.o \
 	qgarray.o qbuffer.o qglist.o qptrcollection.o qfile.o qfile_win.o qregexp.o qgvector.o \
 	qgcache.o qbitarray.o qdir.o qfileinfo_win.o qdir_win.o qfileinfo.o qdatetime.o \
 	qstringlist.o qmap.o qlibrary.o qlibrary_win.o qconfig.o qsettings.o qsettings_win.o qunicodetables.o \
	qlocale.o



tqmake.exe: $(OBJS) $(QTOBJS)
	$(LINKQMAKE)
	-copy tqmake.exe ..\bin\tqmake.exe

clean::
	-del $(OBJS) $(QTOBJS) $(ADDCLEAN)

distclean:: clean
	-del tqmake

.c.o:
	$(CXX) $(CFLAGS) $<

.cpp.o:
	$(CXX) $(CXXFLAGS) $<

qconfig.o: ..\src\tools\qconfig.cpp
	$(CXX) $(CXXFLAGS) ..\src\tools\qconfig.cpp

qlibrary.o: ..\src\tools\qlibrary.cpp
	$(CXX) $(CXXFLAGS) ..\src\tools\qlibrary.cpp

qlibrary_win.o: ..\src\tools\qlibrary_win.cpp
	$(CXX) $(CXXFLAGS) ..\src\tools\qlibrary_win.cpp

qtextstream.o: ..\src\tools\qtextstream.cpp
	$(CXX) $(CXXFLAGS) ..\src\tools\qtextstream.cpp

qiodevice.o: ..\src\tools\qiodevice.cpp
	$(CXX) $(CXXFLAGS) ..\src\tools\qiodevice.cpp

qglobal.o: ..\src\tools\qglobal.cpp
	$(CXX) $(CXXFLAGS) ..\src\tools\qglobal.cpp

qgdict.o: ..\src\tools\qgdict.cpp
	$(CXX) $(CXXFLAGS) ..\src\tools\qgdict.cpp

qcstring.o: ..\src\tools\qcstring.cpp
	$(CXX) $(CXXFLAGS) ..\src\tools\qcstring.cpp

qstring.o: ..\src\tools\qstring.cpp
	$(CXX) $(CXXFLAGS) ..\src\tools\qstring.cpp

qlocale.o: ..\src\tools\qlocale.cpp
	$(CXX) $(CXXFLAGS) ..\src\tools\qlocale.cpp

quuid.o: ..\src\tools\quuid.cpp
	$(CXX) $(CXXFLAGS) ..\src\tools\quuid.cpp

qdatastream.o: ..\src\tools\qdatastream.cpp
	$(CXX) $(CXXFLAGS) ..\src\tools\qdatastream.cpp

qgarray.o: ..\src\tools\qgarray.cpp
	$(CXX) $(CXXFLAGS) ..\src\tools\qgarray.cpp

qbuffer.o: ..\src\tools\qbuffer.cpp
	$(CXX) $(CXXFLAGS) ..\src\tools\qbuffer.cpp

qglist.o: ..\src\tools\qglist.cpp
	$(CXX) $(CXXFLAGS) ..\src\tools\qglist.cpp

qptrcollection.o: ..\src\tools\qptrcollection.cpp
	$(CXX) $(CXXFLAGS) ..\src\tools\qptrcollection.cpp

qfile.o: ..\src\tools\qfile.cpp
	$(CXX) $(CXXFLAGS) ..\src\tools\qfile.cpp

qfile_win.o: ..\src\tools\qfile_win.cpp
	$(CXX) $(CXXFLAGS) ..\src\tools\qfile_win.cpp

qtextcodec.o: ..\src\codecs\qtextcodec.cpp
	$(CXX) $(CXXFLAGS) ..\src\codecs\qtextcodec.cpp

qregexp.o: ..\src\tools\qregexp.cpp
	$(CXX) $(CXXFLAGS) ..\src\tools\qregexp.cpp

qgvector.o: ..\src\tools\qgvector.cpp
	$(CXX) $(CXXFLAGS) ..\src\tools\qgvector.cpp

qgcache.o: ..\src\tools\qgcache.cpp
	$(CXX) $(CXXFLAGS) ..\src\tools\qgcache.cpp

qbitarray.o: ..\src\tools\qbitarray.cpp
	$(CXX) $(CXXFLAGS) ..\src\tools\qbitarray.cpp

qdir.o: ..\src\tools\qdir.cpp
	$(CXX) $(CXXFLAGS) ..\src\tools\qdir.cpp

qsettings.o: ..\src\tools\qsettings.cpp
	$(CXX) $(CXXFLAGS) ..\src\tools\qsettings.cpp

qsettings_win.o: ..\src\tools\qsettings_win.cpp
	$(CXX) $(CXXFLAGS) ..\src\tools\qsettings_win.cpp

qfileinfo_win.o: ..\src\tools\qfileinfo_win.cpp
	$(CXX) $(CXXFLAGS) ..\src\tools\qfileinfo_win.cpp

qdir_win.o: ..\src\tools\qdir_win.cpp
	$(CXX) $(CXXFLAGS) ..\src\tools\qdir_win.cpp

qfileinfo.o: ..\src\tools\qfileinfo.cpp
	$(CXX) $(CXXFLAGS) ..\src\tools\qfileinfo.cpp

qdatetime.o: ..\src\tools\qdatetime.cpp
	$(CXX) $(CXXFLAGS) ..\src\tools\qdatetime.cpp

qstringlist.o: ..\src\tools\qstringlist.cpp
	$(CXX) $(CXXFLAGS) ..\src\tools\qstringlist.cpp

qmap.o: ..\src\tools\qmap.cpp
	$(CXX) $(CXXFLAGS) ..\src\tools\qmap.cpp

qunicodetables.o: ..\src\tools\qunicodetables.cpp
	$(CXX) $(CXXFLAGS) ..\src\tools\qunicodetables.cpp

makefile.o: generators\makefile.cpp
	$(CXX) $(CXXFLAGS) generators\makefile.cpp

unixmake.o: generators\unix\unixmake.cpp
	$(CXX) $(CXXFLAGS) generators\unix\unixmake.cpp

unixmake2.o: generators\unix\unixmake2.cpp
	$(CXX) $(CXXFLAGS) generators\unix\unixmake2.cpp

winmakefile.o: generators/win32/winmakefile.cpp
	$(CXX) $(CXXFLAGS) generators/win32/winmakefile.cpp

borland_bmake.o: generators/win32/borland_bmake.cpp
	$(CXX) $(CXXFLAGS) generators/win32/borland_bmake.cpp

mingw_make.o: generators/win32/mingw_make.cpp
	$(CXX) $(CXXFLAGS) generators/win32/mingw_make.cpp

msvc_nmake.o: generators/win32/msvc_nmake.cpp
	$(CXX) $(CXXFLAGS) generators/win32/msvc_nmake.cpp

msvc_dsp.o: generators/win32/msvc_dsp.cpp
	$(CXX) $(CXXFLAGS) generators/win32/msvc_dsp.cpp

msvc_vcproj.o: generators/win32/msvc_vcproj.cpp
	$(CXX) $(CXXFLAGS) generators/win32/msvc_vcproj.cpp

msvc_objectmodel.o: generators/win32/msvc_objectmodel.cpp
	$(CXX) $(CXXFLAGS) generators/win32/msvc_objectmodel.cpp

qtmd5.o: qtmd5.cpp
	$(CXX) $(CXXFLAGS) qtmd5.cpp

project.o: project.cpp project.h option.h
	$(CXX) $(CXXFLAGS) project.cpp

meta.o: meta.cpp project.h option.h
	$(CXX) $(CXXFLAGS) meta.cpp

property.o: property.cpp property.h option.h
	$(CXX) $(CXXFLAGS) property.cpp
	
main.o: main.cpp project.h
	$(CXX) $(CXXFLAGS) main.cpp

option.o: option.cpp option.h
	$(CXX) $(CXXFLAGS) option.cpp

projectgenerator.o: generators/projectgenerator.cpp
	$(CXX) $(CXXFLAGS) generators/projectgenerator.cpp

metrowerks_xml.o: generators/mac/metrowerks_xml.cpp
	$(CXX) $(CXXFLAGS) generators/mac/metrowerks_xml.cpp

pbuilder_pbx.o: generators/mac/pbuilder_pbx.cpp
	$(CXX) $(CXXFLAGS) generators/mac/pbuilder_pbx.cpp
