# Generated automatically from Makefile.in by configure.
##
##  Makefile.in -- Pth Makefile
##
##  Copyright (c) 1999 Ralf S. Engelschall <rse@engelschall.com>
##
##  This file is part of GNU Pth, a non-preemptive thread scheduling
##  library which can be found at http://www.gnu.org/software/pth/.
##
##  This library is free software; you can redistribute it and/or
##  modify it under the terms of the GNU Lesser General Public
##  License as published by the Free Software Foundation; either
##  version 2 of the License, or (at your option) any later version.
##
##  This library is distributed in the hope that it will be useful,
##  but WITHOUT ANY WARRANTY; without even the implied warranty of
##  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
##  Lesser General Public License for more details.
##
##  You should have received a copy of the GNU Lesser General Public
##  License along with this library; if not, write to the Free Software
##  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
##  USA, or contact Ralf S. Engelschall <rse@engelschall.com>.
##


##
##  ____ PATH DEFINITIONS ___________________________________________
##

srcdir      = .
top_srcdir  = .

S           = 
C           = ./

prefix      = /homes/kaf24/scratch/ix86-libs
exec_prefix = ${prefix}
bindir      = ${exec_prefix}/bin
libdir      = ${exec_prefix}/lib
includedir  = ${prefix}/include
mandir      = ${prefix}/man

##
##  ____ TOOL DEFINITIONS ___________________________________________
##

SHELL       = /bin/sh
DEBUG       = -g
CC          = gcc
CPPFLAGS    =  -I.
CFLAGS      = $(DEBUG) -O2 -pipe
LDFLAGS     = -L.
LIBS        = -lnsl 
SHTOOL      = $(srcdir)/shtool
LIBTOOL     = $(C)libtool
RM          = rm -f
RMDIR       = rmdir
TRUE        = true
CAT         = cat
CP          = cp
LS          = ls
SED         = sed
ECHO        = echo
GZIP        = gzip
GTAR        = gtar
TARDY       = tardy
POD2MAN     = pod2man
GDB         = gdb

##
##  ____ TARGET DEFINITIONS _________________________________________
##

BATCH            = no
PLATFORM         = i686-pc-linux-gnu
PTH_MCTX_ID      = sjlj/ssjlj/none
PTH_STACK_GROWTH = down

TARGET_ALL  = $(TARGET_PREQ) $(TARGET_LIBS) $(TARGET_MANS)

TARGET_PREQ = pth_p.h
TARGET_LIBS = libpth.la 
TARGET_MANS = $(S)pth-config.1 $(S)pth.3  


#   object files for library generation
#   (order is just aesthically important)
LOBJS = pth_debug.lo pth_ring.lo pth_pqueue.lo pth_time.lo pth_errno.lo \
        pth_mctx.lo pth_tcb.lo pth_sched.lo pth_attr.lo pth_lib.lo \
	pth_event.lo pth_data.lo pth_clean.lo pth_cancel.lo pth_msg.lo \
	pth_sync.lo pth_fork.lo pth_util.lo pth_high.lo pth_syscall.lo \
	pth_ext.lo pth_compat.lo pth_setjmp.lo pth_rtsig.lo

#   source files for header generation 
#   (order is important and has to follow dependencies in pth_p.h)
HSRCS = $(S)pth_compat.c $(S)pth_debug.c $(S)pth_syscall.c $(S)pth_errno.c $(S)pth_ring.c $(S)pth_mctx.c \
        $(S)pth_clean.c $(S)pth_time.c $(S)pth_tcb.c $(S)pth_util.c $(S)pth_pqueue.c $(S)pth_event.c \
        $(S)pth_sched.c $(S)pth_data.c $(S)pth_msg.c $(S)pth_cancel.c $(S)pth_sync.c $(S)pth_attr.c $(S)pth_lib.c \
        $(S)pth_fork.c $(S)pth_high.c $(S)pth_ext.c $(S)pth_rtsig.c

