# Makefile generated by imake - do not edit!
# $XConsortium: imake.c /main/90 1996/11/13 14:43:23 lehors $

# -------------------------------------------------------------------------
# Makefile generated from "Imake.tmpl" and <Imakefile>.
#
# Platform-specific parameters may be set in the appropriate .cf and
# .p-cf configuration files.  Site-wide parameters may be set in the
# files site.def and site.p-def.  Full rebuilds are recommended if
# any parameters are changed.

# -------------------------------------------------------------------------
# site-specific configuration parameters that need to come before the
# platform-specific parameters - edit site.def or site.p-def to change

# site:  Primate Center 89/12/22

# -------------------------------------------------------------------------
# Set the OS name and version macros if imake has defined them

# -------------------------------------------------------------------------
# platform-specific configuration parameters specific to this project
# edit sun.p-cf to change

# -------------------------------------------------------------------------
# platform-specific configuration parameters
# edit sun.cf to change

# platform:  sun.cf	96/06/21
# operating system:  SunOS 5.5 Generic sun4u

# -------------------------------------------------------------------------
# site-specific configuration parameters that go after the
# platform-specific parameters - edit site.def or site.p-def to change

# site:  Primate Center 89/12/22

# -------------------------------------------------------------------------
# project-specific system and project description parameters
# Edit Imake.p-params to change

# -------------------------------------------------------------------------
# Standard system and project description parameters
# Edit Imake.params to change

# -------------------------------------------------------------------------
# definitions common to all Makefiles

          PATHSEP = /

            SHELL = /bin/sh

  VARARGS_DEFINES = -DSTDARG -DVARARGS

              TOP = .
      CURRENT_DIR = .

# Configuration file identification - name and release level

         CONFIGNAME = WRPRC2
 CONFIGMAJORRELEASE = 2
 CONFIGMINORRELEASE = 10
      CONFIGRELEASE = $(CONFIGMAJORRELEASE).$(CONFIGMINORRELEASE)
      CONFIGROOTDIR = /usr/local/lib/config

# Project identfication - name and release level

        PROJECTNAME = Portability Library
PROJECTMAJORRELEASE = 1
PROJECTMINORRELEASE = 01
     PROJECTRELEASE = $(PROJECTMAJORRELEASE).$(PROJECTMINORRELEASE)

           BINDIR = /usr/bin
        USRLIBDIR = /usr/lib
       LINTLIBDIR = $(USRLIBDIR)/lint

           ETCDIR = /usr/etc
      INCLUDEROOT = /usr/include
           TMPDIR = /tmp
     SPOOLROOTDIR = /var/spool

     LOCALROOTDIR = /usr/local
      LOCALBINDIR = $(LOCALROOTDIR)/bin
   LOCALUSRLIBDIR = $(LOCALROOTDIR)/lib
  LOCALLINTLIBDIR = $(LOCALUSRLIBDIR)/lint
      LOCALADMDIR = $(LOCALROOTDIR)/adm
      LOCALETCDIR = $(LOCALROOTDIR)/etc
 LOCALINCLUDEROOT = $(LOCALROOTDIR)/include

          MANROOT = /usr/local/man
    MANSOURCEPATH = $(MANROOT)/man
       MAN1SUFFIX = 1
       MAN2SUFFIX = 2
       MAN3SUFFIX = 3
       MAN4SUFFIX = 4
       MAN5SUFFIX = 5
       MAN6SUFFIX = 6
       MAN7SUFFIX = 7
       MAN8SUFFIX = 8
       MANLSUFFIX = l
       MANNSUFFIX = n
        MANSUFFIX = $(MAN1SUFFIX)
          MAN1DIR = $(MANSOURCEPATH)$(MAN1SUFFIX)
          MAN2DIR = $(MANSOURCEPATH)$(MAN2SUFFIX)
          MAN3DIR = $(MANSOURCEPATH)$(MAN3SUFFIX)
          MAN4DIR = $(MANSOURCEPATH)$(MAN4SUFFIX)
          MAN5DIR = $(MANSOURCEPATH)$(MAN5SUFFIX)
          MAN6DIR = $(MANSOURCEPATH)$(MAN6SUFFIX)
          MAN7DIR = $(MANSOURCEPATH)$(MAN7SUFFIX)
          MAN8DIR = $(MANSOURCEPATH)$(MAN8SUFFIX)
          MANLDIR = $(MANSOURCEPATH)$(MANLSUFFIX)
          MANNDIR = $(MANSOURCEPATH)$(MANNSUFFIX)
           MANDIR = $(MANSOURCEPATH)$(MANSUFFIX)

           IMBOOT = imboot
           DEPEND = makedepend
             MSUB = msub
        MKDIRHIER = mkdirhier

               AR = ar cq
               CC = cc
              CPP = /lib/cpp $(STD_CPP_DEFINES)
               LD = ld
             LINT = lint
      LINTLIBFLAG = -o
         LINTOPTS = -bh
         LINTLIBS =
               LN = ln -s
             MAKE = make
               MV = mv
               CP = cp
              CMP = cmp

               RM = rm -f
             TAGS = ctags
             PERL = perl
         PERLPATH = $(LOCALBINDIR)/perl
            PERL5 = perl5
        PERL5PATH = $(LOCALBINDIR)/perl5
              AWK = awk
              SED = sed
             COMM = comm
              CAT = cat
             SORT = sort
             UNIQ = uniq
            CHMOD = chmod
            CHDIR = cd
     SENDMAILPATH = /usr/lib/sendmail

