Test sizeof(drm_handle_t) instead of LONG64 when returning handles
[mesa.git] / src / glx / x11 / Makefile
1 TOP = ../../..
2 include $(TOP)/configs/current
3
4 DEFINES += -DXF86VIDMODE -D_REENTRANT -UIN_DRI_DRIVER
5
6 SOURCES = \
7 glcontextmodes.c \
8 clientattrib.c \
9 compsize.c \
10 eval.c \
11 glxcmds.c \
12 glxext.c \
13 glxextensions.c \
14 indirect.c \
15 indirect_init.c \
16 indirect_size.c \
17 indirect_window_pos.c \
18 indirect_transpose_matrix.c \
19 indirect_vertex_array.c \
20 indirect_vertex_program.c \
21 pixel.c \
22 pixelstore.c \
23 render2.c \
24 renderpix.c \
25 single2.c \
26 singlepix.c \
27 vertarr.c \
28 xfont.c \
29 glx_pbuffer.c \
30 glx_query.c \
31 glx_texture_compression.c \
32 dri_glx.c \
33 XF86dri.c
34
35 include $(TOP)/src/mesa/sources
36
37 MESA_ASM_API = $(addprefix $(TOP)/src/mesa/, $(ASM_API))
38 MESA_GLAPI_SOURCES = $(addprefix $(TOP)/src/mesa/, $(GLAPI_SOURCES))
39 MESA_GLAPI_OBJECTS = $(addprefix $(TOP)/src/mesa/, $(GLAPI_OBJECTS))
40
41 OBJECTS = $(SOURCES:.c=.o) $(MESA_GLAPI_OBJECTS)
42
43 INCLUDES = -I. \
44 -I$(TOP)/include \
45 -I$(TOP)/include/GL/internal \
46 -I$(TOP)/src/mesa/main \
47 -I$(TOP)/src/mesa/glapi \
48 -I$(TOP)/src/mesa/drivers/dri/common \
49 `pkg-config --cflags libdrm` \
50 $(X11_INCLUDES)
51
52
53 ##### RULES #####
54
55 .c.o:
56 $(CC) -c $(INCLUDES) $(CFLAGS) $(DEFINES) $< -o $@
57
58 .S.o:
59 $(CC) -c $(INCLUDES) $(CFLAGS) $(DEFINES) $< -o $@
60
61 ##### TARGETS #####
62
63 default: depend $(LIB_DIR)/$(GL_LIB_NAME)
64
65 glcontextmodes.c:
66 ln -s $(TOP)/src/mesa/drivers/dri/common/glcontextmodes.c .
67
68 # Make libGL
69 $(LIB_DIR)/$(GL_LIB_NAME): $(OBJECTS) Makefile
70 $(TOP)/bin/mklib -o $(GL_LIB) -linker '$(CC)' \
71 -major 1 -minor 2 $(MKLIB_OPTIONS) \
72 -install $(LIB_DIR) $(GL_LIB_DEPS) $(OBJECTS)
73
74
75 depend: $(SOURCES) $(MESA_GLAPI_SOURCES) $(MESA_ASM_API) Makefile
76 touch depend
77 $(MKDEP) $(MKDEP_OPTIONS) $(INCLUDES) $(SOURCES) \
78 $(MESA_GLAPI_SOURCES) $(MESA_ASM_API)
79
80
81 # Emacs tags
82 tags:
83 etags `find . -name \*.[ch]` `find ../include`
84
85
86 # Remove .o and backup files
87 clean:
88 -rm -f $(LIB_DIR)/libGL.so*
89 -rm -f *.o *~
90 -rm -f depend
91
92 include depend