Google
 

Trailing-Edge - PDP-10 Archives - SRI_NIC_PERM_FS_1_19910112 - c/ccmd/makefile.dos
There is 1 other file named makefile.dos 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=
MACHINE=MSDOS
#LOCAL=/usr/include/local
LOCAL=\msc\include\local
LOCALINCLUDES= ${LOCAL}\ccmd.h ${LOCAL}\cmfnc.h ${LOCAL}\cmfncs.h ${LOCAL}\datime.h $(LOCAL)\ccmdmd.h $(LOCAL)\cmkeyval.h
OBJS=ccmd.$(OBJ) ccmdut.$(OBJ) ccmdio.$(OBJ) ccmdmd.$(OBJ) ccmdst.$(OBJ)\
	stdact.$(OBJ) cmcfm.$(OBJ) cmkey.$(OBJ) cmnum.$(OBJ) cmqst.$(OBJ)\
	cmnoi.$(OBJ) cmtxt.$(OBJ) cmfld.$(OBJ) cmtok.$(OBJ) cmswi.$(OBJ)\
	cmtad.$(OBJ) datime.$(OBJ) cmfil.$(OBJ) filelist.$(OBJ) wild.$(OBJ)\
	dir.$(OBJ) cmusr.$(OBJ) cmgrp.$(OBJ) cmpara.$(OBJ) cmmisc.$(OBJ)\
	cmver.$(OBJ) cmchar.$(OBJ)
# termination char for cmds.   ";" for msc
#CMDTERM=
CMDTERM=;

# command to invoke C compiler
#CC=cc $(CFLAGS) -D$(MACHINE) -c -O
CC=msc $(CFLAGS)
# 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=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=./
SPLITDIR=
all: test$(EXE)

ccmd: $(LOCALINCLUDES) ccmd.a 

split$(EXE): split.c
	$(CC) split.c $(CMDTERM)
#	cc -o split split.o
	link split;

cmkeyval$(EXE): cmkeyval.c
	$(CC) cmkeyval.c $(CMDTERM)
#	cc -o cmkeyval cmkeyval.o
	link cmkeyval;

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)

cmfbrk.$(EXT):

filelist.$(OBJ): filelist.c ccmd.h ccmdmd.h cmfnc.h cmfncs.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
	$(COPY) cmkeyval.h $(LOCAL)

$(LOCAL)\ccmd.h: ccmd.h
	$(COPY) ccmd.h $(LOCAL)

$(LOCAL)\ccmdmd.h: ccmdmd.h
	$(COPY) ccmdmd.h $(LOCAL)

$(LOCAL)\cmfnc.h: cmfnc.h
	$(COPY) cmfnc.h $(LOCAL)

$(LOCAL)\cmfncs.h: cmfncs.h
	$(COPY) cmfncs.h $(LOCAL)

$(LOCAL)\datime.h: datime.h
	$(COPY) datime.h $(LOCAL)

newversion: 
#	co -l cmver.h
#	incversion < cmver.h > cmver.h.new
#	ci -u cmver.h
#	@mv cmver.h cmver.h.old
#	@mv cmver.h.new cmver.h
#	@make ccmd.a

install: $(LOCALINCLUDES) ccmd.a
#	$(COPY) ccmd.a \usr\local\lib\libccmd.a
	$(RANLIB) \usr\local\lib\libccmd.a

\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)  ccmd.lib
#test$(EXE): $(LOCALINCLUDES) test.$(OBJ) ccmd.a
	link test.obj $(OBJS) /m/co;

skel.$(OBJ): skel.c ccmd.h ccmdmd.h cmfnc.h 
	$(CC) skel.c $(CMDTERM)

skel$(EXE): skel.$(OBJ) ccmd.lib
	$(LINK)