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