# Important local programs

              FIGEN = figen
             DISTAR = distar

# Standard system include file directories, defines, etc.

  STD_CPP_DEFINES =

     STD_INCLUDES = -I$(LOCALINCLUDEROOT)
      STD_DEFINES = -Dsun -DSVR4
       STD_LDLIBS = -lsocket -lnsl -lw
      STD_LDFLAGS = -L$(LOCALUSRLIBDIR)

# Project-specific include file directories, defines, etc.

 PROJECT_INCLUDES = -I.
  PROJECT_DEFINES =
   PROJECT_LDLIBS =
  PROJECT_LDFLAGS =

  LOADERLIBPREFIX =
      CDEBUGFLAGS = -O
        CCOPTIONS = -Xc

      ALLINCLUDES = $(INCLUDES) $(PROJECT_INCLUDES) $(STD_INCLUDES)
       ALLDEFINES = $(STD_DEFINES) $(PROJECT_DEFINES) $(DEFINES)
           CFLAGS = $(CDEBUGFLAGS) $(CCOPTIONS) $(ALLINCLUDES) $(ALLDEFINES)
        LINTFLAGS = $(LINTOPTS) -DLINT $(ALLINCLUDES) $(ALLDEFINES)
     EXTRA_LDLIBS = $(LDLIBS) $(PROJECT_LDLIBS) $(STD_LDLIBS)
           LDOPTS = $(CDEBUGFLAGS) $(CCOPTIONS) \
			$(LDFLAGS) $(PROJECT_LDFLAGS) $(STD_LDFLAGS)

           RM_CMD = $(RM) *.CKP *.ln *.BAK *.bak *.o core errs ,* *.a .emacs_* tags TAGS make.log MakeOut

          INSTALL = /usr/ucb/install
         INSTCOPY = -c
        INSTSTRIP = -s
        INSTOWNER =
        INSTGROUP =
     INSTPROGMODE = -m 0755
  INSTUIDPROGMODE = -m 04755
  INSTGIDPROGMODE = -m 02755
 INSTUGIDPROGMODE = -m 06755
   INSTSCRIPTMODE = -m 0755
      INSTLIBMODE = -m 0644
      INSTDATMODE = -m 0444
      INSTMANMODE = -m 0444
      INSTINCMODE = -m 0444
    INSTPROGFLAGS = $(INSTCOPY) $(INSTOWNER) $(INSTGROUP) $(INSTPROGMODE) $(INSTSTRIP)
 INSTUIDPROGFLAGS = $(INSTCOPY) $(INSTOWNER) $(INSTGROUP) $(INSTUIDPROGMODE) $(INSTSTRIP)
 INSTGIDPROGFLAGS = $(INSTCOPY) $(INSTOWNER) $(INSTGROUP) $(INSTGIDPROGMODE) $(INSTSTRIP)
