Remove building with NOCRYPTO option
[minix.git] / external / mit / xorg / lib / libGL / Makefile
blob08e2237b0841230d165dd84a8309436c51f3d68e
1 # $NetBSD: Makefile,v 1.21 2014/12/18 06:24:30 mrg Exp $
3 .include <bsd.own.mk>
5 LIB= GL
6 LIBISCXX= yes
8 SUBDIR= internal
10 # glx
11 .PATH: ${X11SRCDIR.MesaLib}/src/glx
12 SRCS.glx= \
13 clientattrib.c \
14 clientinfo.c \
15 compsize.c \
16 create_context.c \
17 eval.c \
18 glxconfig.c \
19 glxcmds.c \
20 glxcurrent.c \
21 glx_error.c \
22 glxext.c \
23 glxextensions.c \
24 indirect_glx.c \
25 MESAindirect.c \
26 MESAindirect_init.c \
27 MESAindirect_size.c \
28 MESAindirect_window_pos.c \
29 indirect_texture_compression.c \
30 indirect_transpose_matrix.c \
31 indirect_vertex_array.c \
32 indirect_vertex_program.c \
33 pixel.c \
34 pixelstore.c \
35 query_renderer.c \
36 render2.c \
37 renderpix.c \
38 single2.c \
39 singlepix.c \
40 vertarr.c \
41 glx_pbuffer.c \
42 glx_query.c \
43 glxhash.c
45 BUILDSYMLINKS+= ${X11SRCDIR.MesaLib}/../src/mapi/glapi/indirect.c MESAindirect.c
46 BUILDSYMLINKS+= ${X11SRCDIR.MesaLib}/../src/mapi/glapi/indirect_init.c MESAindirect_init.c
47 BUILDSYMLINKS+= ${X11SRCDIR.MesaLib}/../src/mapi/glapi/indirect_size.c MESAindirect_size.c
48 BUILDSYMLINKS+= ${X11SRCDIR.MesaLib}/src/glx/indirect_window_pos.c MESAindirect_window_pos.c
50 .for _f in ${SRCS.glx}
51 CPPFLAGS.${_f}= -I${X11SRCDIR.MesaLib}/../src/mapi/glapi -DGLX_SHARED_GLAPI
52 .endfor
54 # glapi
55 .PATH: ${X11SRCDIR.MesaLib}/src/mapi
56 .PATH: ${X11SRCDIR.MesaLib}/../src/mapi/glapi
57 SRCS.glapi= \
58 entry.c \
59 glapi_gentable.c
60 .for _f in ${SRCS.glapi}
61 CPPFLAGS.${_f}= -DMAPI_MODE_BRIDGE \
62 -DMAPI_ABI_HEADER=\"glapi_glapi_mapi_tmp.h\" \
63 -I${X11SRCDIR.MesaLib}/src/mesa
64 .endfor
67 # XXX see TODO
68 #.if ${MACHINE_ARCH} == "i386"
69 #.PATH: ${X11SRCDIR.MesaLib}/src/mesa/x86
70 #SRCS.glx+= glapi_x86.S
71 #CPPFLAGS+= -DUSE_X86_ASM -I${X11SRCDIR.MesaLib}/src/mesa/x86
72 ## -DUSE_X86_ASM $(MMX_DEFS) $(3DNOW_DEFS) $(SSE_DEFS)
73 #.endif
76 .if ${X11DRI} != "no"
77 # dri
78 SRCS.dri= \
79 drisw_glx.c \
80 xfont.c \
81 dri_common.c \
82 dri_glx.c \
83 XF86dri.c \
84 dri2_glx.c \
85 dri2.c \
86 dri2_query_renderer.c
87 .for fn in ${SRCS.dri}
88 CPPFLAGS.${fn}=-DDEFAULT_DRIVER_DIR=\"${X11USRLIBDIR}/modules/dri\"
89 .endfor
90 .endif
92 .include "../libloader.mk"
94 .PATH: ${X11SRCDIR.MesaLib}/src/glw
95 .PATH: ${X11SRCDIR.MesaLib}/include/GL
96 .PATH: ${X11SRCDIR.MesaLib}/src/mesa/drivers/x11
97 INCS= gl.h gl_mangle.h glcorearb.h glext.h \
98 glx.h glx_mangle.h glxext.h \
99 osmesa.h wglext.h wmesa.h
100 INCSDIR=${X11INCDIR}/GL
103 SRCS+= ${SRCS.dri} ${SRCS.glx} ${SRCS.glapi}
105 CPPFLAGS+= \
106 -I${X11SRCDIR.MesaLib}/include \
107 -I${X11SRCDIR.MesaLib}/include/GL/internal \
108 -I${X11SRCDIR.MesaLib}/src/loader \
109 -I${X11SRCDIR.MesaLib}/src/mapi \
110 -I${X11SRCDIR.MesaLib}/src/mapi/glapi \
111 -I${X11SRCDIR.MesaLib}/../src/mapi/glapi \
112 -I${X11SRCDIR.MesaLib}/src/glx \
113 -I${DESTDIR}${X11INCDIR}/libdrm \
114 -I${DESTDIR}${X11INCDIR}/GL \
115 -I${DESTDIR}${X11INCDIR}/X11 \
116 -I${DESTDIR}${X11INCDIR}/X11/extensions
118 CPPFLAGS+= ${X11FLAGS.THREADLIB}
120 # -D_NETBSD_SOURCE \
122 # old
123 CPPFLAGS+= -D__GLX_ALIGN64 \
124 -DXF86VIDMODE \
125 -DGLX_SHARED_GLAPI
127 # new
128 CPPFLAGS+= \
129 -DSTDC_HEADERS=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_STAT_H=1 \
130 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_MEMORY_H=1 \
131 -DHAVE_STRINGS_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 \
132 -DHAVE_UNISTD_H=1 -DHAVE_DLFCN_H=1 -DHAVE___BUILTIN_BSWAP32=1 \
133 -DHAVE___BUILTIN_BSWAP64=1 -DHAVE_DLADDR=1 -DHAVE_CLOCK_GETTIME=1 \
134 -DHAVE_POSIX_MEMALIGN -DHAVE_PTHREAD=1 -DHAVE_DLOPEN
136 .include "../asm.mk"
138 CPPFLAGS+= \
139 -DHAVE_LIBDRM -DGLX_USE_DRM \
140 -DGLX_INDIRECT_RENDERING -DGLX_DIRECT_RENDERING \
141 -DHAVE_ALIAS -DMESA_EGL_NO_X11_HEADERS
143 CPPFLAGS+= \
144 -DUSE_EXTERNAL_DXTN_LIB=1 \
145 -DYYTEXT_POINTER=1
147 CFLAGS+= -fvisibility=hidden -fno-strict-aliasing -fno-builtin-memcmp
148 .if !defined(__MINIX)
149 CFLAGS+= -pthread
150 .else
151 LDADD+= -lmthread
152 DPADD+= ${LIBMTHREAD}
153 CWARNFLAGS.clang+= -Wno-\#warnings
154 .endif # !defined(__MINIX)
156 LIBDPLIBS= Xext ${.CURDIR}/../libXext \
157 X11 ${.CURDIR}/../libX11/dynamic \
158 Xxf86vm ${.CURDIR}/../libXxf86vm \
159 Xfixes ${.CURDIR}/../libXfixes \
160 Xdamage ${.CURDIR}/../libXdamage \
161 glapi ${.CURDIR}/../libglapi \
162 drm ${.CURDIR}/../libdrm \
163 X11-xcb ${.CURDIR}/../libX11/libX11-xcb \
164 xcb-dri2 ${.CURDIR}/../libxcb/dri2 \
165 xcb-glx ${.CURDIR}/../libxcb/glx \
166 expat ${NETBSDSRCDIR}/external/mit/expat/lib/libexpat \
167 m ${NETBSDSRCDIR}/lib/libm
169 MKLINT=no
171 PKGCONFIG= gl
172 PKGDIST.gl= ${X11SRCDIR.MesaLib}/src/mesa
173 .include "${.CURDIR}/../libGL/mesa-ver.mk"
174 PKGCONFIG_VERSION.gl= ${MESA_VER}
176 # XXX remove these from bsd.x11.mk
177 # XXX enable GLX TLS? it's enabled in the code, but not here..
178 PKGCONFIG_SED_FLAGS= \
179 -e "s,@GL_PC_REQ_PRIV@,x11 xext,; \
180 s,@GL_LIB@,GL,; \
181 s,@GL_PC_LIB_PRIV@,-lm -lpthread,; \
182 s,@GL_PC_CFLAGS@,,; \
183 s,@GLX_TLS@,no,"
186 CWARNFLAGS.clang+= -Wno-tautological-compare -Wno-format -Wno-constant-conversion
188 .include <bsd.x11.mk>
189 .include <bsd.lib.mk>
190 .include <bsd.subdir.mk>