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

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

CXX	=	$(SYSCONF_CXX) $(QT_CXX_MT)
CXXFLAGS=	$(SYSCONF_CXXFLAGS_QT) $(SYSCONF_CXXFLAGS)
CC	=	$(SYSCONF_CC) $(QT_C_MT)
CFLAGS	=	$(SYSCONF_CFLAGS)
INCPATH =	
LFLAGS	=	$(SYSCONF_LFLAGS_QT) $(SYSCONF_RPATH_QT) $(SYSCONF_LFLAGS) $(QT_LFLAGS_MT)
LIBS	=	$(SUBLIBS)  $(SYSCONF_LIBS_QTAPP) $(SYSCONF_LIBS_QT) $(SYSCONF_LIBS)
MOC	=	$(SYSCONF_MOC)
UIC	=	$(SYSCONF_UIC)

####### Target

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

####### Files

HEADERS =	cannon.h \
		gamebrd.h \
		lcdrange.h
SOURCES =	cannon.cpp \
		gamebrd.cpp \
		lcdrange.cpp \
		main.cpp
OBJECTS =	cannon.o \
		gamebrd.o \
		lcdrange.o \
		main.o
INTERFACES =    
UICDECLS =      
UICIMPLS =      
SRCMOC	=	moc_cannon.cpp \
		moc_gamebrd.cpp \
		moc_lcdrange.cpp
OBJMOC	=	moc_cannon.o \
		moc_gamebrd.o \
		moc_lcdrange.o


####### 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 t14.pro

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

####### Extension Modules

listpromodules:
	@echo 

listallmodules:
	@echo 

listaddonpromodules:
	@echo 

listaddonentmodules:
	@echo 


REQUIRES=

####### Sub-libraries


###### Combined headers



####### Compile

cannon.o: cannon.cpp \
		cannon.h

gamebrd.o: gamebrd.cpp \
		gamebrd.h \
		lcdrange.h \
		cannon.h

lcdrange.o: lcdrange.cpp \
		lcdrange.h

main.o: main.cpp \
		gamebrd.h \
		lcdrange.h \
		cannon.h

moc_cannon.o: moc_cannon.cpp \
		cannon.h

moc_gamebrd.o: moc_gamebrd.cpp \
		gamebrd.h \
		lcdrange.h \
		cannon.h

moc_lcdrange.o: moc_lcdrange.cpp \
		lcdrange.h

moc_cannon.cpp: cannon.h
	$(MOC) cannon.h -o moc_cannon.cpp

moc_gamebrd.cpp: gamebrd.h
	$(MOC) gamebrd.h -o moc_gamebrd.cpp

moc_lcdrange.cpp: lcdrange.h
	$(MOC) lcdrange.h -o moc_lcdrange.cpp