INSTUGIDPROGFLAGS = $(INSTCOPY) $(INSTOWNER) $(INSTGROUP) $(INSTUGIDPROGMODE) $(INSTSTRIP)
  INSTSCRIPTFLAGS = $(INSTCOPY) $(INSTOWNER) $(INSTGROUP) $(INSTSCRIPTMODE)
     INSTLIBFLAGS = $(INSTCOPY) $(INSTOWNER) $(INSTGROUP) $(INSTLIBMODE)
     INSTDATFLAGS = $(INSTCOPY) $(INSTOWNER) $(INSTGROUP) $(INSTDATMODE)
     INSTMANFLAGS = $(INSTCOPY) $(INSTOWNER) $(INSTGROUP) $(INSTMANMODE)
     INSTINCFLAGS = $(INSTCOPY) $(INSTOWNER) $(INSTGROUP) $(INSTINCMODE)

           SOELIM = soelim
            TROFF = groff
            NROFF = nroff
              TBL = gtbl
              EQN = geqn
             NEQN = neqn
              PIC = pic
        MANMACROS = -man
         MEMACROS = -me
         MMMACROS = -mm
         MSMACROS = -ms
       MDOCMACROS = -mdoc
         TROFFCVT = troffcvt
           TBLCVT = tblcvt
       TROFF2HTML = troff2html
        TROFF2RTF = troff2rtf
           UNROFF = unroff
      TCMANMACROS = -man
       TCMEMACROS = -me
       TCMMMACROS = -mm
       TCMSMACROS = -ms
     TCMDOCMACROS = -mdoc

# Library link and dependency specifiers

      BIBSTUFFLIB = -lbibstuff
   DEPBIBSTUFFLIB =
           ETMLIB = -letm
        DEPETMLIB =
           FPLLIB = -lfpl
        DEPFPLLIB =
           FQLLIB = -lfql
        DEPFQLLIB =
         GECOSLIB = -lgecos
      DEPGECOSLIB =
        LOGMGRLIB = -llogmgr
     DEPLOGMGRLIB =
        MEMMGRLIB = -lmemmgr
     DEPMEMMGRLIB =
           NDSLIB = -lnds
        DEPNDSLIB =
           NIOLIB = -lnio
        DEPNIOLIB =
         ORDERLIB = -lorder
      DEPORDERLIB =
        SEQNUMLIB = -lseqnum
     DEPSEQNUMLIB =
        SIMSCRLIB = -lsimscr
     DEPSIMSCRLIB =
           TFMLIB = -ltfm
        DEPTFMLIB =
            TSLIB = -ltokenscan
         DEPTSLIB =
          PORTLIB = $(LOADERLIBPREFIX)$(TOP)/libport.a
       DEPPORTLIB = $(TOP)/libport.a

# Makefile-generating commands and parameters

   IMBOOT_DEFINES =
       IMBOOT_CMD = $(IMBOOT) -C $(CONFIGNAME) $(IMBOOT_DEFINES)

# -------------------------------------------------------------------------
# Project-specific imake rules
# Edit Imake.p-rules to change

# -------------------------------------------------------------------------
# Standard imake rules
# Edit Imake.rules to change

# -------------------------------------------------------------------------
# start of Imakefile

# Portability library Makefile

