#############################################################################
# Makefile for building xmlparse
# Generated by tmake at 17:46, 2012/02/24
#     Project: xmlparse
#    Template: app.t
#############################################################################

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

CC	=	cc
CXX	=	c++
CFLAGS	=	-pipe -Wall -W -g -fstack-protector
CXXFLAGS=	-pipe -D__FreeBSD__=6 -DYY_TYPEDEF_YY_SIZE_T -Dyy_size_t=int -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 =	../objects/main.o
SRCMOC	=	
OBJMOC	=	
DIST	=	
TARGET	=	xmlparse

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

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

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

####### Compile

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

