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