##
##  ____ UTILITY DEFINITIONS _________________________________________
##

_VERSION_FILE = \
	$(S)pth_vers.c

_VERSION = \
	$(SHTOOL) version -l c -n 'GNU Pth' -p PTH $$OPT $(_VERSION_FILE);\
	V=`$(SHTOOL) version -l c -d long $(_VERSION_FILE)`;\
	$(SED) -e "s/Version .*(.*)/Version $$V/g" <README >README.n && mv README.n README

_TARBALL = \
	$(SHTOOL) tarball -o $${NAME}.tar.gz -d $${NAME} -u gnu -g pth \
	                  -e 'CVS,\.cvsignore,\.[ao],^\.' -c 'gzip --best' .; \
	$(LS) -l $${NAME}.tar.gz

_MANPAGE = \
	V1=`$(SHTOOL) version -l c -d short $(_VERSION_FILE)`; \
	V2=`$(SHTOOL) version -l c -d long $(_VERSION_FILE)`; \
	D=`$(SHTOOL) version -l c -d long $(_VERSION_FILE) |\
	   $(SED) -e 's;.*(;;' -e 's;).*;;'`; \
	$(POD2MAN) --section=$${SEC} --center="$${ONELINE}" \
	           --release="$$D" --date="$${NAME} $$V1" $(S)$${BASENAME}.pod |\
	$(SED) -e "s;PTH_VERSION_STR;$$V2;" >$${BASENAME}.$${SEC}

_DEBUG = \
	core=""; \
	if [ -f $$TEST.core ]; then \
	    core="$$TEST.core"; \
    elif [ -f core ]; then \
		core="core"; \
    fi; \
	$(LIBTOOL) --mode=execute $(GDB) $$TEST $$core

##
##  ____ END USER TARGETS ____________________________________________
##

#   be aware of libtool when building the objects
.SUFFIXES:
.SUFFIXES: .c .o .lo
.c.o:
	$(CC) -c $(CPPFLAGS) $(CFLAGS) $<
.c.lo:
	$(LIBTOOL) --mode=compile --quiet $(CC) -c $(CPPFLAGS) $(CFLAGS) $<
.S.lo:  
	$(LIBTOOL) --mode=compile --quiet $(CC) -c $(CPPFLAGS) $(CFLAGS) $<

#   the default target
all: all-normal
all-normal: $(TARGET_ALL)
	@touch .done-all
	@$(MAKE) $(MFLAGS) what-next
all-for-install: $(TARGET_ALL)
	@touch .done-all

pth_rtsig.lo: pth_rtsig.c
	mkdir -p .libs
	$(CC) -O2 -I. $(DEBUG) -c pth_rtsig.c -o .libs/pth_rtsig.lo
	$(CC) -O2 -I. $(DEBUG) -c pth_rtsig.c -o pth_rtsig.o
	mv -f .libs/pth_rtsig.lo pth_rtsig.lo

pth_setjmp.lo: pth_setjmp.S
	mkdir -p .libs
	$(CC) -O2 -I. -c pth_setjmp.S -o .libs/pth_setjmp.lo
	$(CC) -O2 -I. -c pth_setjmp.S -o pth_setjmp.o
	mv -f .libs/pth_setjmp.lo pth_setjmp.lo

#   build the private shared header file
#pth_p.h: $(S)pth_p.h.in
#	$(SHTOOL) scpp -o pth_p.h -t $(S)pth_p.h.in -Dcpp -Cintern -M '==#==' $(HSRCS)

#   build the static and possibly shared libraries
libpth.la: $(LOBJS)
	$(LIBTOOL) --mode=link --quiet $(CC) $(DEBUG) -o libpth.la $(LOBJS) \
	-rpath $(libdir) -version-info `$(SHTOOL) version -l c -d libtool $(_VERSION_FILE)`
