1 # $Id: Makefile.in,v 1.8 2004-01-17 01:20:01 pcg Exp $
4 LINT = lint -DNARROWPROTO=1 $(XINC) -chapbxz
13 MKDIR = @top_srcdir@/autoconf/mkinstalldirs
15 SUPLIB = -fno-exceptions -lsupc++ # TODO: only for g++
17 # for developers: the following debug options may be used
18 # -DDEBUG_CMD -DDEBUG_MAIN -DDEBUG_MENU -DDEBUG_MENUARROWS
19 # -DDEBUG_MENUBAR_STACKING -DDEBUG_MENU_LAYOUT -DDEBUG_RESOURCES
20 # -DDEBUG_SCREEN -DDEBUG_SEARCH_PATH -DDEBUG_SELECT -DDEBUG_SIZE
21 # -DDEBUG_TTY -DDEBUG_TTYMODE -DDEBUG_X
22 DEBUG=-DDEBUG_STRICT @DEBUG@
27 LIBSRCS = command.C defaultfont.C graphics.C grkelot.C init.C logging.C \
28 main.C menubar.C misc.C netdisp.C ptytty.C screen.C scrollbar.C \
29 scrollbar-rxvt.C scrollbar-next.C scrollbar-xterm.C strings.C \
30 xdefaults.C xpm.C encoding.C rxvtcolor.C rxvtstl.C iom.C
32 SRCS = rxvt.C $(LIBSRCS)
34 HDRS = command.h defaultfont.h feature.h grkelot.h init.h logging.h \
35 menubar.h netdisp.h protos.h rxvt.h rxvtgrx.h version.h encoding.h \
36 rxvtstl.h iom.h iom_conf.h
38 EXTRAHDRS = rxvtlib.h rxvtdaemon.h
40 OBJS = command.o defaultfont.o init.o graphics.o grkelot.o logging.o \
41 main.o menubar.o misc.o netdisp.o ptytty.o screen.o \
42 scrollbar.o scrollbar-next.o scrollbar-rxvt.o scrollbar-xterm.o \
43 strings.o xdefaults.o xpm.o rxvt.o encoding.o rxvtcolor.o rxvtstl.o iom.o
44 LIBOBJS = command.lo defaultfont.lo init.lo graphics.lo grkelot.lo logging.lo \
45 main.lo menubar.lo misc.lo netdisp.lo ptytty.lo screen.lo \
46 scrollbar.lo scrollbar-next.lo scrollbar-rxvt.lo scrollbar-xterm.lo \
47 strings.lo xdefaults.lo xpm.lo encoding.lo rxvt.lo rxvtcolor.lo rxvtstl.lo iom.lo
49 LIBVERSION = @LIBVERSION@
50 INSTALL_LIBRXVT = @INSTALL_LIBRXVT@
52 RXVT_BASENAME=`$(ECHO) $(RXVTNAME)|$(SED) 's/$(EXEEXT)$$//'|$(SED) '$(transform)'`
53 RXVT_BINNAME=$(DESTDIR)$(bindir)/$(RXVT_BASENAME)$(EXEEXT)
54 RXVT_VERNAME=$(DESTDIR)$(bindir)/$(RXVT_BASENAME)-$(VERSION)$(EXEEXT)
55 RXVTC_BINNAME=$(DESTDIR)$(bindir)/$(RXVT_BASENAME)c$(EXEEXT)
56 RXVTC_VERNAME=$(DESTDIR)$(bindir)/$(RXVT_BASENAME)c-$(VERSION)$(EXEEXT)
57 RXVTD_BINNAME=$(DESTDIR)$(bindir)/$(RXVT_BASENAME)d$(EXEEXT)
58 RXVTD_VERNAME=$(DESTDIR)$(bindir)/$(RXVT_BASENAME)d-$(VERSION)$(EXEEXT)
59 RXVT_OLDNAME=$(DESTDIR)$(bindir)/$(RXVT_BASENAME)-old$(EXEEXT)
61 EXTPROS = command.extpro defaultfont.extpro graphics.extpro grkelot.extpro \
62 init.extpro logging.extpro main.extpro menubar.extpro misc.extpro \
63 netdisp.extpro ptytty.extpro screen.extpro scrollbar.extpro \
64 scrollbar-rxvt.extpro scrollbar-next.extpro scrollbar-xterm.extpro \
65 strings.extpro xdefaults.extpro xpm.extpro
67 INTPROS = command.intpro defaultfont.intpro graphics.intpro grkelot.intpro \
68 init.intpro logging.intpro main.intpro menubar.intpro misc.intpro \
69 netdisp.intpro ptytty.intpro screen.intpro scrollbar.intpro \
70 scrollbar-rxvt.intpro scrollbar-next.intpro scrollbar-xterm.intpro \
71 strings.intpro xdefaults.intpro xpm.intpro
73 DEPS = rxvt.h rxvtlib.h ${basedir}/config.h feature.h .protos
76 # Distribution variables
79 DIST = $(HDRS) $(SRCS) Makefile.in gcc-Wall rxvtlib.h.in .indent.pro \
80 makeintprotos-awk makeextprotos-awk $(INTPROS) $(EXTPROS) .protos
82 .SUFFIXES: .C .o .extpro .intpro .lo
84 #-------------------------------------------------------------------------
90 $(LIBTOOL) --mode=compile $(COMPILE) -c $<
93 $(LIBTOOL) --mode=compile $(COMPILE) -c $<
96 $(LIBTOOL) --mode=compile $(COMPILE) -c $<
100 @$(AWK) -f $(srcdir)/makeintprotos-awk $< > $@.tmp
101 @if $(CMP) -s $@ $@.tmp ; then : ; else $(ECHO) "$(AWK) -f $(srcdir)/makeintprotos-awk $< > $@"; $(CP) $@.tmp $@; fi
106 @$(AWK) -f $(srcdir)/makeextprotos-awk $< > $@.tmp
107 @if $(CMP) -s $@ $@.tmp ; then : ; else $(ECHO) "$(AWK) -f $(srcdir)/makeextprotos-awk $< > $@"; $(CP) $@.tmp $@; fi
109 #-------------------------------------------------------------------------
112 rxvt: version.h rxvt.o librxvt.la
113 $(LIBTOOL) --mode=link $(LINK) rxvt.o librxvt.la $(LIBS) $(XLIB) $(DLIB) $(SUPLIB) -o $@
115 rxvtd: version.h rxvtd.o librxvt.la rxvtdaemon.o
116 $(LIBTOOL) --mode=link $(LINK) rxvtd.o rxvtdaemon.o librxvt.la $(LIBS) $(XLIB) $(DLIB) $(SUPLIB) -o $@
118 rxvtc: version.h rxvtc.o rxvtdaemon.o
119 $(LIBTOOL) --mode=link $(LINK) rxvtc.o rxvtdaemon.o $(LIBS) $(DLIB) $(SUPLIB) -o $@
125 librxvt.la: $(LIBOBJS)
126 $(LIBTOOL) --mode=link $(LINK) -rpath $(libdir) -version-info $(LIBVERSION) $(LIBOBJS) $(LIBS) $(SUPLIB) -o $@
127 #-------------------------------------------------------------------------
128 tags: $(SRCS) $(HDRS) $(EXTRAHDRS)
129 ctags $(SRCS) $(HDRS) $(EXTRAHDRS)
131 allbin: .protos rxvt rxvtd rxvtc
136 $(RMF) rxvt rxvtc rxvtd core a.out *.o *.lo *.bak *~ *.intpro *.extpro .libs/* librxvt.la tmpproto .protos *.tmp
139 $(RMF) tags librxvt.h
144 if test $(srcdir) = .; then $(MAKE) realclean; fi
145 (cd $(srcdir); $(RMF) Makefile)
147 install: allbin alldoc
148 $(MKDIR) $(DESTDIR)$(includedir) $(DESTDIR)$(libdir) $(DESTDIR)$(bindir)
149 @if test x$(INSTALL_LIBRXVT) = xyes; then \
150 $(ECHO) "$(LIBTOOL) --mode=install $(INSTALL_DATA) rxvtlib.h $(DESTDIR)$(includedir)/rxvtlib.h"; \
151 $(LIBTOOL) --mode=install $(INSTALL_DATA) rxvtlib.h $(DESTDIR)$(includedir)/rxvtlib.h; \
152 $(ECHO) "$(LIBTOOL) --mode=install $(INSTALL_PROGRAM) librxvt.la $(DESTDIR)$(libdir)/librxvt.la"; \
153 $(LIBTOOL) --mode=install $(INSTALL_PROGRAM) librxvt.la $(DESTDIR)$(libdir)/librxvt.la; \
155 $(RMF) $(RXVT_BINNAME)
156 $(RMF) $(RXVTC_BINNAME)
157 $(RMF) $(RXVTD_BINNAME)
158 $(LIBTOOL) --mode=install $(INSTALL_PROGRAM) rxvt $(RXVT_VERNAME)
159 $(LIBTOOL) --mode=install $(INSTALL_PROGRAM) rxvtc $(RXVTC_VERNAME)
160 $(LIBTOOL) --mode=install $(INSTALL_PROGRAM) rxvtd $(RXVTD_VERNAME)
161 $(LN) $(RXVT_VERNAME) $(RXVT_BINNAME)
162 $(LN) $(RXVTC_VERNAME) $(RXVTC_BINNAME)
163 $(LN) $(RXVTD_VERNAME) $(RXVTD_BINNAME)
166 @$(ECHO) $(RMF) $(RXVT_VERNAME)
167 @$(RMF) $(RXVT_VERNAME)
168 @$(ECHO) "$(LIBTOOL) --mode=uninstall $(RMF) $(RXVT_BINNAME)"
169 @$(LIBTOOL) --mode=uninstall $(RMF) $(RXVT_BINNAME)
170 @if test x$(INSTALL_LIBRXVT) = xyes; then \
171 $(ECHO) "$(LIBTOOL) --mode=uninstall $(RMF) $(DESTDIR)$(libdir)/librxvt.la"; \
172 $(LIBTOOL) --mode=uninstall $(RMF) $(DESTDIR)$(libdir)/librxvt.la; \
173 $(ECHO) "$(LIBTOOL) --mode=uninstall $(RMF) $(DESTDIR)$(includedir)/rxvtlib.h"; \
174 $(LIBTOOL) --mode=uninstall $(RMF) $(DESTDIR)$(includedir)/rxvtlib.h; \
178 mkdir $(basedir)/../$(VERNAME)/$(thisdir)
180 distcopy: .protos $(INTPROS)
181 $(CP) -p $(DIST) $(basedir)/../$(VERNAME)/$(thisdir)
183 # -----------------------------------------------------------------------
184 # DO NOT DELETE: nice dependency list follows
187 defaultfont.h: encoding.h rxvtstl.h
188 rxvtlib.h: rxvtcolor.h defaultfont.h
189 rxvtdaemon.o: rxvtdaemon.C rxvtdaemon.h
190 rxvtd.o: rxvtd.C $(DEPS) rxvtdaemon.h rxvtstl.h
191 rxvtc.o: rxvtc.C $(DEPS) rxvtdaemon.h rxvtstl.h
193 command.o: command.C $(DEPS) command.intpro command.h version.h
194 defaultfont.o: defaultfont.C $(DEPS) defaultfont.intpro defaultfont.h
195 graphics.o: graphics.C $(DEPS) graphics.intpro
196 grkelot.o: grkelot.C $(DEPS) grkelot.intpro grkelot.h
197 init.o: init.C $(DEPS) init.intpro init.h defaultfont.h
198 logging.o: logging.C $(DEPS) logging.intpro logging.h
199 main.o: main.C $(DEPS) main.intpro
200 menubar.o: menubar.C $(DEPS) menubar.intpro menubar.h version.h
201 misc.o: misc.C $(DEPS) misc.intpro
202 netdisp.o: netdisp.C $(DEPS) netdisp.intpro netdisp.h
203 ptytty.o: ptytty.C $(DEPS) ptytty.intpro
204 rxvt.o: rxvt.C $(DEPS)
205 screen.o: screen.C $(DEPS) screen.intpro defaultfont.h
206 scrollbar.o: scrollbar.C $(DEPS) scrollbar.intpro
207 scrollbar-rxvt.o: scrollbar-rxvt.C $(DEPS) scrollbar-rxvt.intpro
208 scrollbar-next.o: scrollbar-next.C $(DEPS) scrollbar-next.intpro
209 scrollbar-xterm.o: scrollbar-xterm.C $(DEPS) scrollbar-xterm.intpro
210 strings.o: strings.C $(DEPS) strings.intpro
211 xdefaults.o: xdefaults.C $(DEPS) xdefaults.intpro version.h
212 xpm.o: xpm.C $(DEPS) xpm.intpro
213 encoding.o: encoding.C $(DEPS) encoding.h
214 rxvtcolor.o: rxvtcolor.C $(DEPS)
215 iom.o: iom.C $(DEPS) iom.h
217 command.lo: command.C $(DEPS) command.intpro command.h version.h
218 defaultfont.lo: defaultfont.C $(DEPS) defaultfont.intpro defaultfont.h encoding.h
219 graphics.lo: graphics.C $(DEPS) graphics.intpro defaultfont.h
220 grkelot.lo: grkelot.C $(DEPS) grkelot.intpro grkelot.h
221 init.lo: init.C $(DEPS) init.intpro init.h
222 logging.lo: logging.C $(DEPS) logging.intpro logging.h
223 main.lo: main.C $(DEPS) main.intpro
224 menubar.lo: menubar.C $(DEPS) menubar.intpro menubar.h version.h
225 misc.lo: misc.C $(DEPS) misc.intpro
226 netdisp.lo: netdisp.C $(DEPS) netdisp.intpro netdisp.h
227 ptytty.lo: ptytty.C $(DEPS) ptytty.intpro
228 rxvt.lo: rxvt.C $(DEPS)
229 screen.lo: screen.C $(DEPS) screen.intpro defaultfont.h
230 scrollbar.lo: scrollbar.C $(DEPS) scrollbar.intpro
231 scrollbar-rxvt.lo: scrollbar-rxvt.C $(DEPS) scrollbar-rxvt.intpro
232 scrollbar-next.lo: scrollbar-next.C $(DEPS) scrollbar-next.intpro
233 scrollbar-xterm.lo: scrollbar-xterm.C $(DEPS) scrollbar-xterm.intpro
234 strings.lo: strings.C $(DEPS) strings.intpro
235 xdefaults.lo: xdefaults.C $(DEPS) xdefaults.intpro version.h
236 xpm.lo: xpm.C $(DEPS) xpm.intpro
237 encoding.lo: encoding.C $(DEPS) encoding.h
238 rxvtcolor.lo: rxvtcolor.C $(DEPS)
239 iom.lo: iom.C $(DEPS) iom.h