1AUTOMAKE_OPTIONS= foreign
2
3INCLUDES= -I$(top_srcdir)/include
4
5lib_ldflags=-version-info $(QUAKE_LIBRARY_VERSION_INFO) \
6			-rpath $(libdir) -no-undefined
7
8lib_LTLIBRARIES= @JOY_TARGETS@
9
10noinst_LTLIBRARIES= @VID_TARGETS@ @vid_libs@
11
12EXTRA_LTLIBRARIES= \
13	libQFjs.la libQFfbdev.la libQFsvga.la libQFx11.la libQFsdl.la libQFwgl.la \
14	libvid_common.la libvid_sdl.la \
15	libvid_svga.la libvid_x11.la
16
17joy_linux_src= joy_linux.c
18joy_win_src= joy_win.c
19joy_null_src= joy_null.c
20if JOYTYPE_LINUX
21joy_src=      $(joy_linux_src)
22else
23if JOYTYPE_WIN32
24joy_src=      $(joy_win_src)
25else
26joy_src=      $(joy_null_src)
27endif
28endif
29
30js_libs=$(top_builddir)/libs/util/libQFutil.la
31
32libQFjs_la_LDFLAGS=		$(lib_ldflags)
33libQFjs_la_LIBADD=		$(js_libs)
34libQFjs_la_DEPENDENCIES=$(js_libs)
35libQFjs_la_CFLAGS=		@PREFER_PIC@ $(JOY_CFLAGS)
36libQFjs_la_SOURCES=		joy.c $(joy_src)
37EXTRA_libQFjs_la_SOURCES= $(joy_linux_src) $(joy_win_src) $(joy_null_src)
38
39libvid_common_la_SOURCES=	\
40		in_common.c in_event.c keys.c old_keys.c pr_keys.c vid.c
41libvid_common_la_CFLAGS=	@PREFER_NON_PIC@
42libvid_common_la_LDFLAGS=	@STATIC@
43
44libvid_x11_la_SOURCES=		in_x11.c context_x11.c dga_check.c
45libvid_x11_la_CFLAGS=		@PREFER_NON_PIC@ $(X_CFLAGS)
46libvid_x11_la_LDFLAGS=		@STATIC@
47
48libvid_svga_la_SOURCES=		in_svgalib.c
49libvid_svga_la_CFLAGS=		@PREFER_NON_PIC@ $(SVGA_CFLAGS)
50libvid_svga_la_LDFLAGS=		@STATIC@
51
52libvid_sdl_la_SOURCES=		in_sdl.c context_sdl.c
53libvid_sdl_la_CFLAGS=		@PREFER_NON_PIC@ $(SDL_CFLAGS)
54libvid_sdl_la_LDFLAGS=		@STATIC@
55
56#
57# Linux FBdev
58#
59fbdev_c= fbset_modes_y.c fbset_modes_l.c
60fbdev_h= fbset_modes_y.h
61YFLAGS = -d
62YACCLEX_CLEANFILES=	$(fbdev_c) $(fbdev_h)
63BUILT_SOURCES= $(fbdev_c) $(fbdev_h)
64
65fbdev_libs=libvid_common.la
66libQFfbdev_la_CFLAGS=		@PREFER_NON_PIC@
67libQFfbdev_la_SOURCES=		fbset.c fbset_modes_y.y fbset_modes_l.l \
68							in_fbdev.c vid_fbdev.c
69libQFfbdev_la_LDFLAGS=		@STATIC@
70libQFfbdev_la_LIBADD=		$(fbdev_libs)
71libQFfbdev_la_DEPENDENCIES=	$(fbdev_libs)
72
73
74#
75# Simple DirectMedia Library
76#
77sdl_libs=libvid_common.la libvid_sdl.la
78libQFsdl_la_CFLAGS=			@PREFER_NON_PIC@ $(SDL_CFLAGS)
79libQFsdl_la_SOURCES=		vid_sdl.c
80libQFsdl_la_LDFLAGS=		@STATIC@
81libQFsdl_la_LIBADD=			$(sdl_libs)
82libQFsdl_la_DEPENDENCIES=	$(sdl_libs)
83
84#
85# SVGAlib
86#
87svga_libs=libvid_common.la libvid_svga.la
88libQFsvga_la_CFLAGS=		@PREFER_NON_PIC@ $(SVGA_CFLAGS)
89libQFsvga_la_SOURCES=		vid_svgalib.c
90libQFsvga_la_LDFLAGS=		@STATIC@
91libQFsvga_la_LIBADD=		$(svga_libs)
92libQFsvga_la_DEPENDENCIES=	$(svga_libs)
93
94#
95# OpenGL in Win32
96#
97wgl_libs=libvid_common.la libvid_gl.la
98libQFwgl_la_CFLAGS=			@PREFER_NON_PIC@ $(WGL_CFLAGS)
99libQFwgl_la_SOURCES=		in_win.c vid_wgl.c
100libQFwgl_la_LDFLAGS=		@STATIC@
101libQFwgl_la_LIBADD=			$(wgl_libs)
102libQFwgl_la_DEPENDENCIES=	$(wgl_libs)
103
104#
105# X11 software rendering
106#
107x11_libs=libvid_common.la libvid_x11.la
108libQFx11_la_CFLAGS=			@PREFER_NON_PIC@ $(X_CFLAGS)
109libQFx11_la_SOURCES=		vid_x11.c
110libQFx11_la_LDFLAGS=		@STATIC@
111libQFx11_la_LIBADD=			$(x11_libs)
112libQFx11_la_DEPENDENCIES=	$(x11_libs)
113
114# Kill the temp files, hopefully.
115CLEANFILES  = *.i *.s $(YACCLEX_CLEANFILES)
116
117EXTRA_DIST= $(fbdev_c) $(fbdev_h)
118