libpthread.la: pthread.lo $(LOBJS)
	$(LIBTOOL) --mode=link --quiet $(CC) -o libpthread.la pthread.lo $(LOBJS) \
	-rpath $(libdir) -version-info `$(SHTOOL) version -l c -d libtool $(_VERSION_FILE)`

#   build the manual pages
$(S)pth-config.1: $(S)pth-config.pod $(_VERSION_FILE)
	BASENAME="pth-config"; SEC=1; \
	NAME="GNU Pth"; ONELINE="GNU Portable Threads"; \
	$(_MANPAGE)
$(S)pth.3: $(S)pth.pod $(_VERSION_FILE)
	BASENAME="pth"; SEC=3; \
	NAME="GNU Pth"; ONELINE="GNU Portable Threads"; \
	$(_MANPAGE)
$(S)pthread-config.1: $(S)pthread-config.pod $(_VERSION_FILE)
	BASENAME="pthread-config"; SEC=1; \
	NAME="GNU Pth"; ONELINE="POSIX Threading API of GNU Pth"; \
	$(_MANPAGE)
$(S)pthread.3: $(S)pthread.pod $(_VERSION_FILE)
	BASENAME="pthread"; SEC=3; \
	NAME="GNU Pth"; ONELINE="POSIX Threading API of GNU Pth"; \
	$(_MANPAGE)

#   install the package
install: all-for-install
	@$(MAKE) $(MFLAGS) install-dirs install-pth 
	@touch .done-install
	@$(MAKE) $(MFLAGS) what-next
install-dirs:
	$(SHTOOL) mkdir -f -p -m 755 $(prefix)
	$(SHTOOL) mkdir -f -p -m 755 $(bindir)
	$(SHTOOL) mkdir -f -p -m 755 $(includedir)
	$(SHTOOL) mkdir -f -p -m 755 $(libdir)
	$(SHTOOL) mkdir -f -p -m 755 $(mandir)/man1
	$(SHTOOL) mkdir -f -p -m 755 $(mandir)/man3
install-pth:
	$(SHTOOL) install -c -m 755 pth-config $(bindir)/pth-config
	$(SHTOOL) install -c -m 644 $(S)pth-config.1 $(mandir)/man1/pth-config.1
	$(SHTOOL) install -c -m 644 $(S)pth.3 $(mandir)/man3/pth.3
	$(SHTOOL) install -c -m 644 pth.h $(includedir)/pth.h
	@$(LIBTOOL) --mode=install $(SHTOOL) install -c -m 644 libpth.la $(libdir)/libpth.la
install-pthread:
	$(SHTOOL) install -c -m 755 pthread-config $(bindir)/pthread-config
	$(SHTOOL) install -c -m 644 $(S)pthread-config.1 $(mandir)/man1/pthread-config.1
	$(SHTOOL) install -c -m 644 pthread.h $(includedir)/pthread.h
	$(SHTOOL) install -c -m 644 $(S)pthread.3 $(mandir)/man3/pthread.3
	@$(LIBTOOL) --mode=install $(SHTOOL) install -c -m 644 libpthread.la $(libdir)/libpthread.la

#   uninstall the package
uninstall:
	@$(MAKE) $(MFLAGS)  uninstall-pth uninstall-dirs 
	@touch .done-uninstall
	@$(MAKE) $(MFLAGS) what-next
uninstall-pthread:
	$(RM) $(bindir)/pthread-config
	$(RM) $(mandir)/man1/pthread-config.1
	$(RM) $(includedir)/pthread.h
	$(RM) $(mandir)/man3/pthread.3
	@$(LIBTOOL) --mode=uninstall $(RM) $(libdir)/libpthread.la
uninstall-pth:
	$(RM) $(bindir)/pth-config
	$(RM) $(mandir)/man1/pth-config.1
	$(RM) $(mandir)/man3/pth.3
	$(RM) $(includedir)/pth.h
	@$(LIBTOOL) --mode=uninstall $(RM) $(libdir)/libpth.la
