# Generated automatically from Makefile.in by configure.
# MakeFile for QuakeTools

QTLIB = @top_srcdir@/lib/libqtools.a
QTLIBP = @top_srcdir@/lib/libqtools_p.a
QTLIBV = @top_srcdir@/lib/libqtools_v.a

QTPACK = @top_srcdir@/bin/qtools @top_srcdir@/bin/qbsp @top_srcdir@/bin/light \
	@top_srcdir@/bin/qbsp @top_srcdir@/bin/vis @top_srcdir@/bin/qcc
QTPACKP = $(addsuffix P, $(QTPACK))
QTPACKV = $(addsuffix V, $(QTPACK))
QTSRC = $(notdir $(addsuffix .c, $(QTPACK)))
QTOBJ = $(notdir $(addsuffix .o, $(QTPACK)))
QTOBJP = $(notdir $(addsuffix _p.o, $(QTPACK)))
QTOBJV = $(notdir $(addsuffix .v, $(QTPACK)))
QTOBJDA = $(notdir $(addsuffix .da, $(QTPACK)))
QTOBJBB = $(notdir $(addsuffix .b*, $(QTPACK)))

#
# buildings
#
default: $(QTPACK)
profile: $(QTPACKP)
coverage: $(QTPACKV)
all: default profile coverage
test: @top_srcdir@/bin/ppmdiff

#
# cleanups
# 
clean:
	-rm -f $(QTPACK) $(QTOBJ)
cleanprofile:
	-rm -f $(QTPACKP) $(QTOBJP)
cleancoverage:
	-rm -f $(QTPACKV) $(QTOBJV) $(QTOBJBB)
cleanall: clean cleanprofile cleancoverage

#
# dists
#
distclean: cleanall						# clean even the configured files
	-rm -f Makefile

backup: Makefile
	cp Makefile Makefile.bak
restore: Makefile.bak
	cp Makefile.bak Makefile
	rm Makefile.bak

#
# installations
#
install: default
	@INSTALL@ $(QTPACK) @bindir@
installprofile: profile
	@INSTALL@ $(QTPACKP) @bindir@
installcoverage: coverage
	@INSTALL@ $(QTPACKV) @bindir@
installall: install installprofile installcoverage

#
# debugging/analysing
#
analyse:
	for i in $(QTSRC) ; do \
	  gcov -f -l -b $$i >$$i.branch; \
	done
analyseclean:
	-rm -f $(QTOBJDA) *.branch *.gcov

#
# rules
#
include	@top_srcdir@/src/Makefile-rules
INCL += -L@top_srcdir@/lib -I@top_srcdir@/src/include

#
# sources/objects/libraries
#
@top_srcdir@/bin/qtools: qtools.o $(QTLIB)
	$(CC) $(LDFLAGS) -o $@ $< -lqbuild -lqsys -lqtools -lqdisplay -lqbuild -lqsys -lqtools @LIBS@
@top_srcdir@/bin/qtoolsP: qtools_p.o $(QTLIBP)
	$(CC) $(LDPFLAGS) -o $@ $< -lqbuild_p -lqsys_p -lqtools_p -lqdisplay_p -lqbuild_p -lqsys_p -lqtools_p @LIBS@ @DEBUGLIBS@
@top_srcdir@/bin/qtoolsV: qtools.v $(QTLIBV) 
	$(CC) $(LDVFLAGS) -o $@ $< -lqbuild -lqsys -lqtools -lqdisplay -lqbuild -lqsys -lqtools @LIBS@
@top_srcdir@/bin/qbsp: qbsp.o $(QTLIB) 
	$(CC) $(LDFLAGS) -o $@ $< -lqbuild -lqsys -lqtools -lqdisplay -lqbuild -lqsys -lqtools @LIBS@
@top_srcdir@/bin/qbspP: qbsp_p.o $(QTLIBP) 
	$(CC) $(LDPFLAGS) -o $@ $< -lqbuild_p -lqsys_p -lqtools_p -lqdisplay_p -lqbuild_p -lqsys_p -lqtools_p @LIBS@ @DEBUGLIBS@
@top_srcdir@/bin/qbspV: qbsp.v $(QTLIBV) 
	$(CC) $(LDVFLAGS) -o $@ $< -lqbuild -lqsys -lqtools -lqdisplay -lqbuild -lqsys -lqtools @LIBS@
@top_srcdir@/bin/light: light.o $(QTLIB)
	$(CC) $(LDFLAGS) -o $@ $< -lqbuild -lqsys -lqtools -lqdisplay -lqbuild -lqsys -lqtools @LIBS@
@top_srcdir@/bin/lightP: light_p.o $(QTLIBP)
	$(CC) $(LDPFLAGS) -o $@ $< -lqbuild_p -lqsys_p -lqtools_p -lqdisplay_p -lqbuild_p -lqsys_p -lqtools_p @LIBS@ @DEBUGLIBS@
@top_srcdir@/bin/lightV: light.v $(QTLIBV)
	$(CC) $(LDVFLAGS) -o $@ $< -lqbuild -lqsys -lqtools -lqdisplay -lqbuild -lqsys -lqtools @LIBS@
@top_srcdir@/bin/vis: vis.o $(QTLIB)
	$(CC) $(LDFLAGS) -o $@ $< -lqbuild -lqsys -lqtools -lqdisplay -lqbuild -lqsys -lqtools @LIBS@
@top_srcdir@/bin/visP: vis_p.o $(QTLIBP)
	$(CC) $(LDPFLAGS) -o $@ $< -lqbuild_p -lqsys_p -lqtools_p -lqdisplay_p -lqbuild_p -lqsys_p -lqtools_p @LIBS@ @DEBUGLIBS@
@top_srcdir@/bin/visV: vis.v $(QTLIBV)
	$(CC) $(LDVFLAGS) -o $@ $< -lqbuild -lqsys -lqtools -lqdisplay -lqbuild -lqsys -lqtools @LIBS@
@top_srcdir@/bin/qcc: qcc.o $(QTLIB)
	$(CC) $(LDFLAGS) -o $@ $< -lqbuild -lqsys -lqtools -lqbuild -lqsys -lqtools
@top_srcdir@/bin/qccP: qcc_p.o $(QTLIBP)
	$(CC) $(LDPFLAGS) -o $@ $< -lqbuild_p -lqsys_p -lqtools_p -lqdisplay_p -lqbuild_p -lqsys_p -lqtools_p @DEBUGLIBS@
@top_srcdir@/bin/qccV: qcc.v $(QTLIBV)
	$(CC) $(LDVFLAGS) -o $@ $< -lqbuild -lqsys -lqtools -lqbuild -lqsys -lqtools
@top_srcdir@/bin/ppmdiff: ppmdiff.c
	$(CC) $(CFLAGS) -o $@ ppmdiff.c

#
# dependencies
#
depend:
	@MKD@ -m $(INCL) qtools.c qbsp.c light.c qcc.c vis.c ppmdiff.c

# DO NOT DELETE