DEFINES = \
	-DHAS_SYSCONF=1 \
	-DHAS_FLOCK=0 \
	-DHAS_FCNTL=1 \
	-DHAS_SYS_DIR_H=0 \
	-DHAS_DIRENT_H=1 \
	-DHAS_BCOPY=0

    LIBSRCS = ato.c dir.c fd.c lock.c mem.c $(STRSRCS)
    LIBOBJS = ato.o dir.o fd.o lock.o mem.o $(STROBJS)

    ATOSRCS = atotest.c
    ATOOBJS = atotest.o
    ATOLIBS = $(PORTLIB)
 DEPATOLIBS = $(DEPPORTLIB)

    DIRSRCS = dirtest.c
    DIROBJS = dirtest.o
    DIRLIBS = $(PORTLIB)
 DEPDIRLIBS = $(DEPPORTLIB)

     FDSRCS = fdtest.c
     FDOBJS = fdtest.o
     FDLIBS = $(PORTLIB)
  DEPFDLIBS = $(DEPPORTLIB)

   LOCKSRCS = locktest.c
   LOCKOBJS = locktest.o
   LOCKLIBS = $(PORTLIB)
DEPLOCKLIBS = $(DEPPORTLIB)

    MEMSRCS = memtest.c
    MEMOBJS = memtest.o
    MEMLIBS = $(PORTLIB)
 DEPMEMLIBS = $(DEPPORTLIB)

       SRCS = $(LIBSRCS) $(ATOSRCS) $(DIRSRCS) $(FDSRCS) $(LOCKSRCS) $(MEMSRCS)

all::

.c.o:
	$(RM) $@
	$(CC) -c $(CFLAGS) $*.c

all:: libport.a
libport.a: $(LIBOBJS)
	$(RM) $@
	$(AR) $@ $(LIBOBJS)

clean::
	$(RM) libport.a

lint:: lint.libport.a
lint.libport.a:
	$(LINT) $(LINTFLAGS) $(LIBSRCS) $(LINTLIBS)

help_aux::
	@echo "'make "lint.libport.a"' to "lint sources for libport.a

help_aux::
	@echo "'make "libport.a"' to "build the libport.a library

install:: i.libport.a

help_aux::
	@echo "'make "i.libport.a"' to "install libport.a
i.libport.a:: libport.a
	@if [ -d $(LOCALUSRLIBDIR) ]; then set +x; \
	else (set -x; $(MKDIRHIER) $(LOCALUSRLIBDIR)); fi
	$(INSTALL) $(INSTLIBFLAGS) libport.a $(LOCALUSRLIBDIR)/libport.a

install:: i.portlib.h

help_aux::
	@echo "'make "i.portlib.h"' to "install portlib.h
i.portlib.h:: portlib.h
	@if [ -d $(LOCALINCLUDEROOT) ]; then set +x; \
	else (set -x; $(MKDIRHIER) $(LOCALINCLUDEROOT)); fi
	$(INSTALL) $(INSTINCFLAGS) portlib.h $(LOCALINCLUDEROOT)/portlib.h

all:: atotest

help_aux::
	@echo "'make "atotest"' to "build atotest
atotest: $(ATOOBJS) $(DEPATOLIBS)
	$(RM) $@
	$(CC) -o $@ $(ATOOBJS) $(LDOPTS) $(ATOLIBS) $(EXTRA_LDLIBS)

clean::
	$(RM) atotest

lint:: lint.atotest
lint.atotest:
	$(LINT) $(LINTFLAGS) $(ATOSRCS) $(LINTLIBS)

help_aux::
	@echo "'make "lint.atotest"' to "lint sources for atotest

install:: i.atotest
i.atotest::
	@echo atotest is not installed anywhere.

all:: dirtest

help_aux::
	@echo "'make "dirtest"' to "build dirtest
