Rename libcom_err to libafscom_err
[openafs.git] / src / gtx / Makefile.in
1 # Copyright 2000, International Business Machines Corporation and others.
2 # All Rights Reserved.
3
4 # This software has been released under the terms of the IBM Public
5 # License.  For details, see the LICENSE file in the top-level source
6 # directory or online at http://www.openafs.org/dl/license10.html
7
8 # Makefile for gtx, a display-independent, object-oriented window toolkit.
9
10 srcdir=@srcdir@
11 include @TOP_OBJDIR@/src/config/Makefile.config
12 include @TOP_OBJDIR@/src/config/Makefile.lwp
13
14 INSTALL = @INSTALL@
15 INSTALL_DATA = @INSTALL_DATA@
16 INSTALL_PROGRAM = @INSTALL_PROGRAM@
17 INSTALL_SCRIPT = @INSTALL_SCRIPT@
18
19 INCLS=gtxobjects.h \
20         gtxwindows.h \
21         gtxcurseswin.h \
22         gtxinput.h \
23         gtxdumbwin.h \
24         gtxX11win.h \
25         gtxobjects.h \
26         gtxkeymap.h \
27         gtxlightobj.h \
28         gtxtextobj.h \
29         gtxframe.h \
30         gtxobjdict.h \
31         ${TOP_INCDIR}/afs/keys.h \
32         ${TOP_INCDIR}/afs/cellconfig.h \
33         ${TOP_INCDIR}/afs/cmd.h
34
35 LIBS=\
36         ${TOP_LIBDIR}/librx.a \
37         ${TOP_LIBDIR}/liblwp.a \
38         ${TOP_LIBDIR}/libsys.a \
39         ${TOP_LIBDIR}/libcmd.a \
40         ${TOP_LIBDIR}/libkauth.a \
41         ${TOP_LIBDIR}/libauth.a \
42         ${TOP_LIBDIR}/librxkad.a \
43         ${TOP_LIBDIR}/libafscom_err.a \
44         ${TOP_LIBDIR}/util.a
45
46 EXTRA_LIBS=${LIB_curses} ${XLIBS}
47
48 KEYMAP_SRCS=keymap.c input.c frame.c
49
50 KEYMAP_OBJS=keymap.o input.o frame.o
51
52 WINDOW_SRCS=curseswindows.c \
53         dumbwindows.c \
54         X11windows.c \
55         windows.c
56
57 WINDOW_OBJS=curseswindows.o \
58         dumbwindows.o \
59         X11windows.o \
60         windows.o
61
62 OBJECT_SRCS=objects.c \
63         lightobject.c \
64         textobject.c
65
66 OBJECT_OBJS=objects.o \
67         lightobject.o \
68         textobject.o
69
70 DICT_SRCS=objdict.c
71 DICT_OBJS=objdict.o
72
73 CB_SRCS=textcb.c
74 CB_OBJS=textcb.o
75
76 all: gtxtest \
77         ${TOP_LIBDIR}/libgtx.a \
78         ${TOP_INCDIR}/afs/gtxcurseswin.h \
79         ${TOP_INCDIR}/afs/gtxdumbwin.h \
80         ${TOP_INCDIR}/afs/gtxframe.h \
81         ${TOP_INCDIR}/afs/gtxinput.h \
82         ${TOP_INCDIR}/afs/gtxkeymap.h \
83         ${TOP_INCDIR}/afs/gtxlightobj.h \
84         ${TOP_INCDIR}/afs/gtxobjdict.h \
85         ${TOP_INCDIR}/afs/gtxobjects.h \
86         ${TOP_INCDIR}/afs/gtxtextcb.h \
87         ${TOP_INCDIR}/afs/gtxtextobj.h \
88         ${TOP_INCDIR}/afs/gtxwindows.h \
89         ${TOP_INCDIR}/afs/gtxX11win.h
90
91 ${TOP_LIBDIR}/libgtx.a: libgtx.a
92         ${INSTALL_DATA} $? $@
93
94 ${TOP_INCDIR}/afs/gtxcurseswin.h: gtxcurseswin.h
95         ${INSTALL_DATA} $? $@
96
97 ${TOP_INCDIR}/afs/gtxdumbwin.h: gtxdumbwin.h
98         ${INSTALL_DATA} $? $@
99
100 ${TOP_INCDIR}/afs/gtxframe.h: gtxframe.h
101         ${INSTALL_DATA} $? $@
102
103 ${TOP_INCDIR}/afs/gtxinput.h: gtxinput.h
104         ${INSTALL_DATA} $? $@
105
106 ${TOP_INCDIR}/afs/gtxkeymap.h: gtxkeymap.h
107         ${INSTALL_DATA} $? $@
108
109 ${TOP_INCDIR}/afs/gtxlightobj.h: gtxlightobj.h
110         ${INSTALL_DATA} $? $@
111
112 ${TOP_INCDIR}/afs/gtxobjdict.h: gtxobjdict.h
113         ${INSTALL_DATA} $? $@
114
115 ${TOP_INCDIR}/afs/gtxobjects.h: gtxobjects.h
116         ${INSTALL_DATA} $? $@
117
118 ${TOP_INCDIR}/afs/gtxtextcb.h: gtxtextcb.h
119         ${INSTALL_DATA} $? $@
120
121 ${TOP_INCDIR}/afs/gtxtextobj.h: gtxtextobj.h
122         ${INSTALL_DATA} $? $@
123
124 ${TOP_INCDIR}/afs/gtxwindows.h: gtxwindows.h
125         ${INSTALL_DATA} $? $@
126
127 ${TOP_INCDIR}/afs/gtxX11win.h: gtxX11win.h
128         ${INSTALL_DATA} $? $@
129
130 tests: object_test screen_test curses_test cb_test gtxtest
131
132 # All objects in the library
133 LIBSRCS = ${KEYMAP_SRCS} ${WINDOW_SRCS} ${OBJECT_SRCS} ${DICT_SRCS} ${CB_SRCS}
134 LIBOBJS = $(KEYMAP_OBJS) ${WINDOW_OBJS} ${OBJECT_OBJS} ${DICT_OBJS} ${CB_OBJS}
135
136 ${LIBSRCS}: ${INCLS}
137 $(LIBOBJS): ${INCLS}
138
139 keymap.o: keymap.c ${INCLS}
140
141 frame.o: frame.c $(INCLS)
142
143 input.o: input.c ${INCLS}
144
145 curseswindows.o: curseswindows.c ${INCLS}
146
147 dumbwindows.o: dumbwindows.c ${INCLS}
148
149 X11windows.o: X11windows.c ${INCLS}
150
151 windows.o: windows.c ${INCLS}
152
153 lightobject.o: lightobject.c ${INCLS}
154
155 textobject.o: textobject.c ${INCLS}
156
157 textcb.o: textcb.c ${INCLS}
158
159 #
160 # Test programs.
161 #
162 curses_test.o: curses_test.c ${INCLS} AFS_component_version_number.o
163
164 curses_test: curses_test.o $(LIBS)
165         $(AFS_LDRULE) curses_test.o $(LIBS) ${EXTRA_LIBS}
166
167 screen_test.o: screen_test.c ${INCLS} AFS_component_version_number.o
168
169 screen_test: screen_test.o ${WINDOW_OBJS} ${LIBS}
170         $(AFS_LDRULE) screen_test.o ${WINDOW_OBJS} ${LIBS} ${EXTRA_LIBS}
171
172 cb_test.o: cb_test.c ${INCLS} AFS_component_version_number.o
173
174 cb_test: cb_test.o ${CB_OBJS} ${LIBS}
175         $(AFS_LDRULE) cb_test.o ${CB_OBJS} ${LIBS} ${EXTRA_LIBS}
176
177 gtxtest.o: gtxtest.c ${INCLS} AFS_component_version_number.o
178
179 gtxtest: gtxtest.o libgtx.a ${LIBS}
180         $(AFS_LDRULE) gtxtest.o libgtx.a ${LIBS} ${EXTRA_LIBS}
181
182 object_test.o: object_test.c ${INCLS} AFS_component_version_number.o
183
184 object_test: object_test.o ${WINDOW_OBJS} ${DICT_OBJS} ${OBJECT_OBJS} ${CB_OBJS} ${LIBS}
185         $(AFS_LDRULE) object_test.o ${WINDOW_OBJS} ${DICT_OBJS} \
186                 ${OBJECT_OBJS} ${CB_OBJS} ${LIBS} ${EXTRA_LIBS}
187
188 #
189 # Installation targets
190 #
191 libgtx.a: ${LIBOBJS} AFS_component_version_number.o
192         -$(RM) -f $@
193         $(AR) crv $@ ${LIBOBJS} AFS_component_version_number.o
194         ${RANLIB} $@
195
196 install: libgtx.a
197         ${INSTALL} -d ${DESTDIR}${libdir}/afs
198         ${INSTALL} -d ${DESTDIR}${includedir}/afs
199         ${INSTALL_DATA} libgtx.a ${DESTDIR}${libdir}/afs/libgtx.a
200         ${INSTALL_DATA} ${srcdir}/gtxcurseswin.h ${DESTDIR}${includedir}/afs/gtxcurseswin.h
201         ${INSTALL_DATA} ${srcdir}/gtxdumbwin.h ${DESTDIR}${includedir}/afs/gtxdumbwin.h
202         ${INSTALL_DATA} ${srcdir}/gtxframe.h ${DESTDIR}${includedir}/afs/gtxframe.h
203         ${INSTALL_DATA} ${srcdir}/gtxinput.h ${DESTDIR}${includedir}/afs/gtxinput.h
204         ${INSTALL_DATA} ${srcdir}/gtxkeymap.h ${DESTDIR}${includedir}/afs/gtxkeymap.h
205         ${INSTALL_DATA} ${srcdir}/gtxlightobj.h ${DESTDIR}${includedir}/afs/gtxlightobj.h
206         ${INSTALL_DATA} ${srcdir}/gtxobjdict.h ${DESTDIR}${includedir}/afs/gtxobjdict.h
207         ${INSTALL_DATA} ${srcdir}/gtxobjects.h ${DESTDIR}${includedir}/afs/gtxobjects.h
208         ${INSTALL_DATA} ${srcdir}/gtxtextcb.h ${DESTDIR}${includedir}/afs/gtxtextcb.h
209         ${INSTALL_DATA} ${srcdir}/gtxtextobj.h ${DESTDIR}${includedir}/afs/gtxtextobj.h
210         ${INSTALL_DATA} ${srcdir}/gtxwindows.h ${DESTDIR}${includedir}/afs/gtxwindows.h
211         ${INSTALL_DATA} ${srcdir}/gtxX11win.h ${DESTDIR}${includedir}/afs/gtxX11win.h
212
213 dest: libgtx.a
214         ${INSTALL} -d ${DEST}/lib/afs
215         ${INSTALL} -d ${DEST}/include/afs
216         ${INSTALL_DATA} libgtx.a ${DEST}/lib/afs/libgtx.a
217         ${INSTALL_DATA} ${srcdir}/gtxcurseswin.h ${DEST}/include/afs/gtxcurseswin.h
218         ${INSTALL_DATA} ${srcdir}/gtxdumbwin.h ${DEST}/include/afs/gtxdumbwin.h
219         ${INSTALL_DATA} ${srcdir}/gtxframe.h ${DEST}/include/afs/gtxframe.h
220         ${INSTALL_DATA} ${srcdir}/gtxinput.h ${DEST}/include/afs/gtxinput.h
221         ${INSTALL_DATA} ${srcdir}/gtxkeymap.h ${DEST}/include/afs/gtxkeymap.h
222         ${INSTALL_DATA} ${srcdir}/gtxlightobj.h ${DEST}/include/afs/gtxlightobj.h
223         ${INSTALL_DATA} ${srcdir}/gtxobjdict.h ${DEST}/include/afs/gtxobjdict.h
224         ${INSTALL_DATA} ${srcdir}/gtxobjects.h ${DEST}/include/afs/gtxobjects.h
225         ${INSTALL_DATA} ${srcdir}/gtxtextcb.h ${DEST}/include/afs/gtxtextcb.h
226         ${INSTALL_DATA} ${srcdir}/gtxtextobj.h ${DEST}/include/afs/gtxtextobj.h
227         ${INSTALL_DATA} ${srcdir}/gtxwindows.h ${DEST}/include/afs/gtxwindows.h
228         ${INSTALL_DATA} ${srcdir}/gtxX11win.h ${DEST}/include/afs/gtxX11win.h
229
230 #
231 # Misc targets
232 #
233 clean:
234         $(RM) -f  *.o *.a *.ln object_test screen_test curses_test core cb_test gtxtest AFS_component_version_number.c
235
236 include ../config/Makefile.version