include sources
-GL_MAJOR = 1
-GL_MINOR = 5
-GL_TINY = 0$(MESA_MAJOR)0$(MESA_MINOR)0$(MESA_TINY)
-
-
.SUFFIXES : .cpp
.c.o:
esac ; \
done
+# XXX replace this with new_install above someday
install: default
@for driver in $(DRIVER_DIRS) ; do \
case "$$driver" in \
done
+
+# default: build dependencies, then mesa subdirs, then convenience
+# libs (.a) and finally the device drivers:
+new_default: depend subdirs libmesa.a libglapi.a driver_subdirs
+
+
+driver_subdirs:
+ (cd drivers && $(MAKE))
+
+
+# this doesn't work yet but is probably the way to go in the future
+new_install:
+ (cd drivers && $(MAKE) install)
+
+
######################################################################
# Helper libraries used by many drivers:
@ $(TOP)/bin/mklib -o glapi -static $(GLAPI_OBJECTS)
-
######################################################################
# BeOS driver target
######################################################################
-# Generic stuff
-
-depend: $(ALL_SOURCES)
- @ echo "running $(MKDEP)"
- @ touch depend
- @$(MKDEP) $(MKDEP_OPTIONS) $(DEFINES) $(INCLUDE_DIRS) $(ALL_SOURCES) \
- > /dev/null 2>/dev/null
-
-
+# Assembly subdirs
subdirs:
@ if echo "$(ASM_FLAGS)" | grep -q USE_X86_ASM ; then \
(cd x86 && $(MAKE)) || exit 1 ; \
(cd x86-64 && $(MAKE)) || exit 1 ; \
fi
+
+######################################################################
+# Dependency generation
+
+depend: $(ALL_SOURCES)
+ @ echo "running $(MKDEP)"
+ @ touch depend
+ @$(MKDEP) $(MKDEP_OPTIONS) $(DEFINES) $(INCLUDE_DIRS) $(ALL_SOURCES) \
+ > /dev/null 2>/dev/null
+
+
+######################################################################
+# Installation rules
+
pcedit = sed \
-e 's,@INSTALL_DIR@,$(INSTALL_DIR),' \
-e 's,@LIB_DIR@,$(LIB_DIR),' \
install-dri:
cd drivers/dri && $(MAKE) install
-## NOT INSTALLED YET:
-## $(INSTALL) -d $(DESTDIR)$(INSTALL_DIR)/include/GLES
-## $(INSTALL) -m 644 include/GLES/*.h $(DESTDIR)$(INSTALL_DIR)/include/GLES
# Emacs tags
tags:
etags `find . -name \*.[ch]` $(TOP)/include/GL/*.h
+
clean:
-rm -f */*.o
-rm -f */*/*.o