Tizen 2.0 Release
[profile/ivi/osmesa.git] / src / mesa / drivers / dri / Makefile
1 # src/mesa/drivers/dri/Makefile
2
3 TOP = ../../../..
4
5 include $(TOP)/configs/current
6
7
8
9 default: $(TOP)/$(LIB_DIR) subdirs dri.pc
10
11
12 $(TOP)/$(LIB_DIR):
13         -mkdir $(TOP)/$(LIB_DIR)
14
15
16 subdirs:
17         @for dir in $(DRI_DIRS) ; do \
18                 if [ -d $$dir ] ; then \
19                         (cd $$dir && $(MAKE)) || exit 1 ; \
20                 fi \
21         done
22
23 pcedit = sed \
24         -e 's,@INSTALL_DIR@,$(INSTALL_DIR),' \
25         -e 's,@INSTALL_LIB_DIR@,$(INSTALL_LIB_DIR),' \
26         -e 's,@INSTALL_INC_DIR@,$(INSTALL_INC_DIR),' \
27         -e 's,@VERSION@,$(MESA_MAJOR).$(MESA_MINOR).$(MESA_TINY),' \
28         -e 's,@DRI_DRIVER_DIR@,$(DRI_DRIVER_INSTALL_DIR),' \
29         -e 's,@DRI_PC_REQ_PRIV@,$(DRI_PC_REQ_PRIV),'
30
31 dri.pc: dri.pc.in
32         $(pcedit) $< > $@
33
34
35 install: dri.pc
36         @for dir in $(DRI_DIRS) ; do \
37                 if [ -d $$dir ] ; then \
38                         (cd $$dir && $(MAKE) install) || exit 1 ; \
39                 fi \
40         done
41         $(INSTALL) -d $(DESTDIR)$(INSTALL_INC_DIR)/GL/internal
42         $(INSTALL) -m 0644 $(TOP)/include/GL/internal/dri_interface.h \
43           $(DESTDIR)$(INSTALL_INC_DIR)/GL/internal
44         $(INSTALL) -d $(DESTDIR)$(INSTALL_LIB_DIR)/pkgconfig
45         $(INSTALL) -m 0644 dri.pc $(DESTDIR)$(INSTALL_LIB_DIR)/pkgconfig
46
47
48 clean:
49         -@for dir in $(DRI_DIRS) ; do \
50                 if [ -d $$dir ] ; then \
51                         (cd $$dir && $(MAKE) clean) ; \
52                 fi \
53         done
54         -rm -f common/*.o
55         -rm -f *.pc