415ec02dd6b7d23e8659f599c96b595808afdbbd
[mesa.git] / src / glx / x11 / Makefile
1 TOP = ../../..
2 include $(TOP)/configs/current
3
4 DEFINES += -DXF86VIDMODE -D_REENTRANT -UIN_DRI_DRIVER
5
6 C_SOURCES = \
7 $(TOP)/src/mesa/glapi/glapi.c \
8 $(TOP)/src/mesa/glapi/glthread.c \
9 $(TOP)/src/mesa/main/dispatch.c \
10 glcontextmodes.c \
11 clientattrib.c \
12 compsize.c \
13 eval.c \
14 glxcmds.c \
15 glxext.c \
16 glxextensions.c \
17 indirect.c \
18 indirect_init.c \
19 indirect_size.c \
20 indirect_window_pos.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 glx_texture_compression.c \
35 dri_glx.c \
36 XF86dri.c \
37
38 X86_SOURCES = $(TOP)/src/mesa/x86/glapi_x86.S
39 X86-64_SOURCES = $(TOP)/src/mesa/x86-64/glapi_x86-64.S
40
41 # ASM_SOURCES = $(X86_SOURCES)
42
43 OBJECTS = $(C_SOURCES:.c=.o) \
44 $(ASM_SOURCES:.S=.o)
45
46 INCLUDES = -I. \
47 -I$(TOP)/include \
48 -I$(TOP)/include/GL/internal \
49 -I$(TOP)/src/mesa/main \
50 -I$(TOP)/src/mesa/glapi \
51 -I$(TOP)/src/mesa/drivers/dri/common \
52 `pkg-config --cflags libdrm` \
53 $(X11_INCLUDES)
54
55
56 ##### RULES #####
57
58 .c.o:
59 $(CC) -c $(INCLUDES) $(CFLAGS) $(DEFINES) $< -o $@
60
61 .S.o:
62 $(CC) -c $(INCLUDES) $(CFLAGS) $(DEFINES) $< -o $@
63
64 ##### TARGETS #####
65
66 default: depend $(LIB_DIR)/$(GL_LIB_NAME)
67
68 glcontextmodes.c:
69 ln -s $(TOP)/src/mesa/drivers/dri/common/glcontextmodes.c .
70
71 # Make libGL
72 $(LIB_DIR)/$(GL_LIB_NAME): $(OBJECTS) Makefile
73 $(TOP)/bin/mklib -o $(GL_LIB) -linker '$(CC)' \
74 -major 1 -minor 2 $(MKLIB_OPTIONS) \
75 -install $(LIB_DIR) $(GL_LIB_DEPS) $(OBJECTS)
76
77
78 depend: $(C_SOURCES) $(ASM_SOURCES) Makefile
79 touch depend
80 $(MKDEP) $(MKDEP_OPTIONS) $(INCLUDES) $(C_SOURCES) $(ASM_SOURCES)
81
82
83 # Emacs tags
84 tags:
85 etags `find . -name \*.[ch]` `find ../include`
86
87
88 # Remove .o and backup files
89 clean:
90 -rm -f $(LIB_DIR)/libGL.so*
91 -rm -f *.o *~
92 -rm -f depend
93
94 include depend