| 1 |
# |
| 2 |
# Copyright 1993 Open Software Foundation, Inc., Cambridge, Massachusetts. |
| 3 |
# All rights reserved. |
| 4 |
# |
| 5 |
# Copyright (c) 1994 |
| 6 |
# Open Software Foundation, Inc. |
| 7 |
# |
| 8 |
# Permission is hereby granted to use, copy, modify and freely distribute |
| 9 |
# the software in this file and its documentation for any purpose without |
| 10 |
# fee, provided that the above copyright notice appears in all copies and |
| 11 |
# that both the copyright notice and this permission notice appear in |
| 12 |
# supporting documentation. Further, provided that the name of Open |
| 13 |
# Software Foundation, Inc. ("OSF") not be used in advertising or |
| 14 |
# publicity pertaining to distribution of the software without prior |
| 15 |
# written permission from OSF. OSF makes no representations about the |
| 16 |
# suitability of this software for any purpose. It is provided "as is" |
| 17 |
# without express or implied warranty. |
| 18 |
# |
| 19 |
# Copyright (c) 1996 X Consortium |
| 20 |
# Copyright (c) 1996 Dalrymple Consulting |
| 21 |
# |
| 22 |
# Permission is hereby granted, free of charge, to any person obtaining a copy |
| 23 |
# of this software and associated documentation files (the "Software"), to deal |
| 24 |
# in the Software without restriction, including without limitation the rights |
| 25 |
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell |
| 26 |
# copies of the Software, and to permit persons to whom the Software is |
| 27 |
# furnished to do so, subject to the following conditions: |
| 28 |
# |
| 29 |
# The above copyright notice and this permission notice shall be included in |
| 30 |
# all copies or substantial portions of the Software. |
| 31 |
# |
| 32 |
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR |
| 33 |
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, |
| 34 |
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE |
| 35 |
# X CONSORTIUM OR DALRYMPLE CONSULTING BE LIABLE FOR ANY CLAIM, DAMAGES OR |
| 36 |
# OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, |
| 37 |
# ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR |
| 38 |
# OTHER DEALINGS IN THE SOFTWARE. |
| 39 |
# |
| 40 |
# Except as contained in this notice, the names of the X Consortium and |
| 41 |
# Dalrymple Consulting shall not be used in advertising or otherwise to |
| 42 |
# promote the sale, use or other dealings in this Software without prior |
| 43 |
# written authorization. |
| 44 |
# |
| 45 |
# |
| 46 |
# For building 'instant'. |
| 47 |
# |
| 48 |
# J.Bowe, 1993 |
| 49 |
# |
| 50 |
# $Header: /aolnet/dev/src/CVS/sgml/docbook-to-man/Instant/Makefile,v 1.3 1999/02/23 22:21:26 db3l Exp $ |
| 51 |
# |
| 52 |
# This assumes you have the (tpt)regexp package (includes and library) |
| 53 |
# available. |
| 54 |
# |
| 55 |
# Some things you could set at your site. |
| 56 |
# XDEFINES = ... # for extra defines |
| 57 |
# REGEX_INC = -I../tptregexp # should be here with release |
| 58 |
# REGEX_LIB = ../lib/tptregexp # assumes you built it there |
| 59 |
# BINDIR = /usr/local/bin # where you keep your programs |
| 60 |
# (You should set DEF_TPT_LIB to something, or set it in general.h. |
| 61 |
# At OSF we use the default in that file.) |
| 62 |
# |
| 63 |
# -DSTRERROR to DEFINES if library does not have strerror() [ANS-db3l] |
| 64 |
# |
| 65 |
MAKE = make |
| 66 |
SHELL = /bin/sh |
| 67 |
|
| 68 |
ROOT = /usr/local |
| 69 |
|
| 70 |
TPTLIB = $(ROOT)/share/sgml/transpec |
| 71 |
REGEX_INC = -Itptregexp |
| 72 |
REGEX_LIB = tptregexp |
| 73 |
BINDIR = $(ROOT)/bin |
| 74 |
DEFINES = -DDEF_TPT_LIB=\"$(TPTLIB)\" $(XDEFINES) |
| 75 |
|
| 76 |
CC = gcc |
| 77 |
|
| 78 |
OPT = -g |
| 79 |
REGEX = -L$(REGEX_LIB) -ltptregexp |
| 80 |
|
| 81 |
CFILES = main.c util.c info.c translate.c traninit.c tranvar.c tables.c \ |
| 82 |
browse.c |
| 83 |
HFILES = general.h translate.h |
| 84 |
OBJ = main.o util.o info.o translate.o traninit.o tranvar.o tables.o \ |
| 85 |
browse.o masterVersion.o |
| 86 |
PROGS = instant |
| •87 |
LIBTPTREGEXP = tptregexp/libtptregexp.a |
| 88 |
|
| •89 |
all: $(LIBTPTREGEXP) $(PROGS) |
| •90 |
|
| 91 |
%.o : %.c |
| 92 |
$(CC) -c $(CFLAGS) $(OPT) $(REGEX_INC) $(DEFINES) $< -o $@ |
| 93 |
|
| •94 |
$(LIBTPTREGEXP): |
| 95 |
$(MAKE) -C tptregexp all |
| •96 |
|
| •97 |
instant: $(OBJ) $(LIBTPTREGEXP) |
| 98 |
$(CC) -o $@ $(LDFLAGS) $(OBJ) $(REGEX) |
| 99 |
|
| 100 |
install: all |
| 101 |
cp $(PROGS) $(BINDIR) |
| 102 |
|
| 103 |
|
| 104 |
Version: allVersion.o |
| 105 |
|
| 106 |
allVersion.c: $(HFILES) $(CFILES) Makefile |
| 107 |
co -l allVersion.c |
| 108 |
makeVersionFile $(HFILES) $(CFILES) Makefile > allVersion.c |
| 109 |
ci -u -m"new master version number" allVersion.c |
| 110 |
makeVersionFile -n instant allVersion.c > masterVersion.c |
| 111 |
|
| 112 |
|
| 113 |
clean: |
| 114 |
rm -f $(OBJ) allVersion.o lint.out core tags |
| 115 |
cd tptregexp; make clean |
| 116 |
|
| 117 |
clobber: clean |
| 118 |
rm -f $(PROGS) |
| 119 |
cd tptregexp; make clobber |
| 120 |
|
| 121 |
tags: $(CFILES) $(HFILES) |
| 122 |
ctags $(CFILES) $(HFILES) |
| 123 |
|
| 124 |
lint: |
| 125 |
gcc -Wall -Dlint $(REGEX_INC) -c $(CFILES) >lint.out 2>&1 |
| 126 |
# lint $(CFILES) > lint.out |
| 127 |
|
| 128 |
# dependencies |
| 129 |
main.o: main.c general.h |
| 130 |
util.o: util.c general.h |
| 131 |
info.o: info.c general.h |
| 132 |
translate.o: translate.c general.h translate.h |
| 133 |
traninit.o: traninit.c general.h translate.h |
| 134 |
tranvar.o: tranvar.c general.h translate.h |
| 135 |
tables.o: tables.c general.h translate.h |
| 136 |
browse.o: browse.c general.h |
| 137 |
|