X-Git-Url: https://git.libre-soc.org/?a=blobdiff_plain;f=src%2Fmesa%2FMakefile;h=b7cfc73f9a7fa7ad65eff90e082aa7006f16dd77;hb=d1b1b372704c93a0672b78be11fc5ea92b828c27;hp=87279eed1823abbb6365a538724465a1bb90e42a;hpb=ddfec59bcdf84f26b7be206bf8c7fca9b8426cca;p=mesa.git diff --git a/src/mesa/Makefile b/src/mesa/Makefile index 87279eed182..b7cfc73f9a7 100644 --- a/src/mesa/Makefile +++ b/src/mesa/Makefile @@ -11,9 +11,14 @@ GL_MINOR = 5 GL_TINY = 0$(MESA_MAJOR)0$(MESA_MINOR)0$(MESA_TINY) +.SUFFIXES : .cpp + .c.o: $(CC) -c $(INCLUDE_DIRS) $(CFLAGS) $< -o $@ +.cpp.o: + $(CXX) -c $(INCLUDE_DIRS) $(CXXFLAGS) $< -o $@ + .S.o: $(CC) -c $(INCLUDE_DIRS) $(CFLAGS) $< -o $@ @@ -26,6 +31,8 @@ default: $(MAKE) osmesa-only ; \ elif [ "$(DRIVER_DIRS)" = "beos" ]; then \ $(MAKE) beos ; \ + elif [ "$(DRIVER_DIRS)" = "directfb" ]; then \ + $(MAKE) directfb; \ else \ $(MAKE) stand-alone ; \ fi @@ -35,6 +42,11 @@ beos: depend subdirs mesa.a cd drivers/beos; $(MAKE) +install: default + @if [ "${DRIVER_DIRS}" = "dri" ] ; then \ + cd drivers/dri ; $(MAKE) install ; \ + fi + ###################################################################### # Linux solo DRI drivers @@ -69,6 +81,30 @@ drivers-dri: cd drivers/dri ; $(MAKE) + +##################################################################### +# Stand-alone Mesa libGL, no built-in drivers (DirectFB) + +LIBGL_CORE_SOURCES = \ + $(CORE_SOURCES) \ + $(ASM_SOURCES) + +LIBGL_CORE_OBJECTS = \ + $(CORE_OBJECTS) \ + $(ASM_SOURCES:.S=.o) + +# Make libGL from core object files +libgl-core: $(LIBGL_CORE_OBJECTS) + @ CC="$(CC)" CXX="$(CXX)" $(TOP)/bin/mklib -o $(GL_LIB) \ + -major $(MESA_MAJOR) -minor $(MESA_MINOR) -patch $(MESA_TINY) \ + -install $(LIB_DIR) $(MKLIB_OPTIONS) $(LIBGL_CORE_OBJECTS) $(GL_LIB_DEPS) + +# DirectFB driver target +directfb: depend subdirs libgl-core + cd drivers/directfb; $(MAKE) + + + ###################################################################### # Stand-alone Mesa libGL and libOSMesa @@ -112,19 +148,22 @@ subdirs: # Make the GL library $(LIB_DIR)/$(GL_LIB_NAME): $(STAND_ALONE_OBJECTS) - CC=$(CC) CXX=$(CXX) $(TOP)/bin/mklib -o $(GL_LIB) -major $(GL_MAJOR) \ - -minor $(GL_MINOR) -patch $(GL_TINY) -install $(LIB_DIR) \ + @ CC=$(CC) CXX=$(CXX) $(TOP)/bin/mklib -o $(GL_LIB) \ + -major $(GL_MAJOR) -minor $(GL_MINOR) -patch $(GL_TINY) \ + -install $(LIB_DIR) \ $(MKLIB_OPTIONS) $(GL_LIB_DEPS) $(STAND_ALONE_OBJECTS) # Make the OSMesa library $(LIB_DIR)/$(OSMESA_LIB_NAME): $(OSMESA_DRIVER_OBJECTS) $(OSMESA16_OBJECTS) - if [ "${DRIVER_DIRS}" = "osmesa" ] ; then \ - CC=$(CC) CXX=$(CXX) $(TOP)/bin/mklib -o $(OSMESA_LIB) -major $(MESA_MAJOR) \ + @ if [ "${DRIVER_DIRS}" = "osmesa" ] ; then \ + CC=$(CC) CXX=$(CXX) $(TOP)/bin/mklib -o $(OSMESA_LIB) \ + -major $(MESA_MAJOR) \ -minor $(MESA_MINOR) -patch $(MESA_TINY) \ -install $(LIB_DIR) $(MKLIB_OPTIONS) \ $(OSMESA_LIB_DEPS) $(OSMESA16_OBJECTS) ; \ else \ - CC=$(CC) CXX=$(CXX) $(TOP)/bin/mklib -o $(OSMESA_LIB) -major $(MESA_MAJOR) \ + CC=$(CC) CXX=$(CXX) $(TOP)/bin/mklib -o $(OSMESA_LIB) \ + -major $(MESA_MAJOR) \ -minor $(MESA_MINOR) -patch $(GL_TINY) \ -install $(LIB_DIR) $(MKLIB_OPTIONS) \ $(OSMESA_LIB_DEPS) $(OSMESA_DRIVER_OBJECTS) ; \ @@ -156,7 +195,9 @@ ALL_SOURCES = \ $(SWRAST_SETUP_SOURCES) \ $(ASM_C_SOURCES) \ $(X86_SOURCES) \ - $(COMMON_DRIVER_SOURCES) + $(COMMON_DRIVER_SOURCES)\ + $(X11_DRIVER_SOURCES) \ + $(OSMESA_DRIVER_SOURCES) SUBDIRS = array_cache drivers/dri glapi main math sparc swrast swrast_setup \ @@ -165,19 +206,21 @@ SUBDIRS = array_cache drivers/dri glapi main math sparc swrast swrast_setup \ # Update dependencies depend: $(ALL_SOURCES) - touch depend - $(MKDEP) $(MKDEP_OPTIONS) $(INCLUDE_DIRS) $(ALL_SOURCES) \ - > /dev/null 2>&1 + @ echo "running $(MKDEP)" + @ touch depend + $(MKDEP) $(MKDEP_OPTIONS) $(DEFINES) $(INCLUDE_DIRS) $(ALL_SOURCES) \ + > /dev/null # Emacs tags tags: - etags `find . -name \*.[ch]` `find ../include` + etags `find . -name \*.[ch]` $(TOP)/include/GL/*.h clean: -rm -f */*.o -rm -f depend depend.bak mesa.a -rm -f drivers/*/*.o (cd drivers/dri ; $(MAKE) clean) + (cd x86 ; $(MAKE) clean) include depend