*** empty log message ***
[dana/urxvt.git] / src / Makefile.in
1 # $Id: Makefile.in,v 1.6 2003-12-18 00:56:51 pcg Exp $
2 @MCOMMON@
3
4 LINT = lint -DNARROWPROTO=1 $(XINC) -chapbxz
5
6 srcdir =        @srcdir@
7 VPATH =         @srcdir@
8 .PATH:          @srcdir@
9
10 top_builddir = ..
11 basedir = ..
12 thisdir = src
13 MKDIR = @top_srcdir@/autoconf/mkinstalldirs
14
15 SUPLIB = -lsupc++
16
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@
23
24 first_rule: all
25 dummy:
26
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 rxvtvec.C iom.C
31
32 SRCS =  rxvt.C $(LIBSRCS)
33
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         rxvtvec.h iom.h
37
38 EXTRAHDRS = rxvtlib.h rxvtdaemon.h
39
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 rxvtvec.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 rxvtvec.lo iom.lo
48
49 LIBVERSION = @LIBVERSION@
50 INSTALL_LIBRXVT = @INSTALL_LIBRXVT@
51
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)
60
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
66
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
72
73 DEPS =  rxvt.h rxvtlib.h ${basedir}/config.h feature.h .protos
74
75 #
76 # Distribution variables
77 #
78
79 DIST = $(HDRS) $(SRCS) Makefile.in gcc-Wall rxvtlib.h.in .indent.pro \
80         makeintprotos-awk makeextprotos-awk $(INTPROS) $(EXTPROS) .protos
81
82 .SUFFIXES:      .C .o .extpro .intpro .lo
83
84 #-------------------------------------------------------------------------
85 # inference rules
86 .C.o:
87         $(COMPILE) -c $<
88
89 .C.lo:
90         $(LIBTOOL) --mode=compile $(COMPILE) -c $<
91
92 .s.lo:
93         $(LIBTOOL) --mode=compile $(COMPILE) -c $<
94
95 .S.lo:
96         $(LIBTOOL) --mode=compile $(COMPILE) -c $<
97
98 .C.intpro:
99         @$(RMF) $@.tmp
100         @$(AWK) -f $(srcdir)/makeintprotos-awk $< > $@.tmp
101         @if $(CMP) -s $@ $@.tmp ; then : ; else $(ECHO) "$(AWK) -f $(srcdir)/makeintprotos-awk $< > $@"; $(CP) $@.tmp $@; fi
102         @$(RMF) $@.tmp
103
104 .C.extpro:
105         @$(RMF) $@.tmp
106         @$(AWK) -f $(srcdir)/makeextprotos-awk $< > $@.tmp
107         @if $(CMP) -s $@ $@.tmp ; then : ; else $(ECHO) "$(AWK) -f $(srcdir)/makeextprotos-awk $< > $@"; $(CP) $@.tmp $@; fi
108         @$(RMF) $@.tmp
109 #-------------------------------------------------------------------------
110 all: allbin
111
112 rxvt: version.h rxvt.o librxvt.la
113         $(LIBTOOL) --mode=link $(LINK) rxvt.o librxvt.la $(LIBS) $(XLIB) $(DLIB) $(SUPLIB) -o $@
114
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 $@
117
118 rxvtc: version.h rxvtc.o rxvtdaemon.o
119         $(LIBTOOL) --mode=link $(LINK) rxvtc.o rxvtdaemon.o $(LIBS) $(DLIB) $(SUPLIB) -o $@
120
121 .protos: $(EXTPROS)
122         @$(RMF) .protos
123         date >.protos
124
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)
130
131 allbin: .protos rxvt rxvtd rxvtc
132
133 alldoc:
134
135 clean:
136         $(RMF) rxvt rxvtc rxvtd core a.out *.o *.lo *.bak *~ *.intpro *.extpro .libs/* librxvt.la tmpproto .protos *.tmp
137
138 realclean: clean
139         $(RMF) tags librxvt.h
140
141 cleandir: realclean
142
143 distclean: realclean
144         if test $(srcdir) = .; then $(MAKE) realclean; fi
145         (cd $(srcdir); $(RMF) Makefile)
146
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; \
154         fi
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)
164
165 uninstall:
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; \
175         fi
176
177 distdirs:
178         mkdir $(basedir)/../$(VERNAME)/$(thisdir)
179
180 distcopy: .protos $(INTPROS)
181         $(CP) -p $(DIST) $(basedir)/../$(VERNAME)/$(thisdir)
182
183 # -----------------------------------------------------------------------
184 # DO NOT DELETE: nice dependency list follows
185 #
186
187 defaultfont.h: encoding.h rxvtvec.h
188 rxvtlib.h: rxvtcolor.h defaultfont.h
189 rxvtdaemon.o:       rxvtdaemon.C        rxvtdaemon.h
190 rxvtd.o:            rxvtd.C     $(DEPS) rxvtdaemon.h rxvtvec.h
191 rxvtc.o:            rxvtc.C     $(DEPS) rxvtdaemon.h rxvtvec.h
192
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
216
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
240
241