uninstall-dirs:
	-$(RMDIR) $(bindir) >/dev/null 2>&1 || $(TRUE)
	-$(RMDIR) $(includedir) >/dev/null 2>&1 || $(TRUE)
	-$(RMDIR) $(libdir) >/dev/null 2>&1 || $(TRUE)
	-$(RMDIR) $(mandir)/man1 >/dev/null 2>&1 || $(TRUE)
	-$(RMDIR) $(mandir)/man3 >/dev/null 2>&1 || $(TRUE)
	-$(RMDIR) $(mandir) >/dev/null 2>&1 || $(TRUE)
	-$(RMDIR) $(prefix) >/dev/null 2>&1 || $(TRUE)

#   clean the source tree for re-building
clean:
#	$(RM) $(TARGET_PREQ)
	$(RM) $(TARGET_TEST) 
	$(RM) $(TARGET_LIBS)
	$(RM) core *.core *.bak *~
	$(RM) *.o *.lo
	$(RM) -r .libs
	$(RM) .done-*

#   clean the source tree for re-configuring and re-building
distclean: clean
	$(RM) Makefile
	$(RM) pth-config pth_acdef.h pth_acmac.h pth.h 
	$(RM) pthread-config pthread.h
	$(RM) config.log config.cache config.status
	$(RM) libtool

#   clean the source tree by removing really all generate stuff
realclean: distclean
	$(RM) $(TARGET_MANS)

#   give hints what to do as the next step
what-next:

#   GNU compat targets
check: test
installcheck:
installdirs: install-dirs
install-strip: install
mostlyclean: clean
maintainer-clean: realclean
info:
dvi:
TAGS:

##
##  ____ DEVELOPER TARGETS ___________________________________________
##  (THIS IS NOT INTENDED TO BE RUN BY END USERS)
##

#   fixup the permissions in the source tree
fixperm:
	@$(SHTOOL) fixperm -v *

#   upgrade the build tools in the source tree
update-tools:
	@$(RM) shtool ltmain.sh ltconfig
	@$(MAKE) $(MFLAGS) shtool ltmain.sh ltconfig configure pth_acdef.h.in
configure: configure.in
	$(RM) configure
	autoconf
pth_acdef.h.in: configure.in acconfig.h
	$(RM) pth_acdef.h.in
	autoheader configure.in >pth_acdef.h.in
shtool:
	shtoolize -o shtool all
ltmain.sh:
	@F=`libtoolize -n -c -f | grep 'cp.*ltmain.sh' |\
	    $(SED) -e 's;[^/]*;;' -e 's; .*;;'`; \
	$(ECHO) "ltmain.sh <-- $$F"; cat $$F |\
	$(SED) -e 's:/bin/sh; then:/bin/sh || test ".`echo $$nonopt | grep shtool`" != .;then:' \
	    -e 's:exec \$$SHELL \$$0 --finish:exit 0 #:' >ltmain.sh
ltconfig:
	@F=`libtoolize -n -c -f | grep 'cp.*ltconfig' | $(SED) -e 's;[^/]*;;' -e 's; .*;;'`; \
	$(ECHO) "ltconfig <-- $$F"; $(CAT) $$F >ltconfig

#   roll the release or snapshot tarball
dist: distclean fixperm
	@V=`$(SHTOOL) version -l c -d short $(_VERSION_FILE)`; NAME="pth-$$V"; $(_TARBALL)
snap: distclean fixperm
	@V=`$(SHTOOL) version -l c -d short $(_VERSION_FILE)`; NAME="pth-$$V-SNAP"; $(_TARBALL)

#   increase or update version information
new-version:
	OPT=-iv && $(_VERSION)
new-revision:
	OPT=-ir && $(_VERSION)
new-patchlevel:
	OPT=-iP && $(_VERSION)
new-betalevel:
	OPT=-ib && $(_VERSION)
new-alphalevel:
	OPT=-ia && $(_VERSION)
new-snaplevel:
	OPT=-is && $(_VERSION)
new-release:
	OPT=-s$(R) && $(_VERSION)
