source: trunk/athena/bin/cxref/Makefile @ 3361

Revision 3361, 2.7 KB checked in by dschmidt, 34 years ago (diff)
install -c
RevLine 
[174]1# makefile for cxref -- C cross referencing program
2#
3# Arnold Robbins, Information and Computer Science, Georgia Tech
4#       gatech!arnold
5# Copyright (c) 1985 by Arnold Robbins.
6# All rights reserved.
7# This program may not be sold, but may be distributed
8# provided this header is included.
9
10# some files are system dependant, e.g. where sort is.
11# change the appropriate macro definitions and recompile.
12
13
14### definitions of files to compile and load, and other targets for make
15
16SCANOBJS= docxref.o cscan.o
17SCANSRCS= docxref.c cscan.l
18
19CXREF = cxref
20INCLS= constdefs.h basename.c
21PROGS= docxref fmtxref cxrfilt $(CXREF)
22SRCS=  $(SCANSRCS) fmtxref.c cxrfilt.c $(CXREF).c
23DOCS=  README makefile cxref.1
24
25PRINTS= $(INCLS) $(SRCS) $(DOCS)
26
27CFLAGS= -O
28
29### system dependant definitions, change when you install cxref
30
31# for my use during development, put in my bin, but see next few lines.
[175]32DESTDIR=
33CONFDIR=/usr/athena
[174]34LIB= /usr/athena/lib/cxref
35
36# where to put the man page, use 1 instead of l if you don't have a manl.
37MANSEC=1
38
39# lex library, may be -lln on some systems
40LEXLIB= -ll
41
42# may be /bin/sort on some systems
43SORT=/usr/bin/sort
44
45# printer program, prt is for me, use pr on other systems
46P=pr
47
48# the owner and group of the installed program.  Both are 'admin' on our
49# system, but they may different on yours.
50OWNER= root
51GROUP= staff
52
53all: $(PROGS)
54        @echo " all" done
55
56docxref: $(SCANOBJS)
57        $(CC) $(SCANOBJS) $(LEXLIB) -o $@
58
59cscan.o docxref.o cxrfilt.o: $(INCLS)
60
61fmtxref: fmtxref.c
62        $(CC) $(CFLAGS) $@.c $(LDFLAGS) -o $@
63
64cxrfilt: cxrfilt.c
65        $(CC) $(CFLAGS) $@.c $(LDFLAGS) -o $@
66
67$(CXREF): $(CXREF).c
68        $(CC) $(CFLAGS) -DSRCDIR='"$(LIB)"' -DSORT='"$(SORT)"' $@.c $(LDFLAGS) -o $@
69
70print:
71        $(P) $(PRINTS) | lpr -b 'Cxref Source'
72        touch print2
73
74print2: $(PRINTS)
75        $(P) $? | lpr -b 'Cxref New Source'
76        touch print2
77
78install: $(PROGS)
[175]79        rm -fr $(DESTDIR)$(LIB)
80        rm -f $(DESTDIR)$(CONFDIR)/cxref
81        mkdir $(DESTDIR)$(LIB)
[3361]82        install -c -s -m 755 -o $(OWNER) -g $(GROUP) $(CXREF) \
[175]83                $(DESTDIR)$(CONFDIR)/$(CXREF)
[174]84        for i in docxref fmtxref cxrfilt; do \
[3361]85                install -c -s -m 755 -o $(OWNER) -g $(GROUP) $$i \
[175]86                $(DESTDIR)$(LIB)/$$i; \
[174]87        done
88
[3361]89        install -c -m 644 cxref.1 $(DESTDIR)/usr/man/man$(MANSEC)/cxref.$(MANSEC)
[174]90
91clean:
92        rm -f $(SCANOBJS)
93        rm -f $(PROGS) print2
94
95
[2157]96depend:
[2663]97        touch Make.depend; makedepend -fMake.depend ${CFLAGS} ${SRCS}
[2157]98
99# DO NOT DELETE THIS LINE -- make depend depends on it.
100
101docxref.o: docxref.c /usr/include/stdio.h /usr/include/ctype.h basename.c
102cscan.o: cscan.l constdefs.h
103fmtxref.o: fmtxref.c /usr/include/stdio.h /usr/include/ctype.h basename.c
104cxrfilt.o: cxrfilt.c /usr/include/stdio.h constdefs.h basename.c
105cxref.o: cxref.c /usr/include/stdio.h /usr/include/ctype.h
106cxref.o: /usr/include/signal.h /usr/include/sys/types.h
107cxref.o: /usr/include/sys/stat.h basename.c
Note: See TracBrowser for help on using the repository browser.