glx: nitpick renames
[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 glxcurrent.c \
14 glxext.c \
15 glxextensions.c \
16 indirect.c \
17 indirect_init.c \
18 indirect_size.c \
19 indirect_window_pos.c \
20 indirect_texture_compression.c \
21 indirect_transpose_matrix.c \
22 indirect_vertex_array.c \
23 indirect_vertex_program.c \
24 pixel.c \
25 pixelstore.c \
26 render2.c \
27 renderpix.c \
28 single2.c \
29 singlepix.c \
30 vertarr.c \
31 xfont.c \
32 glx_pbuffer.c \
33 glx_query.c \
34 dri_glx.c \
35 XF86dri.c \
36 glxhash.c \
37 dri2_glx.c \
38 dri2.c
39
40 include $(TOP)/src/mesa/sources
41
42 MESA_ASM_API = $(addprefix $(TOP)/src/mesa/, $(ASM_API))
43 MESA_GLAPI_SOURCES = $(addprefix $(TOP)/src/mesa/, $(GLAPI_SOURCES))
44 MESA_GLAPI_OBJECTS = $(addprefix $(TOP)/src/mesa/, $(GLAPI_OBJECTS))
45
46 OBJECTS = $(SOURCES:.c=.o) $(MESA_GLAPI_OBJECTS)
47
48 INCLUDES = -I. \
49 -I$(TOP)/include \
50 -I$(TOP)/include/GL/internal \
51 -I$(TOP)/src/mesa/main \
52 -I$(TOP)/src/mesa/glapi \
53 $(LIBDRM_CFLAGS) \
54 $(DRI2PROTO_CFLAGS) \
55 $(X11_INCLUDES)
56
57
58 ##### RULES #####
59
60 .c.o:
61 $(CC) -c $(INCLUDES) $(CFLAGS) $(EXTRA_DEFINES) $< -o $@
62
63 .S.o:
64 $(CC) -c $(INCLUDES) $(CFLAGS) $(EXTRA_DEFINES) $< -o $@
65
66 ##### TARGETS #####
67
68 default: depend $(TOP)/$(LIB_DIR)/$(GL_LIB_NAME)
69
70 # Make libGL
71 $(TOP)/$(LIB_DIR)/$(GL_LIB_NAME): $(OBJECTS) Makefile
72 $(TOP)/bin/mklib -o $(GL_LIB) -linker '$(CC)' -ldflags '$(LDFLAGS)' \
73 -major 1 -minor 2 $(MKLIB_OPTIONS) \
74 -install $(TOP)/$(LIB_DIR) $(GL_LIB_DEPS) $(OBJECTS)
75
76
77 depend: $(SOURCES) $(MESA_GLAPI_SOURCES) $(MESA_ASM_API) Makefile
78 touch depend
79 $(MKDEP) $(MKDEP_OPTIONS) $(INCLUDES) $(SOURCES) \
80 $(MESA_GLAPI_SOURCES) $(MESA_ASM_API)
81
82
83 # Emacs tags
84 tags:
85 etags `find . -name \*.[ch]` `find $(TOP)/include`
86
87 install: $(TOP)/$(LIB_DIR)/$(GL_LIB_NAME)
88 make -C $(TOP)/src/mesa install-libgl
89
90 # Remove .o and backup files
91 clean:
92 -rm -f $(TOP)/$(LIB_DIR)/libGL.so*
93 -rm -f *.o *~
94 -rm -f depend
95
96 -include depend