update-version:
	OPT="-s`$(SHTOOL) version -l c -d short $(_VERSION_FILE)`" && $(_VERSION)

#   create dependencies
depend:
	$(CP) Makefile.in Makefile.in.bak \
	&& $(SED) -ne '1,/^# DO NOT REMOVE/p' Makefile.in > Makefile.new \
	&& $(CC) -MM $(CPPFLAGS) $(CFLAGS) *.c |\
	   $(SED) -e 's/^\(pth_.*\)\.o:/\1.lo:/' >> Makefile.new \
	&& $(CP) Makefile.new Makefile.in
	&& $(RM) Makefile.new

##
##  ____ DEPENDENCY AREA ____________________________________________
##  (AUTOMATICALLY UPDATED - DO NOT EDIT)
##

$(LOBJS): Makefile

# DO NOT REMOVE
pth_attr.lo: pth_attr.c pth_p.h pth_vers.c pth.h pth_acdef.h \
 pth_acmac.h
pth_cancel.lo: pth_cancel.c pth_p.h pth_vers.c pth.h pth_acdef.h \
 pth_acmac.h
pth_clean.lo: pth_clean.c pth_p.h pth_vers.c pth.h pth_acdef.h \
 pth_acmac.h
pth_compat.lo: pth_compat.c pth_p.h pth_vers.c pth.h pth_acdef.h \
 pth_acmac.h
pth_data.lo: pth_data.c pth_p.h pth_vers.c pth.h pth_acdef.h \
 pth_acmac.h
pth_debug.lo: pth_debug.c pth_p.h pth_vers.c pth.h pth_acdef.h \
 pth_acmac.h
pth_errno.lo: pth_errno.c pth_p.h pth_vers.c pth.h pth_acdef.h \
 pth_acmac.h
pth_event.lo: pth_event.c pth_p.h pth_vers.c pth.h pth_acdef.h \
 pth_acmac.h
pth_ext.lo: pth_ext.c pth_p.h pth_vers.c pth.h pth_acdef.h pth_acmac.h
pth_fork.lo: pth_fork.c pth_p.h pth_vers.c pth.h pth_acdef.h \
 pth_acmac.h
pth_high.lo: pth_high.c pth_p.h pth_vers.c pth.h pth_acdef.h \
 pth_acmac.h
pth_lib.lo: pth_lib.c pth_p.h pth_vers.c pth.h pth_acdef.h pth_acmac.h
pth_mctx.lo: pth_mctx.c pth_p.h pth_vers.c pth.h pth_acdef.h \
 pth_acmac.h
pth_msg.lo: pth_msg.c pth_p.h pth_vers.c pth.h pth_acdef.h pth_acmac.h
pth_pqueue.lo: pth_pqueue.c pth_p.h pth_vers.c pth.h pth_acdef.h \
 pth_acmac.h
pth_ring.lo: pth_ring.c pth_p.h pth_vers.c pth.h pth_acdef.h \
 pth_acmac.h
pth_sched.lo: pth_sched.c pth_p.h pth_vers.c pth.h pth_acdef.h \
 pth_acmac.h
pth_sync.lo: pth_sync.c pth_p.h pth_vers.c pth.h pth_acdef.h \
 pth_acmac.h
pth_syscall.lo: pth_syscall.c pth_p.h pth_vers.c pth.h pth_acdef.h \
 pth_acmac.h
pth_tcb.lo: pth_tcb.c pth_p.h pth_vers.c pth.h pth_acdef.h pth_acmac.h
pth_time.lo: pth_time.c pth_p.h pth_vers.c pth.h pth_acdef.h \
 pth_acmac.h
pth_util.lo: pth_util.c pth_p.h pth_vers.c pth.h pth_acdef.h \
 pth_acmac.h
pth_vers.lo: pth_vers.c
pthread.o: pthread.c pthread.h pth_p.h pth_vers.c pth.h pth_acdef.h \
 pth_acmac.h
