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

Revision 174, 2.1 KB checked in by treese, 38 years ago (diff)
Initial revision
Line 
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.
32DESTDIR= /usr/athena/
33LIB= /usr/athena/lib/cxref
34
35# where to put the man page, use 1 instead of l if you don't have a manl.
36MANSEC=1
37
38# lex library, may be -lln on some systems
39LEXLIB= -ll
40
41# may be /bin/sort on some systems
42SORT=/usr/bin/sort
43
44# printer program, prt is for me, use pr on other systems
45P=pr
46
47# the owner and group of the installed program.  Both are 'admin' on our
48# system, but they may different on yours.
49OWNER= root
50GROUP= staff
51
52all: $(PROGS)
53        @echo " all" done
54
55docxref: $(SCANOBJS)
56        $(CC) $(SCANOBJS) $(LEXLIB) -o $@
57
58cscan.o docxref.o cxrfilt.o: $(INCLS)
59
60fmtxref: fmtxref.c
61        $(CC) $(CFLAGS) $@.c $(LDFLAGS) -o $@
62
63cxrfilt: cxrfilt.c
64        $(CC) $(CFLAGS) $@.c $(LDFLAGS) -o $@
65
66$(CXREF): $(CXREF).c
67        $(CC) $(CFLAGS) -DSRCDIR='"$(LIB)"' -DSORT='"$(SORT)"' $@.c $(LDFLAGS) -o $@
68
69print:
70        $(P) $(PRINTS) | lpr -b 'Cxref Source'
71        touch print2
72
73print2: $(PRINTS)
74        $(P) $? | lpr -b 'Cxref New Source'
75        touch print2
76
77install: $(PROGS)
78        rm -fr $(LIB)
79        rm -f $(DESTDIR)/cxref
80        mkdir $(LIB)
81        install -s -m 755 -o $(OWNER) -g $(GROUP) $(CXREF) $(DESTDIR)/$(CXREF)
82        for i in docxref fmtxref cxrfilt; do \
83                install -s -m 755 -o $(OWNER) -g $(GROUP) $$i $(LIB)/$$i; \
84        done
85
86        install -m 644 cxref.1 /usr/man/man$(MANSEC)/cxref.$(MANSEC)
87
88clean:
89        rm -f $(SCANOBJS)
90        rm -f $(PROGS) print2
91
92
Note: See TracBrowser for help on using the repository browser.