blob: 437bdf0ce68538bb33395f23817661fddbaa03ac (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
|
# src/mesa/drivers/xorg/Makefile
TOP = ../../../..
include $(TOP)/configs/current
LIBNAME = libGLcore.so
SYMLINKS = \
glxheader.h \
xmesaP.h \
xm_api.c \
xm_buffer.c \
xm_dd.c \
xm_image.c \
xm_image.h \
xm_line.c \
xm_span.c \
xm_tri.c
C_SOURCES = \
xm_api.c \
xm_buffer.c \
xm_dd.c \
xm_image.c \
xm_line.c \
xm_span.c \
xm_tri.c \
glcore.c
########################################
MESA_MODULES = $(TOP)/src/mesa/libmesa.a
C_SOURCES += ../common/driverfuncs.c
ifeq ($(WINDOW_SYSTEM),dri)
C_SOURCES += ../dri/common/utils.c
endif
OBJECTS = $(C_SOURCES:.c=.o)
### Include directories
INCLUDES = \
-I. \
-I.. \
-I$(TOP)/include \
-I$(TOP)/src/mesa \
-I$(TOP)/src/mesa/main \
-I$(TOP)/src/mesa/glapi \
$(XORG_CFLAGS)
ifeq ($(WINDOW_SYSTEM),dri)
INCLUDES += \
-I$(TOP)/src/mesa/drivers/dri/common \
$(LIBDRM_CFLAGS)
endif
# undef 'USE_XSHM' to make it explicit that 'XFree86Server' takes precedence
DRIVER_DEFINES = -UUSE_XSHM -DXFree86Server
##### RULES #####
.c.o:
$(CC) -c $(INCLUDES) $(CFLAGS) $(DRIVER_DEFINES) $< -o $@
##### TARGETS #####
default: depend symlinks $(LIBNAME)
$(LIBNAME): $(OBJECTS) $(MESA_MODULES) Makefile
$(TOP)/bin/mklib -noprefix -o $@ \
$(OBJECTS) $(MESA_MODULES) $(GLCORE_LIB_DEPS)
depend: $(C_SOURCES) $(SYMLINKS)
touch depend
$(MKDEP) $(MKDEP_OPTIONS) $(DRIVER_DEFINES) $(INCLUDES) $(C_SOURCES) \
> /dev/null
clean:
-rm -f *.o *.so $(SYMLINKS)
-rm -f depend depend.bak
install: $(LIBNAME)
$(INSTALL) -d $(DESTDIR)$(DRI_DRIVER_INSTALL_DIR)
$(INSTALL) -m 755 $(LIBNAME) $(DESTDIR)$(DRI_DRIVER_INSTALL_DIR)
$(SYMLINKS):
@[ -e $@ ] || ln -sf ../x11/$@ ./
symlinks: $(SYMLINKS)
include depend
|