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

SYSLIB = @top_srcdir@/lib/libqsys.a
SYSLIBP = @top_srcdir@/lib/libqsys_p.a
SYSLIBV = @top_srcdir@/lib/libqsys_v.a
SYSLIBB = @top_srcdir@/lib/libqsys_b.a

#
# buildings
#
default: $(SYSLIB) @target_cpu@/Makefile
	cd @target_cpu@; $(MAKE) -$(MAKEFLAGS) $@
profile: $(SYSLIBP) @target_cpu@/Makefile
	cd @target_cpu@; $(MAKE) -$(MAKEFLAGS) $@
coverage: $(SYSLIBV) @target_cpu@/Makefile
	cd @target_cpu@; $(MAKE) -$(MAKEFLAGS) $@
branch: $(SYSLIBB) @target_cpu@/Makefile
	cd @target_cpu@; $(MAKE) -$(MAKEFLAGS) $@
	-mv -f $(SYSLIBB) $(SYSLIB)
all: default profile coverage

#
# cleanups
# 
clean: @target_cpu@/Makefile
	-rm -f $(SYSLIB) $(SYSOBJ)
	cd @target_cpu@; $(MAKE) -$(MAKEFLAGS) $@
cleanprofile: @target_cpu@/Makefile
	-rm -f $(SYSLIBP) $(SYSOBJP)
	cd @target_cpu@; $(MAKE) -$(MAKEFLAGS) $@
cleancoverage: @target_cpu@/Makefile
	-rm -f $(SYSLIBV) $(SYSOBJV) $(SYSOBJBB)
	cd @target_cpu@; $(MAKE) -$(MAKEFLAGS) $@
cleanbranch: @target_cpu@/Makefile
	-rm -f $(SYSLIBB) $(SYSOBJB)
	cd @target_cpu@; $(MAKE) -$(MAKEFLAGS) $@
cleanall: clean cleanprofile cleancoverage cleanbranch

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

backup: Makefile
	cp Makefile Makefile.bak
	cp generic.h generic.bak
	cd @target_cpu@; $(MAKE) -$(MAKEFLAGS) $@
restore: Makefile.bak
	cp Makefile.bak Makefile
	rm Makefile.bak
	cp generic.bak generic.h
	rm generic.bak
	cd @target_cpu@; $(MAKE) -$(MAKEFLAGS) $@

analyse:
	for i in $(SYSSRC) ; do \
	  gcov -f -l -b $$i >$$i.branch; \
	done
analyseclean:
	-rm -f $(DOBJDA) $(DOBJBR) *.gcov

#
# rules
#
include	@top_srcdir@/src/Makefile-rules

#
# sources/objects/libraries
#
SYSSRC = generic.c

SYSOBJ = $(SYSSRC:.c=.o)
SYSOBJP = $(SYSSRC:.c=_p.o)
SYSOBJV = $(SYSSRC:.c=.v)
SYSOBJB = $(SYSSRC:.c=.b)
SYSOBJSYSA = $(SYSSRC:.c=.da)
SYSOBJBR = $(SYSSRC:.c=.branch)
SYSOBJBB = $(SYSSRC:.c=.b*)

@top_srcdir@/lib/libqsys.a: $(SYSOBJ)
	$(AR) rcv $@ $?
	$(RAN) $@
@top_srcdir@/lib/libqsys_p.a: $(SYSOBJP)
	$(AR) rcv $@ $?
	$(RAN) $@
@top_srcdir@/lib/libqsys_v.a: $(SYSOBJV)
	$(AR) rcv $@ $?
	$(RAN) $@
@top_srcdir@/lib/libqsys_b.a: $(SYSOBJB)
	$(AR) rcv $@ $?
	$(RAN) $@

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

generic.h: @target_cpu@/@target_cpu@.h @target_cpu@/@target_os@/@target_os@.h
@target_cpu@/@target_cpu@.h:
	touch $@
@target_cpu@/@target_os@/@target_os@.h:
	touch $@

# DO NOT DELETE
