home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
The World of Computer Software
/
World_Of_Computer_Software-02-385-Vol-1of3.iso
/
t
/
turtlegr.zip
/
scm
/
makefile.x11
< prev
next >
Wrap
Makefile
|
1992-11-01
|
5KB
|
188 lines
# Makefile for SCM (Scheme implementation intended for JACAL).
# Copyright (C) 1990, 1991, 1992 Aubrey Jaffer.
# See the file "COPYING" for terms applying to this program
# directory where COPYING and Init.scm reside.
IMPLPATH=/usr/local/lib/scm/
#this one is good while debugging
#IMPLPATH=`pwd`/
# Pathname where Init.scm resides. This directory must also contain COPYING.
IMPLINIT=$(IMPLPATH)Init.scm
# If pathname where Init.scm resides is not known in advance then
# SCM_INIT_PATH is the environment variable whose value is the
# pathname where Init.scm resides.
# IMPLINIT=
# directory where `make install' will put executable.
DEST=/usr/local/bin/
# directory where `make install' will put manual page.
MANDEST=/usr/local/man/man1/
#CC = your compiler
# -DRTL if this is a run-time library only (no interactive top level)
# -Dunix is required for SCO
# -DRECKLESS if you want most scm error checking disabled.
# -O if you want the optimizing C compiler to be used.
CFLAGS =-Wall -O -DX11 -DFLOATS -I/usr/local/X11R5/include
# append any names of user extension files
# -lm for -DFLOATS
LIBS = -lm -L/usr/X386/lib/jump -lX11
# for BSD nm format
SED_TO_STRIP_NM=sed -e '/.*\.o$$/d' -e 's/.* _//'
# For a System V nm where plain C identifiers have _ prepended:
#SED_TO_STRIP_NM=sed -e '/^_[A-Za-z][A-za-z0-9_]*[ |].*|extern|!d' -e 's/|/ /g' -e 's/^_//'
# For a System V nm where plain C identifiers have nothing prepended:
#SED_TO_STRIP_NM=sed -e '/^[A-Za-z][A-za-z0-9_]*[ |].*|extern|!d' -e 's/|/ /g'
#you should not need to change below this line.
SHELL = /bin/sh
DFLAG = -DIMPLINIT=\"$(IMPLINIT)\"
ffiles = time.o repl.o fscl.o sys.o feval.o subr.o sc2.o funif.o turtlegr.o
efiles = time.o repl.o escl.o sys.o eeval.o subr.o sc2.o eunif.o turtlegr.o
cfiles = scm.c time.c repl.c scl.c sys.c eval.c subr.c sc2.c unif.c turtlegr.c
hfiles = scm.h config.h patchlvl.h
tfiles = Init.scm test.scm example.scm pi.scm pi.c
dfiles = README COPYING scm.1 scm.doc MANUAL ChangeLog code.doc ANNOUNCE
mfiles = makefile.unix makefile.msc makefile.bor makefile.tur\
makefile.djg makefile.qc compile.amiga link.amiga makefile.aztec\
makefile.ast makefile.prj
vfiles = setjump.mar setjump.h VMSBUILD.COM VMSGCC.COM
afiles = $(dfiles) $(cfiles) $(hfiles) $(tfiles) $(mfiles) $(vfiles)
gfiles = makefile.x11 turtlegr.c grtest.scm turtle
all: scm
scheme: scm
# -DINITS= the initialization calls for user extension files.
turtlegr.o: turtlegr.c scm.h config.h
$(CC) -c $(CFLAGS) turtlegr.c
dbscm: $(efiles) ../db/db.a scm.c scm.h config.h patchlvl.h
$(CC) -o dbscm $(efiles) $(CFLAGS) -DINITS=init_db\(\) scm.c ../db/db.a
scm: $(ffiles) fscm.o
$(CC) -o scm $(ffiles) fscm.o $(LIBS)
fscm.o: scm.c scm.h config.h patchlvl.h
$(CC) $(CFLAGS) -c -DFLOATS -DINITS=init_turtlegr\(\) scm.c
mv scm.o fscm.o
fscl.o: scl.c scm.h
$(CC) $(CFLAGS) -c -DFLOATS scl.c
mv scl.o fscl.o
feval.o: eval.c scm.h
$(CC) $(CFLAGS) -c -DFLOATS eval.c
mv eval.o feval.o
funif.o: unif.c scm.h
$(CC) $(CFLAGS) -c -DFLOATS unif.c
mv unif.o funif.o
escm: $(efiles) escm.o
$(CC) -o escm $(efiles) escm.o
escm.o: scm.c scm.h config.h patchlvl.h
$(CC) $(CFLAGS) -c -DINITS=init_turtlegr\(\) scm.c
mv scm.o escm.o
escl.o: scl.c scm.h
$(CC) $(CFLAGS) -c scl.c
mv scl.o escl.o
eeval.o: eval.c scm.h
$(CC) $(CFLAGS) -c eval.c
mv eval.o eeval.o
eunif.o: unif.c scm.h
$(CC) $(CFLAGS) -c unif.c
mv unif.o eunif.o
repl.o: repl.c scm.h config.h
$(CC) $(CFLAGS) -c $(DFLAG) repl.c
sys.o: sys.c scm.h config.h
$(CC) $(CFLAGS) -c sys.c
time.o: time.c scm.h config.h
$(CC) $(CFLAGS) -c time.c
subr.o: subr.c scm.h
$(CC) $(CFLAGS) -c subr.c
sc2.o: sc2.c scm.h
$(CC) $(CFLAGS) -c sc2.c
both: scm escm
libscm.a: rtlscm.o $(ffiles)
rm -f libscm.a
ar rc libscm.a rtlscm.o $(ffiles)
ranlib libscm.a
rtlscm.o: scm.c scm.h config.h patchlvl.h
$(CC) $(CFLAGS) -c -DFLOATS -DRTL -DINITS=init_user_scm\(\) scm.c
mv scm.o rtlscm.o
scm.doc: scm.1
nroff -man scm.1 >scm.doc
install: scm scm.1
cp scm $(DEST)
strip $(DEST)scm
-cp scm.1 $(MANDEST)
-cp Init.scm $(IMPLPATH)
-cp COPYING $(IMPLPATH)
tar: turtlegr.tar
turtlegr.tar: temp/scm
cd temp; tar chf ../turtlegr.tar scm
-rm -rf temp
shar: scm.shar
scm.shar: temp/scm
cd temp; shar scm >../scm.shar
dclshar: scm.com
com: scm.com
scm.com: temp/scm
cd temp; dclshar scm >../scm.com
temp/scm: $(gfiles)
-rm -rf temp
mkdir temp
mkdir temp/scm
ln $(gfiles) temp/scm
dist: tar.Z
tar.Z: turtlegr.tar.Z
turtlegr.tar.Z: turtlegr.tar
-rm -f turtlegr.tar.Z
compress turtlegr.tar
shar.Z: scm.shar.Z
scm.shar.Z: scm.shar
-rm -f scm.shar.Z
compress scm.shar
check: scm test.scm
echo '(test-sc4)(test-cont)(test-inexact)(quit 0)' | scm test.scm
lint: lints
lints: $(cfiles) $(hfiles)
lint $(CFLAGS) -DFLOATS $(cfiles) | tee lints
# lint $(CFLAGS) $(cfiles) | tee lintes
name8: name8s
name8s: scm
nm scm |\
$(SED_TO_STRIP_NM) |\
sort -u|\
awk '{ if (substr(l,1,8)==substr($$1,1,8)) {\
if (p) print l;\
print $$1;p=0;stat=1\
}else p=1;\
l=$$1\
}END{exit stat}' -
ctags: $(hfiles) $(cfiles) code.doc
etags $(hfiles) $(cfiles) code.doc
TAGS:
tags: $(hfiles) $(cfiles) Init.scm MANUAL code.doc $(mfiles) README
etags $(hfiles) $(cfiles) Init.scm MANUAL code.doc $(mfiles) README
mostlyclean:
clean:
-rm -f *~ \#* *\# *.orig *.rej a.out core lints tmp*
distclean:
-rm -f *~ \#* *.o *\# *.orig *.rej a.out core lints tmp*
-rm -rf temp
realclean:
-rm -f *~ \#* *.o *\# *.orig *.rej a.out core TAGS lints tmp* scm.doc
-rm -rf temp