glx: indent -br -i3 -npcs --no-tabs dri2_glx.c
[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 drisw_glx.c \
35 dri_common.c \
36 dri_glx.c \
37 XF86dri.c \
38 glxhash.c \
39 dri2_glx.c \
40 dri2.c
41
42 include $(TOP)/src/mesa/sources.mak
43
44 MESA_GLAPI_ASM_SOURCES = $(addprefix $(TOP)/src/mesa/, $(GLAPI_ASM_SOURCES))
45 MESA_GLAPI_SOURCES = $(addprefix $(TOP)/src/mesa/, $(GLAPI_SOURCES))
46 MESA_GLAPI_OBJECTS = $(addprefix $(TOP)/src/mesa/, $(GLAPI_OBJECTS))
47
48 OBJECTS = $(SOURCES:.c=.o) $(MESA_GLAPI_OBJECTS)
49
50 INCLUDES = -I. \
51 -I$(TOP)/include \
52 -I$(TOP)/include/GL/internal \
53 -I$(TOP)/src/mesa \
54 -I$(TOP)/src/mesa/glapi \
55 $(LIBDRM_CFLAGS) \
56 $(DRI2PROTO_CFLAGS) \
57 $(X11_INCLUDES)
58
59
60 ##### RULES #####
61
62 .c.o:
63 $(CC) -c $(INCLUDES) $(CFLAGS) $(EXTRA_DEFINES) $< -o $@
64
65 .S.o:
66 $(CC) -c $(INCLUDES) $(CFLAGS) $(EXTRA_DEFINES) $< -o $@
67
68 ##### TARGETS #####
69
70 default: depend $(TOP)/$(LIB_DIR)/$(GL_LIB_NAME)
71
72 # Make libGL
73 $(TOP)/$(LIB_DIR)/$(GL_LIB_NAME): $(OBJECTS) Makefile
74 $(MKLIB) -o $(GL_LIB) -linker '$(CC)' -ldflags '$(LDFLAGS)' \
75 -major 1 -minor 2 $(MKLIB_OPTIONS) \
76 -install $(TOP)/$(LIB_DIR) -id $(INSTALL_LIB_DIR)/lib$(GL_LIB).1.dylib \
77 $(GL_LIB_DEPS) $(OBJECTS)
78
79
80 depend: $(SOURCES) $(MESA_GLAPI_SOURCES) $(MESA_GLAPI_ASM_SOURCES) Makefile
81 rm -f depend
82 touch depend
83 $(MKDEP) $(MKDEP_OPTIONS) $(INCLUDES) $(SOURCES) \
84 $(MESA_GLAPI_SOURCES) $(MESA_GLAPI_ASM_SOURCES)
85
86
87 # Emacs tags
88 tags:
89 etags `find . -name \*.[ch]` `find $(TOP)/include`
90
91 install: $(TOP)/$(LIB_DIR)/$(GL_LIB_NAME)
92 $(MAKE) -C $(TOP)/src/mesa install-libgl
93
94 # Remove .o and backup files
95 clean:
96 -rm -f $(TOP)/$(LIB_DIR)/libGL.so*
97 -rm -f *.o *~
98 -rm -f depend depend.bak
99
100 -include depend