dirtest: $(DIROBJS) $(DEPDIRLIBS)
	$(RM) $@
	$(CC) -o $@ $(DIROBJS) $(LDOPTS) $(DIRLIBS) $(EXTRA_LDLIBS)

clean::
	$(RM) dirtest

lint:: lint.dirtest
lint.dirtest:
	$(LINT) $(LINTFLAGS) $(DIRSRCS) $(LINTLIBS)

help_aux::
	@echo "'make "lint.dirtest"' to "lint sources for dirtest

install:: i.dirtest
i.dirtest::
	@echo dirtest is not installed anywhere.

all:: fdtest

help_aux::
	@echo "'make "fdtest"' to "build fdtest
fdtest: $(FDOBJS) $(DEPFDLIBS)
	$(RM) $@
	$(CC) -o $@ $(FDOBJS) $(LDOPTS) $(FDLIBS) $(EXTRA_LDLIBS)

clean::
	$(RM) fdtest

lint:: lint.fdtest
lint.fdtest:
	$(LINT) $(LINTFLAGS) $(FDSRCS) $(LINTLIBS)

help_aux::
	@echo "'make "lint.fdtest"' to "lint sources for fdtest

install:: i.fdtest
i.fdtest::
	@echo fdtest is not installed anywhere.

all:: locktest

help_aux::
	@echo "'make "locktest"' to "build locktest
locktest: $(LOCKOBJS) $(DEPLOCKLIBS)
	$(RM) $@
	$(CC) -o $@ $(LOCKOBJS) $(LDOPTS) $(LOCKLIBS) $(EXTRA_LDLIBS)

clean::
	$(RM) locktest

lint:: lint.locktest
lint.locktest:
	$(LINT) $(LINTFLAGS) $(LOCKSRCS) $(LINTLIBS)

help_aux::
	@echo "'make "lint.locktest"' to "lint sources for locktest

install:: i.locktest
i.locktest::
	@echo locktest is not installed anywhere.

all:: memtest

help_aux::
	@echo "'make "memtest"' to "build memtest
memtest: $(MEMOBJS) $(DEPMEMLIBS)
	$(RM) $@
	$(CC) -o $@ $(MEMOBJS) $(LDOPTS) $(MEMLIBS) $(EXTRA_LDLIBS)

clean::
	$(RM) memtest

lint:: lint.memtest
lint.memtest:
	$(LINT) $(LINTFLAGS) $(MEMSRCS) $(LINTLIBS)

help_aux::
	@echo "'make "lint.memtest"' to "lint sources for memtest

install:: i.memtest
i.memtest::
	@echo memtest is not installed anywhere.

all:: porttest
porttest:: porttest.sh
	$(RM) $@
	echo "#!"$(SHELL) > $@
	$(MSUB) porttest.sh >> $@
	$(CHMOD) a+x $@

clean::
	$(RM) porttest

help_aux::
	@echo "'make "porttest"' to "build the porttest script

install:: i.porttest
i.porttest::
	@echo porttest is not installed anywhere.

depend::
	$(DEPEND) -s "# DO NOT DELETE" -- $(ALLINCLUDES) $(ALLDEFINES) -- $(SRCS)

all::
World::
	@echo "Building "$(PROJECTNAME)", Release "$(PROJECTRELEASE)
	@echo ""
	@date
	@echo ""
	$(MAKE) $(MFLAGS) Makefile
	$(MAKE) $(MFLAGS) Makefiles
	$(MAKE) $(MFLAGS) clean
	$(MAKE) $(MFLAGS) depend
	$(MAKE) $(MFLAGS) all
	@echo ""
	@date
	@echo ""
	@echo "Done building "$(PROJECTNAME)

help_aux::
	@echo "'make "World"' to "build the entire $(PROJECTNAME) distribution

help_aux::
	@echo "'make "test-all"' to "test all portlib operations

test-all:: porttest atotest dirtest fdtest locktest memtest
	./porttest

help_aux::
	@echo "'make "test-ato"' to "test string-conversion operations

