summaryrefslogtreecommitdiff
path: root/src/egl/drivers/xdri/Makefile
blob: 8a14027fc7b6065173fc1c8458ec8ab37b6400bb (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
# src/egl/drivers/xdri/Makefile

# Build XEGL DRI driver loader library:  egl_xdri.so


TOP = ../../../..
include $(TOP)/configs/current


DRIVER_NAME = egl_xdri.so


INCLUDE_DIRS = \
	-I. \
	-I/usr/include \
	$(shell pkg-config --cflags-only-I libdrm) \
	-I$(TOP)/include \
	-I$(TOP)/include/GL/internal \
	-I$(TOP)/src/mesa/glapi \
	-I$(TOP)/src/mesa/drivers/dri/common \
	-I$(TOP)/src/egl/main \
	-I$(TOP)/src/glx/x11

SOURCES = egl_xdri.c

OBJECTS = $(SOURCES:.c=.o)

DRM_LIB = `pkg-config --libs libdrm`

MISC_LIBS = -ldl -lXext -lGL


.c.o:
	$(CC) -c $(INCLUDE_DIRS) $(CFLAGS) $< -o $@


.PHONY: library


default: depend library Makefile


library: $(TOP)/$(LIB_DIR)/$(DRIVER_NAME)


# Make the egl_xdri.so library
$(TOP)/$(LIB_DIR)/$(DRIVER_NAME): $(OBJECTS)
	$(TOP)/bin/mklib -o $(DRIVER_NAME) \
		-noprefix \
		-major 1 -minor 0 \
		-L$(TOP)/$(LIB_DIR) \
		-install $(TOP)/$(LIB_DIR) \
		$(OBJECTS) $(DRM_LIB) $(MISC_LIBS)

install:
	$(INSTALL) -d $(DESTDIR)$(INSTALL_LIB_DIR)
	$(MINSTALL) $(TOP)/$(LIB_DIR)/$(DRIVER_NAME) $(DESTDIR)$(INSTALL_LIB_DIR)

clean:
	rm -f *.o
	rm -f *.so
	rm -f depend depend.bak


depend: $(SOURCES) $(HEADERS)
	@ echo "running $(MKDEP)"
	@ rm -f depend
	@ touch depend
	$(MKDEP) $(MKDEP_OPTIONS) $(DEFINES) $(INCLUDE_DIRS) \
		$(SOURCES) $(HEADERS) >/dev/null 2>/dev/null

include depend
# DO NOT DELETE