automake: Convert src/gallium/Makefile to automake.
[mesa.git] / src / mesa / drivers / x11 / Makefile
1 # src/mesa/drivers/x11/Makefile for libGL.so
2
3 # This builds "stand-alone" Mesa, a version of libGL that does not need the
4 # GLX extension. All rendering is converted to Xlib calls. No hardware
5 # acceleration.
6
7
8 TOP = ../../../..
9
10 include $(TOP)/configs/current
11
12
13 GL_MAJOR = 1
14 GL_MINOR = 5
15 GL_TINY = 0$(MESA_MAJOR)$(MESA_MINOR)0$(MESA_TINY)
16
17
18 HEADERS = \
19 glxapi.h \
20 glxheader.h \
21 xfonts.h \
22 xmesaP.h \
23 xm_image.h
24
25 SOURCES = \
26 fakeglx.c \
27 glxapi.c \
28 xfonts.c \
29 xm_api.c \
30 xm_buffer.c \
31 xm_dd.c \
32 xm_line.c \
33 xm_tri.c
34
35 OBJECTS = $(SOURCES:.c=.o)
36
37 INCLUDE_DIRS = \
38 -I$(TOP)/include \
39 -I$(TOP)/src/mapi \
40 -I$(TOP)/src/mesa \
41 -I$(TOP)/src/mesa/main \
42 $(X11_INCLUDES)
43
44 CORE_MESA = $(TOP)/src/mesa/libmesa.a $(TOP)/src/mapi/glapi/libglapi.a
45
46 ifeq ($(SHARED_GLAPI),1)
47 GL_LIB_DEPS := -L$(TOP)/$(LIB_DIR) -l$(GLAPI_LIB) $(GL_LIB_DEPS)
48 endif
49
50
51 .c.o:
52 $(CC) -c $(INCLUDE_DIRS) $(CFLAGS) $< -o $@
53
54
55 default: $(TOP)/$(LIB_DIR)/$(GL_LIB_NAME)
56
57
58 $(TOP)/$(LIB_DIR)/$(GL_LIB_NAME): $(OBJECTS) $(CORE_MESA)
59 @ $(MKLIB) -o $(GL_LIB) -linker '$(CXX)' -ldflags '$(LDFLAGS)' \
60 -major $(GL_MAJOR) -minor $(GL_MINOR) -patch $(GL_TINY) \
61 -install $(TOP)/$(LIB_DIR) \
62 -cplusplus $(MKLIB_OPTIONS) \
63 -id $(INSTALL_LIB_DIR)/lib$(GL_LIB).$(GL_MAJOR).dylib \
64 $(GL_LIB_DEPS) $(OBJECTS) $(CORE_MESA)
65
66
67
68 clean:
69 -rm -f *.o *~
70 -rm -f depend depend.bak
71
72
73
74 depend: $(SOURCES) $(HEADERS)
75 @ echo "running $(MKDEP)"
76 @ touch depend
77 @$(MKDEP) $(MKDEP_OPTIONS) $(DEFINES) $(INCLUDE_DIRS) $(SOURCES) $(HEADERS) \
78 > /dev/null 2>/dev/null
79
80
81 -include depend