date and time created 85/03/01 17:19:59 by jaap
authorJaap Akkerhuis <jaap@ucbvax.Berkeley.EDU>
Sat, 2 Mar 1985 09:19:59 +0000 (01:19 -0800)
committerJaap Akkerhuis <jaap@ucbvax.Berkeley.EDU>
Sat, 2 Mar 1985 09:19:59 +0000 (01:19 -0800)
SCCS-vsn: local/ditroff/ditroff.okeeffe/ideal/Makefile 1.1

usr/src/local/ditroff/ditroff.okeeffe/ideal/Makefile [new file with mode: 0644]

diff --git a/usr/src/local/ditroff/ditroff.okeeffe/ideal/Makefile b/usr/src/local/ditroff/ditroff.okeeffe/ideal/Makefile
new file mode 100644 (file)
index 0000000..7219d74
--- /dev/null
@@ -0,0 +1,60 @@
+#
+#      Makefile        (CWI)   1.1     85/03/01
+#
+# BINDIR is the place where ideal will be installed
+BINDIR = /usr/local
+# DESTDIR is the destination where we want to move the thing (temporarily)
+DESTDIR =
+# LIBDIR is the place where we expect the the things we need and is
+# is therefore hardwired in. Since it is all local, we use BINDIR as well
+LIBDIR = ${BINDIR}/lib/ideal/lib
+CFLAGS = -O -DLIBDIR=\"${LIBDIR}\"
+
+SOURCES = ideal.h ideal.c util.c memut.c bldds.c simul.c exprn.c\
+       action.c piece.c opaque.c inter.c opqpoly.c idlex.l idyac.y
+OBJECTS = y.tab.o lex.yy.o ideal.o util.o memut.o bldds.o simul.o\
+       exprn.o action.o piece.o opaque.o opqpoly.o inter.o
+ADMIXTURE = y.tab.c lex.yy.c ideal.c util.c memut.c bldds.c simul.c\
+       exprn.c action.c piece.c opaque.c opqpoly.c inter.c
+
+SUBDIR = idfilt lib
+
+all: ideal ideal.sh ${SUBDIR}
+
+${SUBDIR}: /tmp
+       cd $@; make ${MFLAGS}
+
+# ideal is a shell file. It needs to know where it can find the real binary
+ideal.sh: ideal.cmd
+       sed "s#IDDIR=.*#IDLIB= ${DESTDIR}${LIBDIR}#" < ideal.cmd > ideal.sh
+
+ideal: $(OBJECTS)
+       cc -o ideal $(OBJECTS) -ll -lm
+
+$(OBJECTS):    ideal.h
+
+ideal.h:       stdas.h
+
+lex.yy.c:      idlex.l
+       lex idlex.l
+
+y.tab.c:       idyac.y
+       yacc -d idyac.y
+
+install: all
+       install -s ideal ${DESTDIR}/${LIBDIR}/ideal
+       install -m 755 ideal.sh ${DESTDIR}/${BINDIR}/ideal
+       install -c -m 644 ideal.1 ${DESTDIR}/usr/man/manl/ideal.1
+       cd idfilt; make DESTDIR=${DESTDIR} install
+       cd lib; make DESTDIR=${DESTDIR} install
+
+list:
+       pr $(SOURCES)
+
+lint:
+       lint $(ADMIXTURE) -lm
+
+clean:
+       rm -f *.o y.tab.c lex.yy.c y.tab.h
+       for i in ${SUBDIR}; do (cd $$i; make ${MFLAGS} clean); done
+