mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-02-07 21:00:27 +01:00
automake: src/mesa/drivers/dri
This commit is contained in:
parent
349845f7b2
commit
129213e7a2
7 changed files with 37 additions and 165 deletions
|
|
@ -1932,6 +1932,8 @@ CXXFLAGS="$CXXFLAGS $USER_CXXFLAGS"
|
|||
|
||||
dnl Substitute the config
|
||||
AC_CONFIG_FILES([configs/autoconf
|
||||
src/mesa/drivers/dri/dri.pc
|
||||
src/mesa/drivers/dri/Makefile
|
||||
src/mesa/drivers/dri/i915/Makefile
|
||||
src/mesa/drivers/dri/i965/Makefile
|
||||
src/mesa/drivers/dri/nouveau/Makefile
|
||||
|
|
|
|||
2
src/mesa/drivers/dri/.gitignore
vendored
Normal file
2
src/mesa/drivers/dri/.gitignore
vendored
Normal file
|
|
@ -0,0 +1,2 @@
|
|||
Makefile
|
||||
Makefile.in
|
||||
|
|
@ -1,55 +0,0 @@
|
|||
# src/mesa/drivers/dri/Makefile
|
||||
|
||||
TOP = ../../../..
|
||||
|
||||
include $(TOP)/configs/current
|
||||
|
||||
|
||||
|
||||
default: $(TOP)/$(LIB_DIR) subdirs dri.pc
|
||||
|
||||
|
||||
$(TOP)/$(LIB_DIR):
|
||||
-mkdir $(TOP)/$(LIB_DIR)
|
||||
|
||||
|
||||
subdirs:
|
||||
@for dir in $(DRI_DIRS) ; do \
|
||||
if [ -d $$dir ] ; then \
|
||||
(cd $$dir && $(MAKE)) || exit 1 ; \
|
||||
fi \
|
||||
done
|
||||
|
||||
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),'
|
||||
|
||||
dri.pc: dri.pc.in
|
||||
$(pcedit) $< > $@
|
||||
|
||||
|
||||
install: dri.pc
|
||||
@for dir in $(DRI_DIRS) ; do \
|
||||
if [ -d $$dir ] ; then \
|
||||
(cd $$dir && $(MAKE) install) || exit 1 ; \
|
||||
fi \
|
||||
done
|
||||
$(INSTALL) -d $(DESTDIR)$(INSTALL_INC_DIR)/GL/internal
|
||||
$(INSTALL) -m 0644 $(TOP)/include/GL/internal/dri_interface.h \
|
||||
$(DESTDIR)$(INSTALL_INC_DIR)/GL/internal
|
||||
$(INSTALL) -d $(DESTDIR)$(INSTALL_LIB_DIR)/pkgconfig
|
||||
$(INSTALL) -m 0644 dri.pc $(DESTDIR)$(INSTALL_LIB_DIR)/pkgconfig
|
||||
|
||||
|
||||
clean:
|
||||
-@for dir in $(DRI_DIRS) ; do \
|
||||
if [ -d $$dir ] ; then \
|
||||
(cd $$dir && $(MAKE) clean) ; \
|
||||
fi \
|
||||
done
|
||||
-rm -f common/*.o
|
||||
-rm -f *.pc
|
||||
28
src/mesa/drivers/dri/Makefile.am
Normal file
28
src/mesa/drivers/dri/Makefile.am
Normal file
|
|
@ -0,0 +1,28 @@
|
|||
SUBDIRS=
|
||||
|
||||
if HAVE_I915_DRI
|
||||
SUBDIRS+=i915
|
||||
endif
|
||||
|
||||
if HAVE_I965_DRI
|
||||
SUBDIRS+=i965
|
||||
endif
|
||||
|
||||
if HAVE_NOUVEAU_DRI
|
||||
SUBDIRS+=nouveau
|
||||
endif
|
||||
|
||||
if HAVE_R200_DRI
|
||||
SUBDIRS+=r200
|
||||
endif
|
||||
|
||||
if HAVE_RADEON_DRI
|
||||
SUBDIRS+=radeon
|
||||
endif
|
||||
|
||||
if HAVE_SWRAST_DRI
|
||||
SUBDIRS+=swrast
|
||||
endif
|
||||
|
||||
pkgconfigdir = $(libdir)/pkgconfig
|
||||
pkgconfig_DATA = dri.pc
|
||||
|
|
@ -1,27 +0,0 @@
|
|||
# -*-makefile-*-
|
||||
|
||||
# Import mesa_dri_common_*
|
||||
include ../common/Makefile.sources
|
||||
|
||||
COMMON_GALLIUM_SOURCES = \
|
||||
$(addprefix ../common/, $(mesa_dri_common_gallium_SOURCES))
|
||||
|
||||
COMMON_SOURCES = \
|
||||
$(addprefix ../common/, $(mesa_dri_common_SOURCES))
|
||||
|
||||
INCLUDES = $(SHARED_INCLUDES) $(EXPAT_INCLUDES)
|
||||
|
||||
OBJECTS = $(C_SOURCES:.c=.o) \
|
||||
$(CXX_SOURCES:.cpp=.o) \
|
||||
$(ASM_SOURCES:.S=.o)
|
||||
|
||||
|
||||
### Include directories
|
||||
SHARED_INCLUDES = \
|
||||
-I. \
|
||||
-Iserver \
|
||||
$(addprefix -I$(TOP)/, $(mesa_dri_common_INCLUDES)) \
|
||||
$(LIBDRM_CFLAGS)
|
||||
|
||||
INCLUDES += $(API_DEFINES)
|
||||
CXXFLAGS += $(API_DEFINES)
|
||||
|
|
@ -1,78 +0,0 @@
|
|||
# -*-makefile-*-
|
||||
|
||||
##### RULES #####
|
||||
|
||||
.c.o:
|
||||
$(CC) -c $(INCLUDES) $(DRI_CFLAGS) $(DRIVER_DEFINES) $< -o $@
|
||||
|
||||
.cpp.o:
|
||||
$(CC) -c $(INCLUDES) $(DRI_CXXFLAGS) $(DRIVER_DEFINES) $< -o $@
|
||||
|
||||
.S.o:
|
||||
$(CC) -c $(INCLUDES) $(DRI_CFLAGS) $(DRIVER_DEFINES) $< -o $@
|
||||
|
||||
|
||||
#### TARGETS #####
|
||||
|
||||
default: subdirs lib
|
||||
|
||||
|
||||
.PHONY: lib
|
||||
lib: symlinks subdirs depend
|
||||
@$(MAKE) $(LIBNAME) $(TOP)/$(LIB_DIR)/$(LIBNAME)
|
||||
|
||||
$(LIBNAME): $(OBJECTS) $(EXTRA_MODULES) $(MESA_MODULES) Makefile \
|
||||
$(TOP)/src/mesa/drivers/dri/Makefile.targets $(TOP)/src/mesa/drivers/dri/common/dri_test.o
|
||||
$(MKLIB) -o $@.tmp -noprefix -linker '$(CXX)' -ldflags '$(LDFLAGS)' \
|
||||
$(OBJECTS) $(EXTRA_MODULES) $(DRI_LIB_DEPS)
|
||||
$(CXX) $(CFLAGS) -o $@.test $(TOP)/src/mesa/drivers/dri/common/dri_test.o $@.tmp $(DRI_LIB_DEPS)
|
||||
@rm -f $@.test
|
||||
mv -f $@.tmp $@
|
||||
|
||||
|
||||
$(TOP)/$(LIB_DIR)/$(LIBNAME): $(LIBNAME)
|
||||
$(INSTALL) $(LIBNAME) $(TOP)/$(LIB_DIR)
|
||||
|
||||
|
||||
# If the Makefile defined SUBDIRS, run make in each
|
||||
.PHONY: subdirs
|
||||
subdirs:
|
||||
@if test -n "$(SUBDIRS)" ; then \
|
||||
for dir in $(SUBDIRS) ; do \
|
||||
if [ -d $$dir ] ; then \
|
||||
(cd $$dir && $(MAKE)) || exit 1; \
|
||||
fi \
|
||||
done \
|
||||
fi
|
||||
|
||||
|
||||
.PHONY: symlinks
|
||||
symlinks:
|
||||
|
||||
|
||||
depend: $(C_SOURCES) $(CXX_SOURCES) $(ASM_SOURCES) $(SYMLINKS)
|
||||
@ echo "running $(MKDEP)"
|
||||
@ rm -f depend
|
||||
@ touch depend
|
||||
@ $(MKDEP) $(MKDEP_OPTIONS) $(DRIVER_DEFINES) $(INCLUDES) \
|
||||
$(C_SOURCES) $(CXX_SOURCES) \
|
||||
$(ASM_SOURCES) > /dev/null 2>/dev/null
|
||||
|
||||
|
||||
# Emacs tags
|
||||
tags:
|
||||
etags `find . -name \*.[ch]` `find ../include`
|
||||
|
||||
|
||||
# Remove .o and backup files
|
||||
clean:
|
||||
-rm -f *.o */*.o *~ *.so *~ server/*.o $(SYMLINKS)
|
||||
-rm -f depend depend.bak
|
||||
|
||||
|
||||
install: $(LIBNAME)
|
||||
$(INSTALL) -d $(DESTDIR)$(DRI_DRIVER_INSTALL_DIR)
|
||||
$(MINSTALL) -m 755 $(LIBNAME) $(DESTDIR)$(DRI_DRIVER_INSTALL_DIR)
|
||||
|
||||
|
||||
-include depend
|
||||
|
|
@ -1,8 +1,8 @@
|
|||
prefix=@INSTALL_DIR@
|
||||
exec_prefix=${prefix}
|
||||
libdir=@INSTALL_LIB_DIR@
|
||||
includedir=@INSTALL_INC_DIR@
|
||||
dridriverdir=@DRI_DRIVER_DIR@
|
||||
prefix=@prefix@
|
||||
exec_prefix=@exec_prefix@
|
||||
libdir=@libdir@
|
||||
includedir=@includedir@
|
||||
dridriverdir=@DRI_DRIVER_INSTALL_DIR@
|
||||
|
||||
Name: dri
|
||||
Description: Direct Rendering Infrastructure
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue