Tizen 2.0 Release
[profile/ivi/osmesa.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_glide.h \
24         xm_image.h
25
26 SOURCES = \
27         fakeglx.c \
28         glxapi.c \
29         xfonts.c \
30         xm_api.c \
31         xm_buffer.c \
32         xm_dd.c \
33         xm_glide.c \
34         xm_image.c \
35         xm_line.c \
36         xm_span.c \
37         xm_tri.c
38
39 OBJECTS = $(SOURCES:.c=.o)
40
41 INCLUDE_DIRS = \
42         -I$(TOP)/include \
43         -I$(TOP)/src/mapi \
44         -I$(TOP)/src/mesa \
45         -I$(TOP)/src/mesa/main \
46         $(X11_INCLUDES)
47
48 CORE_MESA = $(TOP)/src/mesa/libmesa.a $(TOP)/src/mapi/glapi/libglapi.a
49
50 ifeq ($(SHARED_GLAPI),1)
51 GL_LIB_DEPS := -L$(TOP)/$(LIB_DIR) -l$(GLAPI_LIB) $(GL_LIB_DEPS)
52 endif
53
54
55 .c.o:
56         $(CC) -c $(INCLUDE_DIRS) $(CFLAGS) $< -o $@
57
58
59 default: $(TOP)/$(LIB_DIR)/$(GL_LIB_NAME)
60
61
62 $(TOP)/$(LIB_DIR)/$(GL_LIB_NAME): $(OBJECTS) $(CORE_MESA)
63         @ $(MKLIB) -o $(GL_LIB) -linker '$(CXX)' -ldflags '$(LDFLAGS)' \
64                 -major $(GL_MAJOR) -minor $(GL_MINOR) -patch $(GL_TINY) \
65                 -install $(TOP)/$(LIB_DIR) \
66                 -cplusplus $(MKLIB_OPTIONS) \
67                 -id $(INSTALL_LIB_DIR)/lib$(GL_LIB).$(GL_MAJOR).dylib \
68                 $(GL_LIB_DEPS) $(OBJECTS) $(CORE_MESA)
69
70
71
72 clean:
73         -rm -f *.o *~
74         -rm -f depend depend.bak
75
76
77
78 depend: $(SOURCES) $(HEADERS)
79         @ echo "running $(MKDEP)"
80         @ touch depend
81         @$(MKDEP) $(MKDEP_OPTIONS) $(DEFINES) $(INCLUDE_DIRS) $(SOURCES) $(HEADERS) \
82                 > /dev/null 2>/dev/null
83
84
85 -include depend