| 1 |
# $Id: Makefile.in 709 2009-07-04 05:29:28Z dhiebert $ |
| 2 |
# |
| 3 |
# Makefile for UNIX-like platforms. |
| 4 |
# |
| 5 |
|
| 6 |
# These are the names of the installed programs, in case you wish to change |
| 7 |
# them. |
| 8 |
# |
| 9 |
CTAGS_PROG = ctags |
| 10 |
ETAGS_PROG = etags |
| 11 |
|
| 12 |
# Set this to the path to your shell (must run Bourne shell commands). |
| 13 |
# |
| 14 |
SHELL = /bin/sh |
| 15 |
|
| 16 |
# GNU Autoconf variables. These are set by the "configure" script when it |
| 17 |
# runs. |
| 18 |
# |
| 19 |
exec_prefix = @exec_prefix@ |
| 20 |
datarootdir = @datarootdir@ |
| 21 |
prefix = @prefix@ |
| 22 |
bindir = @bindir@ |
| 23 |
srcdir = @srcdir@ |
| 24 |
libdir = @libdir@ |
| 25 |
incdir = @includedir@ |
| 26 |
mandir = @mandir@ |
| 27 |
SLINK = @LN_S@ |
| 28 |
STRIP = @STRIP@ |
| 29 |
CC = @CC@ |
| 30 |
DEFS = @DEFS@ |
| 31 |
CFLAGS = @CFLAGS@ |
| 32 |
LDFLAGS = @LDFLAGS@ |
| 33 |
LIBS = @LIBS@ |
| 34 |
EXEEXT = @EXEEXT@ |
| 35 |
OBJEXT = @OBJEXT@ |
| 36 |
|
| 37 |
# If you cannot run the "configure" script to set the variables above, then |
| 38 |
# uncomment the defines below and customize them for your environment. If |
| 39 |
# your system does not support symbolic (soft) links, then remove the -s |
| 40 |
# from SLINK. |
| 41 |
# |
| 42 |
#srcdir = . |
| 43 |
#bindir = /usr/local/bin |
| 44 |
#mandir = /usr/local/man |
| 45 |
#SLINK = ln -s |
| 46 |
#STRIP = strip |
| 47 |
#CC = cc |
| 48 |
#DEFS = -DHAVE_CONFIG_H |
| 49 |
#CFLAGS = -O |
| 50 |
#LDFLAGS= |
| 51 |
|
| 52 |
include $(srcdir)/source.mak |
| 53 |
|
| 54 |
# |
| 55 |
#--- You should not need to modify anything below this line. ---# |
| 56 |
# |
| 57 |
|
| 58 |
.SUFFIXES: |
| 59 |
.SUFFIXES: .c .$(OBJEXT) |
| 60 |
|
| 61 |
VPATH = $(srcdir) |
| 62 |
|
| 63 |
INSTALL = cp |
| 64 |
INSTALL_PROG = $(INSTALL) |
| 65 |
INSTALL_DATA = $(INSTALL) |
| 66 |
|
| 67 |
READ_LIB = readtags.$(OBJEXT) |
| 68 |
READ_INC = readtags.h |
| 69 |
|
| 70 |
MANPAGE = ctags.1 |
| 71 |
|
| 72 |
AUTO_GEN = configure config.h.in |
| 73 |
CONFIG_GEN = config.cache config.log config.status config.run config.h Makefile |
| 74 |
|
| 75 |
# |
| 76 |
# names for installed man pages |
| 77 |
# |
| 78 |
manext = 1 |
| 79 |
man1dir = $(mandir)/man1 |
| 80 |
CMAN = $(CTAGS_PROG).$(manext) |
| 81 |
EMAN = $(ETAGS_PROG).$(manext) |
| 82 |
|
| 83 |
# |
| 84 |
# destinations for installed files |
| 85 |
# |
| 86 |
CTAGS_EXEC = $(CTAGS_PROG)$(EXEEXT) |
| 87 |
ETAGS_EXEC = $(ETAGS_PROG)$(EXEEXT) |
| 88 |
DEST_CTAGS = $(bindir)/$(CTAGS_EXEC) |
| 89 |
DEST_ETAGS = $(bindir)/$(ETAGS_EXEC) |
| 90 |
DEST_READ_LIB = $(libdir)/$(READ_LIB) |
| 91 |
DEST_READ_INC = $(incdir)/$(READ_INC) |
| 92 |
DEST_CMAN = $(man1dir)/$(CMAN) |
| 93 |
DEST_EMAN = $(man1dir)/$(EMAN) |
| 94 |
|
| 95 |
# |
| 96 |
# primary rules |
| 97 |
# |
| 98 |
all: $(CTAGS_EXEC) $(READ_LIB) |
| 99 |
|
| 100 |
$(CTAGS_EXEC): $(OBJECTS) |
| 101 |
$(CC) $(LDFLAGS) -o $@ $(OBJECTS) $(LIBS) |
| 102 |
|
| 103 |
dctags$(EXEEXT): debug.c $(SOURCES) $(HEADERS) |
| 104 |
$(CC) -I. -I$(srcdir) $(DEFS) -DDEBUG -g $(LDFLAGS) -o $@ debug.c $(SOURCES) |
| 105 |
|
| 106 |
readtags$(EXEEXT): readtags.c readtags.h |
| 107 |
$(CC) -DREADTAGS_MAIN -I. -I$(srcdir) $(DEFS) $(CFLAGS) $(LDFLAGS) -o $@ readtags.c |
| 108 |
|
| 109 |
ETYPEREF_OBJS = etyperef.o keyword.o routines.o strlist.o vstring.o |
| 110 |
etyperef$(EXEEXT): $(ETYPEREF_OBJS) |
| 111 |
$(CC) $(LDFLAGS) -o $@ $(ETYPEREF_OBJS) |
| 112 |
|
| 113 |
etyperef.o: eiffel.c |
| 114 |
$(CC) -DTYPE_REFERENCE_TOOL -I. -I$(srcdir) $(DEFS) $(CFLAGS) -o $@ -c eiffel.c |
| 115 |
|
| 116 |
$(OBJECTS): $(HEADERS) config.h |
| 117 |
|
| 118 |
# |
| 119 |
# generic install rules |
| 120 |
# |
| 121 |
install: @install_targets@ |
| 122 |
|
| 123 |
install-strip: install |
| 124 |
|
| 125 |
install-ctags: install-cbin install-cman |
| 126 |
install-etags: install-ebin install-eman |
| 127 |
|
| 128 |
$(bindir) $(man1dir) $(libdir) $(incdir): |
| 129 |
$(srcdir)/mkinstalldirs $@ |
| 130 |
|
| 131 |
FORCE: |
| 132 |
|
| 133 |
# |
| 134 |
# install the executables |
| 135 |
# |
| 136 |
install-bin: install-cbin install-ebin install-lib |
| 137 |
install-cbin: $(DEST_CTAGS) |
| 138 |
install-ebin: $(DEST_ETAGS) |
| 139 |
install-lib: $(DEST_READ_LIB) $(DEST_READ_INC) |
| 140 |
|
| 141 |
$(DEST_CTAGS): $(CTAGS_EXEC) $(bindir) FORCE |
| 142 |
$(INSTALL_PROG) $(CTAGS_EXEC) $@ && chmod 755 $@ |
| 143 |
|
| 144 |
$(DEST_ETAGS): |
| 145 |
- if [ -x $(DEST_CTAGS) ]; then \ |
| 146 |
cd $(bindir) && $(SLINK) $(CTAGS_EXEC) $(ETAGS_EXEC); \ |
| 147 |
fi |
| 148 |
|
| 149 |
# |
| 150 |
# install the man pages |
| 151 |
# |
| 152 |
install-man: install-cman install-eman |
| 153 |
install-cman: $(DEST_CMAN) |
| 154 |
install-eman: $(DEST_EMAN) |
| 155 |
|
| 156 |
$(DEST_CMAN): $(man1dir) $(MANPAGE) FORCE |
| 157 |
- $(INSTALL_DATA) $(srcdir)/$(MANPAGE) $@ && chmod 644 $@ |
| 158 |
|
| 159 |
$(DEST_EMAN): |
| 160 |
- if [ -f $(DEST_CMAN) ]; then \ |
| 161 |
cd $(man1dir) && $(SLINK) $(CMAN) $(EMAN); \ |
| 162 |
fi |
| 163 |
|
| 164 |
# |
| 165 |
# install the library |
| 166 |
# |
| 167 |
$(DEST_READ_LIB): $(READ_LIB) $(libdir) FORCE |
| 168 |
$(INSTALL_PROG) $(READ_LIB) $@ && chmod 644 $@ |
| 169 |
|
| 170 |
$(DEST_READ_INC): $(READ_INC) $(incdir) FORCE |
| 171 |
$(INSTALL_PROG) $(READ_INC) $@ && chmod 644 $@ |
| 172 |
|
| 173 |
|
| 174 |
# |
| 175 |
# rules for uninstalling |
| 176 |
# |
| 177 |
uninstall: uninstall-bin uninstall-lib uninstall-man |
| 178 |
|
| 179 |
uninstall-bin: |
| 180 |
- rm -f $(DEST_CTAGS) $(DEST_ETAGS) |
| 181 |
|
| 182 |
uninstall-lib: |
| 183 |
- rm -f $(DEST_READ_LIB) $(DEST_READ_INC) |
| 184 |
|
| 185 |
uninstall-man: |
| 186 |
- rm -f $(DEST_CMAN) $(DEST_EMAN) |
| 187 |
|
| 188 |
uninstall-ctags: |
| 189 |
- rm -f $(DEST_CTAGS) $(DEST_CMAN) |
| 190 |
|
| 191 |
uninstall-etags: |
| 192 |
- rm -f $(DEST_ETAGS) $(DEST_EMAN) |
| 193 |
|
| 194 |
# |
| 195 |
# miscellaneous rules |
| 196 |
# |
| 197 |
tags: $(CTAGS_EXEC) |
| 198 |
./$(CTAGS_EXEC) $(srcdir)/* |
| 199 |
|
| 200 |
TAGS: $(CTAGS_EXEC) |
| 201 |
./$(CTAGS_EXEC) -e $(srcdir)/* |
| 202 |
|
| 203 |
clean: |
| 204 |
rm -f $(OBJECTS) $(CTAGS_EXEC) tags TAGS $(READ_LIB) |
| 205 |
rm -f dctags$(EXEEXT) readtags$(EXEEXT) |
| 206 |
rm -f etyperef$(EXEEXT) etyperef.$(OBJEXT) |
| 207 |
|
| 208 |
mostlyclean: clean |
| 209 |
|
| 210 |
distclean: clean |
| 211 |
rm -f $(CONFIG_GEN) |
| 212 |
|
| 213 |
maintainerclean: distclean |
| 214 |
rm -f $(AUTO_GEN) |
| 215 |
|
| 216 |
# |
| 217 |
# implicit rules |
| 218 |
# |
| 219 |
.c.$(OBJEXT): |
| 220 |
$(CC) -I. -I$(srcdir) $(DEFS) $(CFLAGS) -c $< |
| 221 |
|
| 222 |
# vi:set tabstop=8: |