diff options
Diffstat (limited to 'src/mesa/drivers/dri/common/Makefile')
-rw-r--r-- | src/mesa/drivers/dri/common/Makefile | 80 |
1 files changed, 80 insertions, 0 deletions
diff --git a/src/mesa/drivers/dri/common/Makefile b/src/mesa/drivers/dri/common/Makefile new file mode 100644 index 0000000000..c4db042435 --- /dev/null +++ b/src/mesa/drivers/dri/common/Makefile @@ -0,0 +1,80 @@ +TOP = ../../../../.. +include $(TOP)/configs/current + +DRIVER_DEFINES = -DIN_DRI_DRIVER + +COMMON_SOURCES = \ + utils.c \ + texmem.c \ + vblank.c \ + dri_util.c \ + xmlconfig.c \ + drirenderbuffer.c \ + dri_metaops.c \ + ../../common/driverfuncs.c + +LIBMESADRICOMMON_HEADERS = \ + drivers/common/driverfuncs.h \ + drivers/common/meta.h \ + drivers/dri/common/depthtmp.h \ + drivers/dri/common/dri_metaops.h \ + drivers/dri/common/drirenderbuffer.h \ + drivers/dri/common/dri_util.h \ + drivers/dri/common/mmio.h \ + drivers/dri/common/spantmp2.h \ + drivers/dri/common/spantmp_common.h \ + drivers/dri/common/spantmp.h \ + drivers/dri/common/stenciltmp.h \ + drivers/dri/common/texmem.h \ + drivers/dri/common/utils.h \ + drivers/dri/common/vblank.h \ + drivers/dri/common/xmlconfig.h \ + drivers/dri/common/xmlpool.h \ + drivers/dri/common/xmlpool/options.h + +COMMON_OBJECTS = $(COMMON_SOURCES:.c=.o) + +INCLUDES = \ + -I. \ + -I$(TOP)/include \ + -I$(TOP)/src/mesa \ + -I/usr/include/drm + +.c.o: + $(CC) -c $(INCLUDES) $(CFLAGS) $(DRIVER_DEFINES) $< -o $@ + +libmesadricommon.so: $(COMMON_OBJECTS) + $(MKLIB) -major $(MESA_MAJOR) -minor $(MESA_MINOR) \ + -patch $(MESA_TINY) -o mesadricommon $(COMMON_OBJECTS) + +pcedit = sed \ + -e 's,@INSTALL_DIR@,$(INSTALL_DIR),' \ + -e 's,@INSTALL_LIB_DIR@,$(INSTALL_LIB_DIR),' \ + -e 's,@INSTALL_INC_DIR@,$(INSTALL_INC_DIR),' \ + -e 's,@VERSION@,$(MESA_MAJOR).$(MESA_MINOR).$(MESA_TINY),' \ + -e 's,@DRI_DRIVER_DIR@,$(DRI_DRIVER_INSTALL_DIR),' \ + -e 's,@DRI_PC_REQ_PRIV@,$(DRI_PC_REQ_PRIV),' + +libmesadricommon.pc: libmesadricommon.pc.in + $(pcedit) $< > $@ + +default: libmesadricommon.so + +install: libmesadricommon.so libmesadricommon.pc install-libmesadricommon-headers + $(INSTALL) -d $(DESTDIR)$(INSTALL_LIB_DIR) + $(INSTALL) -d $(DESTDIR)$(INSTALL_LIB_DIR)/pkgconfig + $(MINSTALL) libmesadricommon.so.$(MESA_VERSION) $(DESTDIR)$(INSTALL_LIB_DIR) + $(MINSTALL) libmesadricommon.so.$(MESA_MAJOR) $(DESTDIR)$(INSTALL_LIB_DIR) + $(MINSTALL) libmesadricommon.so $(DESTDIR)$(INSTALL_LIB_DIR) + $(INSTALL) -m 644 libmesadricommon.pc $(DESTDIR)$(INSTALL_LIB_DIR)/pkgconfig + +$(DESTDIR)$(INSTALL_INC_DIR)/mesa/%: $(subst $(DESTDIR)$(INSTALL_INC_DIR)/mesa/drivers/,../../,$@) + $(INSTALL) -d $(dir $@) + $(INSTALL) -m 644 $(subst $(DESTDIR)$(INSTALL_INC_DIR)/mesa/drivers/,../../,$(dir $@))$(notdir $@) $(dir $@) + +install-libmesadricommon-headers: $(addprefix $(DESTDIR)$(INSTALL_INC_DIR)/mesa/,$(LIBMESADRICOMMON_HEADERS)) + +clean: + -rm -f *.o + -rm -f libmesadricommon.so* + -rm -f libmesadricommon.pc |