Trailing-Edge
-
PDP-10 Archives
-
SRI_NIC_PERM_FS_1_19910112
-
c/ccmd/makefile.bsd
There is 1 other file named makefile.bsd in the archive. Click here to see a list.
# Author: Howie Kaye
#
# Columbia University Center for Computing Activities, July 1986.
# Copyright (C) 1986, 1987, Trustees of Columbia University in the
# City of New York. Permission is granted to any individual or
# institution to use, copy, or redistribute this software so long as
# it is not sold for profit, provided this copyright notice is
# retained.
.SUFFIXES: .c .o .obj .exe .a .lib .h .h4 .tmp
#CFLAGS=-DCMDDEBUG -g
CFLAGS=-O
MACHINE=BSD
LOCAL=/usr/include/local
#LOCAL=.
LOCALINCLUDES= ${LOCAL}/ccmd.h ${LOCAL}/cmfnc.h ${LOCAL}/cmfncs.h ${LOCAL}/datime.h $(LOCAL)/ccmdmd.h $(LOCAL)/cmkeyval.h
# termination char for cmds. ";" for msc
CMDTERM=
# CMDTERM=;
# command to invoke C compiler
CC=cc $(CFLAGS) -D$(MACHINE) -c
# CC=msc
# CC=lc
# command to delete a file
RM=rm
# RM=erase
# command to invoke the linker
LINK=cc $(CFLAGS) -o $@ $@.${OBJ} -lccmd -ltermlib $(CMDTERM)
#LINK=cc $(CFLAGS) -o $@ $@.${OBJ} ccmd.a -ltermlib $(CMDTERM)
# LINK=link $*.${OBJ},$@,,$(LIBNAME) $(CMDTERM)
# command to copy a file
COPY=cp
# COPY=copy
# name of library to create
LIBNAME=ccmd-noran.a
# LIBNAME=ccmd.lib
# command to add an object file to a library
LIBADD=ar r $(LIBNAME) $?
# LIBADD=lib $(LIBNAME)+$<-$<
# command to reorder the library
RANLIB=ranlib
# RANLIB=rem
# special file extension for this OS
EXT=unx
# EXT=DOS
# extention for EXE files.
EXE=
# EXE=.exe
# extension for OBJ files
OBJ=o
# OBJ=obj
SPLITDIR=./
all: test
ccmd: ccmd.a
split$(EXE): split.c
$(CC) split.c $(CMDTERM)
cc -o split split.o
cmkeyval$(EXE): cmkeyval.c
$(CC) cmkeyval.c $(CMDTERM)
cc -o cmkeyval cmkeyval.o
cmkeyval.h: cmkeyval$(EXE)
cmkeyval > cmkeyval.h
cmfnc.h: cmfnc.h4 cmconf.h4 cmcfm.cnf cmkey.cnf cmnum.cnf cmfld.cnf \
cmqst.cnf cmtxt.cnf cmswi.cnf cmtad.cnf cmtok.cnf cmnoi.cnf \
cmgnrc.cnf cmfil.cnf cmusr.cnf cmgrp.cnf cmpara.cnf split$(EXE) \
cmfnc.top cmfncs.top cmchar.cnf cmkeyval.h
m4 cmfnc.h4 > cmfnc.tmp
$(SPLITDIR)split < cmfnc.tmp
$(RM) cmfnc.tmp
cmfncs.h: cmfnc.h4 cmconf.h4 cmcfm.cnf cmkey.cnf cmnum.cnf cmfld.cnf \
cmqst.cnf cmtxt.cnf cmswi.cnf cmtad.cnf cmtok.cnf cmnoi.cnf \
cmgnrc.cnf cmfil.cnf cmusr.cnf cmgrp.cnf cmpara.cnf split$(EXE) \
cmfnc.top cmfncs.top cmchar.cnf cmkeyval.h
m4 cmfnc.h4 > cmfnc.tmp
$(SPLITDIR)split < cmfnc.tmp
$(RM) cmfnc.tmp
ccmd.$(OBJ): ccmd.c ccmd.h ccmdmd.h cmfnc.h cmfncs.h
$(CC) ccmd.c $(CMDTERM)
ccmdut.$(OBJ): ccmdut.c ccmd.h ccmdmd.h cmfnc.h cmfncs.h
$(CC) ccmdut.c $(CMDTERM)
ccmdio.$(OBJ): ccmdio.c ccmd.h ccmdmd.h cmfnc.h cmfncs.h
$(CC) ccmdio.c $(CMDTERM)
ccmdmd.c: ccmdmd.$(EXT)
$(COPY) ccmdmd.$(EXT) ccmdmd.c
ccmdmd.$(EXT):
ccmdmd.$(OBJ): ccmdmd.c ccmd.h ccmdmd.h cmfnc.h cmfncs.h
$(CC) ccmdmd.c $(CMDTERM)
ccmdst.$(OBJ): ccmdst.c ccmd.h ccmdmd.h cmfnc.h cmfnc.h cmfncs.h
$(CC) ccmdst.c $(CMDTERM)
stdact.$(OBJ): stdact.c ccmd.h ccmdmd.h cmfnc.h cmfncs.h
$(CC) stdact.c $(CMDTERM)
cmcfm.$(OBJ): cmcfm.c ccmd.h ccmdmd.h cmfnc.h cmfncs.h
$(CC) cmcfm.c $(CMDTERM)
cmkey.$(OBJ): cmkey.c ccmd.h ccmdmd.h cmfnc.h cmfncs.h
$(CC) cmkey.c $(CMDTERM)
cmnum.$(OBJ): cmnum.c ccmd.h ccmdmd.h cmfnc.h cmfncs.h
$(CC) cmnum.c $(CMDTERM)
cmqst.$(OBJ): cmqst.c ccmd.h ccmdmd.h cmfnc.h cmfncs.h
$(CC) cmqst.c $(CMDTERM)
cmnoi.$(OBJ): cmnoi.c ccmd.h ccmdmd.h cmfnc.h cmfncs.h
$(CC) cmnoi.c $(CMDTERM)
cmtxt.$(OBJ): cmtxt.c ccmd.h ccmdmd.h cmfnc.h cmfncs.h
$(CC) cmtxt.c $(CMDTERM)
cmfld.$(OBJ): cmfld.c ccmd.h ccmdmd.h cmfnc.h cmfncs.h
$(CC) cmfld.c $(CMDTERM)
cmtok.$(OBJ): cmtok.c ccmd.h ccmdmd.h cmfnc.h cmfncs.h
$(CC) cmtok.c $(CMDTERM)
cmswi.$(OBJ): cmswi.c ccmd.h ccmdmd.h cmfnc.h cmfncs.h
$(CC) cmswi.c $(CMDTERM)
cmtad.$(OBJ): cmtad.c ccmd.h ccmdmd.h datime.h cmfnc.h cmfncs.h
$(CC) cmtad.c $(CMDTERM)
datime.$(OBJ): datime.c datime.h tzone.h dtpat.h
$(CC) datime.c $(CMDTERM)
cmfil.$(OBJ): cmfil.c ccmd.h ccmdmd.h cmfil.h cmfnc.h cmfncs.h cmfbrk.$(EXT) \
filelist.h
$(CC) cmfil.c $(CMDTERM)
filelist.$(OBJ): filelist.c ccmd.h ccmdmd.h cmfnc.h cmfncs.h filelist.h
$(CC) filelist.c $(CMDTERM)
wild.$(OBJ): wild.c
$(CC) wild.c $(CMDTERM)
cmfbrk.$(EXT):
cmusr.$(OBJ): cmusr.c ccmd.h ccmdmd.h cmfnc.h cmfncs.h cmusr.h
$(CC) cmusr.c $(CMDTERM)
cmgrp.$(OBJ): cmgrp.c ccmd.h ccmdmd.h cmfnc.h cmfncs.h cmgrp.h
$(CC) cmgrp.c $(CMDTERM)
cmpara.$(OBJ): cmpara.c ccmd.h ccmdmd.h cmfnc.h cmfncs.h
$(CC) cmpara.c $(CMDTERM)
cmmisc.$(OBJ): cmmisc.c ccmd.h ccmdmd.h cmfnc.h
$(CC) cmmisc.c $(CMDTERM)
cmver.$(OBJ): cmver.c cmver.h
$(CC) cmver.c $(CMDTERM)
cmchar.$(OBJ): cmchar.c
$(CC) cmchar.c $(CMDTERM)
$(LIBNAME):: ccmd.$(OBJ)
$(LIBADD) $(CMDTERM)
$(LIBNAME):: ccmdut.$(OBJ)
$(LIBADD) $(CMDTERM)
$(LIBNAME):: ccmdio.$(OBJ)
$(LIBADD) $(CMDTERM)
$(LIBNAME):: ccmdmd.$(OBJ)
$(LIBADD) $(CMDTERM)
$(LIBNAME):: ccmdst.$(OBJ)
$(LIBADD) $(CMDTERM)
$(LIBNAME):: stdact.$(OBJ)
$(LIBADD) $(CMDTERM)
$(LIBNAME):: cmcfm.$(OBJ)
$(LIBADD) $(CMDTERM)
$(LIBNAME):: cmkey.$(OBJ)
$(LIBADD) $(CMDTERM)
$(LIBNAME):: cmnum.$(OBJ)
$(LIBADD) $(CMDTERM)
$(LIBNAME):: cmqst.$(OBJ)
$(LIBADD) $(CMDTERM)
$(LIBNAME):: cmnoi.$(OBJ)
$(LIBADD) $(CMDTERM)
$(LIBNAME):: cmtxt.$(OBJ)
$(LIBADD) $(CMDTERM)
$(LIBNAME):: cmfld.$(OBJ)
$(LIBADD) $(CMDTERM)
$(LIBNAME):: cmtok.$(OBJ)
$(LIBADD) $(CMDTERM)
$(LIBNAME):: cmswi.$(OBJ)
$(LIBADD) $(CMDTERM)
$(LIBNAME):: cmtad.$(OBJ)
$(LIBADD) $(CMDTERM)
$(LIBNAME):: datime.$(OBJ)
$(LIBADD) $(CMDTERM)
$(LIBNAME):: cmfil.$(OBJ)
$(LIBADD) $(CMDTERM)
$(LIBNAME):: filelist.$(OBJ)
$(LIBADD) $(CMDTERM)
$(LIBNAME):: wild.$(OBJ)
$(LIBADD) $(CMDTERM)
#only for msdos
# dir.${OBJ}: dir.c
# $(CC) dir.c $(CMDTERM)
#
# $(LIBNAME):: dir.$(OBJ)
# $(LIBADD) $(CMDTERM)
#end msdos only
$(LIBNAME):: cmusr.$(OBJ)
$(LIBADD) $(CMDTERM)
$(LIBNAME):: cmgrp.$(OBJ)
$(LIBADD) $(CMDTERM)
$(LIBNAME):: cmpara.$(OBJ)
$(LIBADD) $(CMDTERM)
$(LIBNAME):: cmmisc.$(OBJ)
$(LIBADD) $(CMDTERM)
$(LIBNAME):: cmver.$(OBJ)
$(LIBADD) $(CMDTERM)
$(LIBNAME):: cmchar.$(OBJ)
$(LIBADD) $(CMDTERM)
ccmd.a: $(LIBNAME)
$(COPY) $(LIBNAME) ccmd.a
$(RANLIB) ccmd.a
$(LOCAL)/cmkeyval.h: cmkeyval.h
cp cmkeyval.h $(LOCAL)
$(LOCAL)/ccmd.h: ccmd.h
cp ccmd.h $(LOCAL)
$(LOCAL)/ccmdmd.h: ccmdmd.h
cp ccmdmd.h $(LOCAL)
$(LOCAL)/cmfnc.h: cmfnc.h
cp cmfnc.h $(LOCAL)
$(LOCAL)/cmfncs.h: cmfncs.h
cp cmfncs.h $(LOCAL)
$(LOCAL)/datime.h: datime.h
cp datime.h $(LOCAL)
ask$(EXE): ask.$(OBJ)
cc -o ask ask.$(OBJ)
newversion: ask
@echo 'Answer no unless you wish to update version info.'
-@if ( ask 'make a new version? ') then make newversion1 ; fi
newversion1:
co -l cmver.h
incversion < cmver.h > cmver.h.new
mv cmver.h cmver.h.old
mv cmver.h.new cmver.h
ci -u cmver.h
make ccmd.a
install: $(LOCALINCLUDES) ccmd.a newversion
cp ccmd.a /usr/local/lib/libccmd.a
ranlib /usr/local/lib/libccmd.a
# cp ccmd.h cmfnc.h ccmdmd.h datime.h $(LOCAL)
/usr/local/lib/libccmd.a: $(LOCALINCLUDES) ccmd.a
make install
test.$(OBJ): test.c ccmd.h ccmdmd.h cmfnc.h datime.h
$(CC) test.c $(CMDTERM)
test$(EXE): $(LOCALINCLUDES) test.$(OBJ) /usr/local/lib/libccmd.a
#test$(EXE): $(LOCALINCLUDES) test.$(OBJ) ccmd.a
$(LINK)
skel.$(OBJ): skel.c ccmd.h ccmdmd.h cmfnc.h datime.h
$(CC) skel.c $(CMDTERM)
skel$(EXE): $(LOCALINCLUDES) skel.$(OBJ) /usr/local/lib/libccmd.a
#skel$(EXE): $(LOCALINCLUDES) skel.$(OBJ) ccmd.a
$(LINK)