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

QDLIB = @top_srcdir@/lib/libqdisplay.a
QDLIBP = @top_srcdir@/lib/libqdisplay_p.a
QDLIBV = @top_srcdir@/lib/libqdisplay_v.a
QDLIBB = @top_srcdir@/lib/libqdisplay_b.a

#
# buildings
#
default: $(QDLIB)						# build the default useable library
profile: $(QDLIBP)						# build the library with later profiling capabilities
coverage: $(QDLIBV)						# build the library to analyse code-/execution-streams
branch: $(QDLIBB)						# rebuild the library after branches have been analysed
	-mv -f $(QDLIBB) $(QDLIB)
all: default profile coverage					# build the complete package

#
# cleanups
# 
clean:								# clean the default library
	-rm -f $(QDLIB) $(QDOBJ)
cleanprofile:							# clean the profile library
	-rm -f $(QDLIBP) $(QDOBJP)
cleancoverage:							# clean the analyse library
	-rm -f $(QDLIBV) $(QDOBJV) $(QDOBJBB)
cleanbranch:							# clean the post-analysed branch-optimized library
	-rm -f $(QDLIB) $(QDOBJ)
cleanall: clean cleancoverage cleanprofile cleanbranch		# clean everything

#
# 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

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

#
# rules
#
include	@top_srcdir@/src/Makefile-rules
#DEFS += -DNOASM
#ASFLAGS += -DNOASM

#
# sources/objects/libraries
#
QDSRC =	3d.c cache.c clippoly.c display.c draw.c render.c \
	surface.c tables.c tbsp.c

QDOBJ = $(QDSRC:.c=.o)
QDOBJP = $(QDSRC:.c=_p.o)
QDOBJV = $(QDSRC:.c=.v)
QDOBJB = $(QDSRC:.c=.b)
QDOBJDA = $(QDSRC:.c=.da)
QDOBJBR = $(QDSRC:.c=.branch)
QDOBJBB = $(QDSRC:.c=.b*)

@top_srcdir@/lib/libqdisplay.a: $(QDOBJ)
	$(AR) rcv $@ $?
	$(RAN) $@
@top_srcdir@/lib/libqdisplay_p.a: $(QDOBJP)
	$(AR) rcv $@ $?
	$(RAN) $@
@top_srcdir@/lib/libqdisplay_v.a: $(QDOBJV)
	$(AR) rcv $@ $?
	$(RAN) $@
@top_srcdir@/lib/libqdisplay_b.a: $(QDOBJB)
	$(AR) rcv $@ $?
	$(RAN) $@

#
# dependencies
#
depend:
	@MKD@ -m $(INCL) $(QDSRC)

# DO NOT DELETE
