#############################################################################
# Makefile for building testaps
# Generated by tmake at 03:04, 1999/11/15
#     Project: testaps.mk
#    Template: app
#############################################################################

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

CC	=	gcc
CXX	=	g++
CFLAGS	=	-static -pipe -Wall -W -O2 -DNO_DEBUG -g
CXXFLAGS=	-static -pipe -Wall -W -O2 -DNO_DEBUG -g
INCPATH	=	-I$(QTDIR)/include -I../include
LINK	=	g++
LFLAGS	=	-g
LIBS	=	-L/usr/local/lib -laps -L$(QTDIR)/lib -lqt -L/usr/X11R6/lib -lm -lX11 -lXext
MOC	=	$(QTDIR)/bin/moc

TAR	=	tar -cf
GZIP	=	gzip -9f

####### Files

HEADERS =	testaps.h
SOURCES =	main.C \
		testaps.C
OBJECTS =	main.o \
		testaps.o
SRCMOC	=	moc_testaps.cpp
OBJMOC	=	moc_testaps.o
DIST	=	
TARGET	=	testaps

####### 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 -DDEBUG $(CXXFLAGS) $(INCPATH) -o $@ $<

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

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

####### Build rules

all: $(TARGET)

$(TARGET): $(OBJECTS) $(OBJMOC) 
	$(LINK) $(LFLAGS) -o $(TARGET) $(OBJECTS) $(OBJMOC) $(LIBS)

moc: $(SRCMOC)

tmake: Makefile

Makefile: testaps.mk
	tmake testaps.mk -o Makefile

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

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

####### Compile

main.o: main.C \
		testaps.h

testaps.o: testaps.C \
		testaps.h \
		apsdefs.h

moc_testaps.o: moc_testaps.cpp \
		testaps.h

moc_testaps.cpp: testaps.h
	$(MOC) testaps.h -o moc_testaps.cpp

