#############################################################################
# Makefile for building metrics
# Generated by tmake at 13:14, 2011/08/14
#     Project: metrics
#    Template: app.t
#############################################################################

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

CC	=	cc
CXX	=	c++
CFLAGS	=	-pipe -Wall -W -g -fstack-protector
CXXFLAGS=	-pipe -D__FreeBSD__=6 -Wall -W -g -fstack-protector
INCPATH	=	-I../../../../qtools -I../../include
LINK	=	c++
LFLAGS	=	-Wl,-search_paths_first
LIBS	=	-L../../../../lib -L../../lib -ldoxmlparser -lqtools -liconv -framework CoreServices
MOC	=	/usr/bin/moc

TAR	=	tar -cf
GZIP	=	gzip -9f

####### Files

HEADERS =	
SOURCES =	main.cpp
OBJECTS =	obj/main.o
SRCMOC	=	
OBJMOC	=	
DIST	=	
TARGET	=	metrics

####### 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: $(TARGET)

$(TARGET): $(OBJECTS) $(OBJMOC) ../../lib/libdoxmlparser.a
	$(LINK) $(LFLAGS) -o $(TARGET) $(OBJECTS) $(OBJMOC) $(LIBS)

moc: $(SRCMOC)

tmake:
	tmake metrics.pro

dist:
	$(TAR) metrics.tar metrics.pro $(SOURCES) $(HEADERS) $(DIST)
	$(GZIP) metrics.tar

clean:
	-rm -f $(OBJECTS) $(OBJMOC) $(SRCMOC) $(TARGET)
	-rm -f *~ core

####### Compile

obj/main.o: main.cpp \
		../../include/doxmlintf.h
	$(CXX) -c $(CXXFLAGS) $(INCPATH) -o obj/main.o main.cpp

