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