
#
# Portable Object Compiler
# $Id: Makefile.in,v 1.2 1999/05/10 18:50:36 stes Exp $
#

#
# This Makefile should work with UNIX make's (like SysV, BSD, GNU make)
#

MKDIR=mkdir
OBJC=@OBJC@
RM=@RM@
CP=@CP@
AR=@AR@
FINAL_AR=@FINAL_AR@
RANLIB=@RANLIB@
@SET_MAKE@
DBG_MFLAGS=@DBG_MFLAGS@
OPT_MFLAGS=@OPT_MFLAGS@
OBJSUFFIX=@OBJSUFFIX@
LIBSUFFIX=@LIBSUFFIX@
BOOTDIR=..@PATHSEP@..
LIBDIR=$(BOOTDIR)@PATHSEP@lib
IFLAGS=@OBJPAK_IFLAGS@
MFLAGS=$(@MFLAGS@)

.SUFFIXES: .m

LIBRARY=objpak.$(LIBSUFFIX)
SHLIB=libobjpak@DOTSHLIBSUFFIX@

OBJFILES=\
	ascfiler.$(OBJSUFFIX)\
	cltn.$(OBJSUFFIX)\
	  ordcltn.$(OBJSUFFIX)\
	  sortcltn.$(OBJSUFFIX)\
	  set.$(OBJSUFFIX)\
	  bag.$(OBJSUFFIX)\
	  stack.$(OBJSUFFIX)\
	  runarray.$(OBJSUFFIX)\
        dictnary.$(OBJSUFFIX)\
	sequence.$(OBJSUFFIX)\
	array.$(OBJSUFFIX)\
	  ocstring.$(OBJSUFFIX)\
	  idarray.$(OBJSUFFIX)\
	  intarray.$(OBJSUFFIX)\
	rectangl.$(OBJSUFFIX)\
	point.$(OBJSUFFIX)\
	assoc.$(OBJSUFFIX)\
	objgraph.$(OBJSUFFIX)\
	cltnseq.$(OBJSUFFIX)\
	keyseq.$(OBJSUFFIX)\
	valueseq.$(OBJSUFFIX)\
	setseq.$(OBJSUFFIX)\
	bagseq.$(OBJSUFFIX)\
	treeseq.$(OBJSUFFIX)\
	octext.$(OBJSUFFIX)\
	txtstyle.$(OBJSUFFIX)\
	paragrph.$(OBJSUFFIX)\
	txtattr.$(OBJSUFFIX)

.m.o:
	$(OBJC) -c $*.m $(MFLAGS) $(IFLAGS)
	$(AR) $(LIBRARY) $@ 

$(LIBRARY) : $(OBJFILES)
	$(FINAL_AR) $(LIBRARY) $(OBJFILES)
	$(RANLIB) $(LIBRARY)

shlib : $(OBJFILES)
	objc -dl $(OBJFILES) -o $(SHLIB)

bootstrap :
	test -d $(LIBDIR) || $(MKDIR) $(LIBDIR)
	-$(CP) $(LIBRARY) $(LIBDIR)

cleantmp :
	-$(RM) *.P
	-$(RM) *.c
	-$(RM) *.i

clean : cleantmp
	-$(RM) *.$(OBJSUFFIX)
	-$(RM) *.$(LIBSUFFIX)
	-$(RM) $(SHLIB)

distclean : clean
	-$(RM) Makefile 
	-$(RM) config.h 

