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