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