X-Git-Url: https://git.libre-soc.org/?a=blobdiff_plain;f=src%2Fmesa%2FMakefile;h=a815f46b4a1551514d0f57460522b4b19142539d;hb=4b6dee08652706d02939844fe209cddbae8966e4;hp=78b71d4676fadc19882c933a6b79529f9eab2cff;hpb=53116910b10e3b8a05f42970eff311c21808699f;p=mesa.git diff --git a/src/mesa/Makefile b/src/mesa/Makefile index 78b71d4676f..a815f46b4a1 100644 --- a/src/mesa/Makefile +++ b/src/mesa/Makefile @@ -18,11 +18,10 @@ include sources.mak - -# Default: build dependencies, then asm_subdirs, then convenience -# libs (.a) and finally the device drivers: -default: depend asm_subdirs libmesa.a libmesagallium.a libglapi.a \ - driver_subdirs +# Default: build dependencies, then asm_subdirs, GLSL built-in lib, +# then convenience libs (.a) and finally the device drivers: +default: depend asm_subdirs glsl_builtin libmesa.a libmesagallium.a \ + libglapi.a driver_subdirs @@ -30,25 +29,21 @@ default: depend asm_subdirs libmesa.a libmesagallium.a libglapi.a \ # Helper libraries used by many drivers: # Make archive of core mesa object files -libmesa.a: $(MESA_OBJECTS) - @ $(MKLIB) -o mesa -static $(MESA_OBJECTS) +libmesa.a: $(MESA_OBJECTS) $(GLSL_LIBS) + @ $(MKLIB) -o mesa -static $(MESA_OBJECTS) $(GLSL_LIBS) # Make archive of subset of core mesa object files for gallium -libmesagallium.a: $(MESA_GALLIUM_OBJECTS) - @ $(MKLIB) -o mesagallium -static $(MESA_GALLIUM_OBJECTS) +libmesagallium.a: $(MESA_GALLIUM_OBJECTS) $(GLSL_LIBS) + @ $(MKLIB) -o mesagallium -static $(MESA_GALLIUM_OBJECTS) $(GLSL_LIBS) # Make archive of gl* API dispatcher functions only libglapi.a: $(GLAPI_OBJECTS) - @if [ "${WINDOW_SYSTEM}" = "dri" ] ; then \ - touch libglapi.a ; \ - else \ - $(MKLIB) -o glapi -static $(GLAPI_OBJECTS) ; \ - fi + $(MKLIB) -o glapi -static $(GLAPI_OBJECTS) ###################################################################### # Device drivers driver_subdirs: libmesa.a libglapi.a - (cd drivers && $(MAKE)) + @ (cd drivers && $(MAKE)) ###################################################################### @@ -63,6 +58,12 @@ asm_subdirs: fi +###################################################################### +# GLSL built-in library +glsl_builtin: + (cd shader/slang/library && $(MAKE)) || exit 1 ; + + ###################################################################### # Dependency generation @@ -103,7 +104,8 @@ gl_pcedit = sed \ -e 's,@VERSION@,$(MESA_MAJOR).$(MESA_MINOR).$(MESA_TINY),' \ -e 's,@GL_PC_REQ_PRIV@,$(GL_PC_REQ_PRIV),' \ -e 's,@GL_PC_LIB_PRIV@,$(GL_PC_LIB_PRIV),' \ - -e 's,@GL_PC_CFLAGS@,$(GL_PC_CFLAGS),' + -e 's,@GL_PC_CFLAGS@,$(GL_PC_CFLAGS),' \ + -e 's,@GL_LIB@,$(GL_LIB),' gl.pc: gl.pc.in $(gl_pcedit) $< > $@ @@ -128,14 +130,14 @@ install-headers: install-libgl: default gl.pc install-headers $(INSTALL) -d $(DESTDIR)$(INSTALL_LIB_DIR) $(INSTALL) -d $(DESTDIR)$(INSTALL_LIB_DIR)/pkgconfig - $(INSTALL) $(TOP)/$(LIB_DIR)/$(GL_LIB_GLOB) \ + $(MINSTALL) $(TOP)/$(LIB_DIR)/$(GL_LIB_GLOB) \ $(DESTDIR)$(INSTALL_LIB_DIR) $(INSTALL) -m 644 gl.pc $(DESTDIR)$(INSTALL_LIB_DIR)/pkgconfig install-osmesa: default osmesa.pc $(INSTALL) -d $(DESTDIR)$(INSTALL_LIB_DIR) $(INSTALL) -d $(DESTDIR)$(INSTALL_LIB_DIR)/pkgconfig - $(INSTALL) $(TOP)/$(LIB_DIR)/$(OSMESA_LIB_GLOB) \ + $(MINSTALL) $(TOP)/$(LIB_DIR)/$(OSMESA_LIB_GLOB) \ $(DESTDIR)$(INSTALL_LIB_DIR) $(INSTALL) -m 644 osmesa.pc $(DESTDIR)$(INSTALL_LIB_DIR)/pkgconfig @@ -155,6 +157,7 @@ clean: -rm -f depend depend.bak libmesa.a libglapi.a -rm -f drivers/*/*.o -rm -f *.pc + -rm -f shader/slang/library/*_gc.h -@cd drivers/dri && $(MAKE) clean -@cd drivers/x11 && $(MAKE) clean -@cd drivers/osmesa && $(MAKE) clean