# $Id: Makefile,v 1.1.1.1 1996/06/30 15:50:54 mtp Exp $
############################################################################
#    
#  COPYRIGHT NOTICE
#    
#  Copyright (C) 1995, 1996 Michael T. Peterson
#  This file is part of the PCthreads (tm) multithreading library
#  package.
#    
#  The source files and libraries constituting the PCthreads (tm) package
#  are free software; you can redistribute them and/or modify them under
#  the terms of the GNU Library General Public License as published by the Free
#  Software Foundation; either version 2 of the License, or (at your
#  option) any later version.
#    
#  The PCthreads (tm) package 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
#  Library General Public License for more details.
#    
#  You should have received a copy of the GNU Library General Public
#  License along with this library (see the file COPYING.LIB); if not,
#  write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge,
#  MA 02139, USA.
#    
#  To report bugs, bug fixes, or provide feedback you may contact the
#  author, Michael T. Peterson, at either of the two email addresses listed
#  below:
#    
#                 mtp@big.aa.net (Preferred)
#                 mtp@zso.dec.com
#    
#    
#  Michael T. Peterson
#  Issaquah, WA
#  29 January, 1996
############################################################################
# $Log: Makefile,v $
# Revision 1.1.1.1  1996/06/30 15:50:54  mtp
# DCE threads for Linux V1.0
#
############################################################################
include    ../Make.defs
MAJOR      = 1
MINOR      = 0
REVISION   = 0
VERSION    = ${MAJOR}.${MINOR}.${REVISION}

HEADERS     = ${INCDIR}/utils.h ${INCDIR}/errormsg.h ${INCDIR}/errorlog.h

ifeq (${ISELF},yes)
    TARGET_LIB  = ../lib/${STDLIB_R}.so.${VERSION}
    LINK        = ../lib/${STDLIB_R}.so.1
else
    TARGET_LIB  = ../lib/${STDLIB_R}.a
endif

LIB_OBJECTS = ${OBJDIR}/c_r.o ${OBJDIR}/errorlog.o ${OBJDIR}/errormsg.o

all: install ${TARGET_LIB}

${TARGET_LIB}: ${LIB_OBJECTS}
ifeq (${ISELF},yes)
	@echo + building ${TARGET_LIB}
	@rm -f ${TARGET_LIB} ${LINK}
	@${CC} -shared -Wl,-soname,${LINK} -o ${TARGET_LIB} ${LIB_OBJECTS}
	@ln -s ${TARGET_LIB} ${LINK}
else
	@ar r ${TARGET_LIB} ${LIB_OBJECTS}
endif


${OBJDIR}/c_r.o:         c_r.c utils.h
${OBJDIR}/errorlog.o:    errorlog.c errorlog.h
${OBJDIR}/errormsg.o:    errormsg.c errormsg.h

install:
	cp -f *.h ${INCDIR}

clobber: clean
	@rm -f ${TARGET_LIB} ${LINK} ${HEADERS} ${LIB_OBJECTS}

clean:
	@rm -f *.bak *.rem *~


