glapi: Move to src/mapi/.
[mesa.git] / src / egl / drivers / dri / Makefile
1 # src/egl/drivers/dri/Makefile
2
3 TOP = ../../../..
4 include $(TOP)/configs/current
5
6
7 ### Include directories
8 INCLUDE_DIRS = \
9 -I. \
10 -I/usr/include \
11 $(shell pkg-config --cflags-only-I libdrm) \
12 -I$(TOP)/include \
13 -I$(TOP)/include/GL/internal \
14 -I$(TOP)/src/mapi \
15 -I$(TOP)/src/mesa \
16 -I$(TOP)/src/mesa/main \
17 -I$(TOP)/src/mesa/math \
18 -I$(TOP)/src/mesa/transform \
19 -I$(TOP)/src/mesa/shader \
20 -I$(TOP)/src/mesa/swrast \
21 -I$(TOP)/src/mesa/swrast_setup \
22 -I$(TOP)/src/egl/main \
23 -I$(TOP)/src/mesa/drivers/dri/common
24
25
26 HEADERS = egldri.h
27
28 SOURCES = egldri.c
29
30 OBJECTS = $(SOURCES:.c=.o)
31
32 DRM_LIB = `pkg-config --libs libdrm`
33
34
35 .c.o:
36 $(CC) -c $(INCLUDE_DIRS) $(CFLAGS) $< -o $@
37
38
39
40 default: depend library Makefile
41
42
43 # EGLdri Library
44 library: $(TOP)/$(LIB_DIR)/libEGLdri.so
45
46 $(TOP)/$(LIB_DIR)/libEGLdri.so: $(OBJECTS)
47 $(MKLIB) -o EGLdri -linker '$(CC)' -ldflags '$(LDFLAGS)' \
48 -major 1 -minor 0 \
49 -install $(TOP)/$(LIB_DIR) -ldl $(OBJECTS) $(LIBS)
50
51 install:
52 $(INSTALL) -d $(DESTDIR)$(INSTALL_LIB_DIR)
53 $(MINSTALL) $(TOP)/$(LIB_DIR)/libEGLdri.so $(DESTDIR)$(INSTALL_LIB_DIR)
54
55 clean:
56 -rm -f *.o
57 -rm -f *.so
58 -rm -f depend depend.bak
59
60 depend: $(SOURCES) $(HEADERS)
61 @ echo "running $(MKDEP)"
62 @ rm -f depend
63 @ touch depend
64 $(MKDEP) $(MKDEP_OPTIONS) $(DEFINES) $(INCLUDE_DIRS) \
65 $(SOURCES) $(HEADERS) >/dev/null 2>/dev/null
66
67 include depend
68 # DO NOT DELETE
69