1 # Copyright 2000, International Business Machines Corporation and others.
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
8 # Makefile for gtx, a display-independent, object-oriented window toolkit.
11 include @TOP_OBJDIR@/src/config/Makefile.config
25 ${TOP_INCDIR}/afs/keys.h \
26 ${TOP_INCDIR}/afs/cellconfig.h \
27 ${TOP_INCDIR}/afs/cmd.h
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 \
41 EXTRA_LIBS=${TXLIBS} ${TOP_LIBDIR}/libtermlib.a ${XLIBS}
43 KEYMAP_SRCS=keymap.c input.c frame.c
45 KEYMAP_OBJS=keymap.o input.o frame.o
47 WINDOW_SRCS=curseswindows.c \
52 WINDOW_OBJS=curseswindows.o \
57 OBJECT_SRCS=objects.c \
61 OBJECT_OBJS=objects.o \
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
86 ${TOP_LIBDIR}/libgtx.a: libgtx.a
89 ${TOP_INCDIR}/afs/gtxcurseswin.h: gtxcurseswin.h
92 ${TOP_INCDIR}/afs/gtxdumbwin.h: gtxdumbwin.h
95 ${TOP_INCDIR}/afs/gtxframe.h: gtxframe.h
98 ${TOP_INCDIR}/afs/gtxinput.h: gtxinput.h
101 ${TOP_INCDIR}/afs/gtxkeymap.h: gtxkeymap.h
102 ${INSTALL_DATA} $? $@
104 ${TOP_INCDIR}/afs/gtxlightobj.h: gtxlightobj.h
105 ${INSTALL_DATA} $? $@
107 ${TOP_INCDIR}/afs/gtxobjdict.h: gtxobjdict.h
108 ${INSTALL_DATA} $? $@
110 ${TOP_INCDIR}/afs/gtxobjects.h: gtxobjects.h
111 ${INSTALL_DATA} $? $@
113 ${TOP_INCDIR}/afs/gtxtextcb.h: gtxtextcb.h
114 ${INSTALL_DATA} $? $@
116 ${TOP_INCDIR}/afs/gtxtextobj.h: gtxtextobj.h
117 ${INSTALL_DATA} $? $@
119 ${TOP_INCDIR}/afs/gtxwindows.h: gtxwindows.h
120 ${INSTALL_DATA} $? $@
122 ${TOP_INCDIR}/afs/gtxX11win.h: gtxX11win.h
123 ${INSTALL_DATA} $? $@
125 tests: object_test screen_test curses_test cb_test gtxtest
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}
134 keymap.o: keymap.c ${INCLS}
136 frame.o: frame.c $(INCLS)
138 input.o: input.c ${INCLS}
140 curseswindows.o: curseswindows.c ${INCLS}
142 dumbwindows.o: dumbwindows.c ${INCLS}
144 X11windows.o: X11windows.c ${INCLS}
146 windows.o: windows.c ${INCLS}
148 lightobject.o: lightobject.c ${INCLS}
150 textobject.o: textobject.c ${INCLS}
152 textcb.o: textcb.c ${INCLS}
157 curses_test.o: curses_test.c ${INCLS} AFS_component_version_number.o
159 curses_test: curses_test.o $(LIBS)
160 ${CC} ${CFLAGS} -o curses_test curses_test.o $(LIBS) ${EXTRA_LIBS}
162 screen_test.o: screen_test.c ${INCLS} AFS_component_version_number.o
164 screen_test: screen_test.o ${WINDOW_OBJS} ${LIBS}
165 ${CC} ${CFLAGS} -o screen_test screen_test.o ${WINDOW_OBJS} ${LIBS} ${EXTRA_LIBS}
167 cb_test.o: cb_test.c ${INCLS} AFS_component_version_number.o
169 cb_test: cb_test.o ${CB_OBJS} ${LIBS}
170 ${CC} ${CFLAGS} -o cb_test cb_test.o ${CB_OBJS} ${LIBS} ${EXTRA_LIBS}
172 gtxtest.o: gtxtest.c ${INCLS} AFS_component_version_number.o
174 gtxtest: gtxtest.o libgtx.a ${LIBS}
175 ${CC} ${LDFLAGS} -o gtxtest gtxtest.o libgtx.a ${LIBS} ${EXTRA_LIBS}
177 object_test.o: object_test.c ${INCLS} AFS_component_version_number.o
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}
183 # Installation targets
185 libgtx.a: ${LIBOBJS} AFS_component_version_number.o
187 $(AR) crv $@ ${LIBOBJS} AFS_component_version_number.o
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
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
228 $(RM) -f *.o *.a *.ln object_test screen_test curses_test core cb_test gtxtest AFS_component_version_number.c
230 include ../config/Makefile.version