test-ato:: porttest atotest
	./porttest ato

help_aux::
	@echo "'make "test-dir"' to "test directory-reading operations

test-dir:: porttest dirtest
	./porttest dir

help_aux::
	@echo "'make "test-fd"' to "test file-descriptor operations

test-fd:: porttest fdtest
	./porttest fd

help_aux::
	@echo "'make "test-lock"' to "test file-locking operations

test-lock:: porttest locktest
	./porttest lock

# remove test lock file used by locktest

clean::
	$(RM) lock.test

help_aux::
	@echo "'make "test-mem"' to "test memory operations

test-mem:: porttest memtest
	./porttest mem

# -------------------------------------------------------------------------
# common rules for all Makefiles

emptyrule::

clean::
	$(RM_CMD) "#"*

tags::
	$(TAGS) -w *.[ch]
	$(TAGS) -xw *.[ch] > TAGS

Makefile::
	$(IMBOOT_CMD) $(TOP) $(CURRENT_DIR)

help::
	@echo "'make Makefile' to rebuild Makefile"
	@echo "'make all' to make everything"
	@echo "'make target' to make a single target"
	@echo "'make depend' to generate header file dependencies"
	@echo "'make install' to install everything (except manual pages)"
	@echo "'make install.man' to install all manual pages"
	@echo "'make i.target' to install a single target"
	@echo "'make lint' to lint source files"
	@echo "'make lint.target' to lint source files for a single target"
	@echo "'make clean' to clean up"
	@make help_aux

help_aux::

# -------------------------------------------------------------------------
# empty rules for directories that do not have SUBDIRS

all::
depend::
lint::

install::
	@echo "install in $(CURRENT_DIR) done"

install.man::
	@echo "install.man in $(CURRENT_DIR) done"

Makefiles::

# -------------------------------------------------------------------------
# dependencies generated by makedepend

# DO NOT DELETE

ato.o: /usr/include/stdio.h /usr/include/sys/feature_tests.h
ato.o: /usr/include/math.h /usr/include/floatingpoint.h
ato.o: /usr/include/sys/ieeefp.h
dir.o: /usr/include/stdio.h /usr/include/sys/feature_tests.h
dir.o: /usr/include/sys/types.h /usr/include/sys/isa_defs.h
dir.o: /usr/include/sys/machtypes.h /usr/include/sys/select.h
dir.o: /usr/include/sys/time.h /usr/include/time.h /usr/include/dirent.h
dir.o: /usr/include/sys/dirent.h portlib.h
fd.o: portlib.h /usr/include/unistd.h /usr/include/sys/feature_tests.h
fd.o: /usr/include/sys/types.h /usr/include/sys/isa_defs.h
fd.o: /usr/include/sys/machtypes.h /usr/include/sys/select.h
fd.o: /usr/include/sys/time.h /usr/include/time.h /usr/include/sys/unistd.h
lock.o: /usr/include/stdio.h /usr/include/sys/feature_tests.h
lock.o: /usr/include/fcntl.h /usr/include/sys/types.h
lock.o: /usr/include/sys/isa_defs.h /usr/include/sys/machtypes.h
lock.o: /usr/include/sys/select.h /usr/include/sys/time.h /usr/include/time.h
lock.o: /usr/include/sys/fcntl.h portlib.h
mem.o: portlib.h /usr/include/string.h /usr/include/sys/feature_tests.h
atotest.o: /usr/include/stdio.h /usr/include/sys/feature_tests.h portlib.h
dirtest.o: /usr/include/stdio.h /usr/include/sys/feature_tests.h portlib.h
fdtest.o: /usr/include/stdio.h /usr/include/sys/feature_tests.h portlib.h
locktest.o: /usr/include/stdio.h /usr/include/sys/feature_tests.h portlib.h
memtest.o: /usr/include/stdio.h /usr/include/sys/feature_tests.h portlib.h
