Merge commit 'origin/gallium-0.1' into gallium-0.2
[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/main \
55 -I$(TOP)/src/mesa/glapi \
56 $(LIBDRM_CFLAGS) \
57 $(DRI2PROTO_CFLAGS) \
58 $(X11_INCLUDES)
59
60
61 ##### RULES #####
62
63 .c.o:
64 $(CC) -c $(INCLUDES) $(CFLAGS) $(EXTRA_DEFINES) $< -o $@
65
66 .S.o:
67 $(CC) -c $(INCLUDES) $(CFLAGS) $(EXTRA_DEFINES) $< -o $@
68
69 ##### TARGETS #####
70
71 default: depend $(TOP)/$(LIB_DIR)/$(GL_LIB_NAME)
72
73 # Make libGL
74 $(TOP)/$(LIB_DIR)/$(GL_LIB_NAME): $(OBJECTS) Makefile
75 $(MKLIB) -o $(GL_LIB) -linker '$(CC)' -ldflags '$(LDFLAGS)' \
76 -major 1 -minor 2 $(MKLIB_OPTIONS) \
77 -install $(TOP)/$(LIB_DIR) -id $(INSTALL_LIB_DIR)/lib$(GL_LIB).1.dylib \
78 $(GL_LIB_DEPS) $(OBJECTS)
79
80
81 depend: $(SOURCES) $(MESA_GLAPI_SOURCES) $(MESA_GLAPI_ASM_SOURCES) Makefile
82 rm -f depend
83 touch depend
84 $(MKDEP) $(MKDEP_OPTIONS) $(INCLUDES) $(SOURCES) \
85 $(MESA_GLAPI_SOURCES) $(MESA_GLAPI_ASM_SOURCES)
86
87
88 # Emacs tags
89 tags:
90 etags `find . -name \*.[ch]` `find $(TOP)/include`
91
92 install: $(TOP)/$(LIB_DIR)/$(GL_LIB_NAME)
93 $(MAKE) -C $(TOP)/src/mesa install-libgl
94
95 # Remove .o and backup files
96 clean:
97 -rm -f $(TOP)/$(LIB_DIR)/libGL.so*
98 -rm -f *.o *~
99 -rm -f depend depend.bak
100
101 -include depend