# Misc tools and flags
SHELL = /bin/sh
+MKLIB = $(SHELL) $(TOP)/bin/mklib
MKLIB_OPTIONS =
MKDEP = makedepend
MKDEP_OPTIONS = -fdepend
default: $(TRACER)
$(TRACER): $(OBJECTS)
- $(TOP)/bin/mklib -o $(TRACER) -noprefix -cplusplus \
- -ldflags '$(LDFLAGS)' $(MKLIB_OPTIONS) $(OBJECTS)
+ $(MKLIB) -o $(TRACER) -noprefix -cplusplus -ldflags '$(LDFLAGS)' \
+ $(MKLIB_OPTIONS) $(OBJECTS)
gltrace.cc: gltrace.py
PYTHONPATH=$(TOP)/src/mesa/glapi python gltrace.py -f $(TOP)/src/mesa/glapi/gl_API.xml > gltrace.cc
$(TOP)/$(LIB_DIR)/demodriver.so: $(OBJECTS)
- $(TOP)/bin/mklib -o demodriver.so -noprefix -ldflags '$(LDFLAGS)' \
+ $(MKLIB) -o demodriver.so -noprefix -ldflags '$(LDFLAGS)' \
-install $(TOP)/$(LIB_DIR) $(OBJECTS)
library: $(TOP)/$(LIB_DIR)/libEGLdri.so
$(TOP)/$(LIB_DIR)/libEGLdri.so: $(OBJECTS)
- $(TOP)/bin/mklib -o EGLdri -ldflags '$(LDFLAGS)' -major 1 -minor 0 \
+ $(MKLIB) -o EGLdri -ldflags '$(LDFLAGS)' -major 1 -minor 0 \
-install $(TOP)/$(LIB_DIR) -ldl $(OBJECTS)
library: $(TOP)/$(LIB_DIR)/libEGL.so
$(TOP)/$(LIB_DIR)/libEGL.so: $(OBJECTS)
- $(TOP)/bin/mklib -o EGL -ldflags '$(LDFLAGS)' -major 1 -minor 0 \
+ $(MKLIB) -o EGL -ldflags '$(LDFLAGS)' -major 1 -minor 0 \
-install $(TOP)/$(LIB_DIR) -ldl $(OBJECTS)
# Make the library:
$(TOP)/$(LIB_DIR)/$(GLU_LIB_NAME): $(OBJECTS)
- @ $(TOP)/bin/mklib -o $(GLU_LIB) -linker '$(CC)' -ldflags '$(LDFLAGS)' \
+ @ $(MKLIB) -o $(GLU_LIB) -linker '$(CC)' -ldflags '$(LDFLAGS)' \
-major $(GLU_MAJOR) -minor $(GLU_MINOR) -patch $(GLU_TINY) \
$(MKLIB_OPTIONS) -install $(TOP)/$(LIB_DIR) \
$(GLU_LIB_DEPS) $(OBJECTS)
# Make the library:
$(TOP)/$(LIB_DIR)/$(GLU_LIB_NAME): $(OBJECTS)
- $(TOP)/bin/mklib -o $(GLU_LIB) -linker '$(CXX)' -ldflags '$(LDFLAGS)' \
+ $(MKLIB) -o $(GLU_LIB) -linker '$(CXX)' -ldflags '$(LDFLAGS)' \
-major $(GLU_MAJOR) -minor $(GLU_MINOR) -patch $(GLU_TINY) \
-cplusplus $(MKLIB_OPTIONS) -install $(TOP)/$(LIB_DIR) \
$(GLU_LIB_DEPS) $(OBJECTS)
# Make the library
$(TOP)/$(LIB_DIR)/$(GLUT_LIB_NAME): depend $(OBJECTS)
- @$(TOP)/bin/mklib -o $(GLUT_LIB) -ldflags '$(LDFLAGS)' \
+ @$(MKLIB) -o $(GLUT_LIB) -ldflags '$(LDFLAGS)' $(MKLIB_OPTIONS) \
-major $(GLUT_MAJOR) -minor $(GLUT_MINOR) -patch $(GLUT_TINY) \
- -install $(TOP)/$(LIB_DIR) $(MKLIB_OPTIONS) $(GLUT_LIB_DEPS) \
- $(OBJECTS)
+ -install $(TOP)/$(LIB_DIR) $(GLUT_LIB_DEPS) $(OBJECTS)
clean:
-rm -f *.o
# Make the library
$(TOP)/$(LIB_DIR)/$(GLUT_LIB_NAME): depend $(OBJECTS)
- $(TOP)/bin/mklib -o $(GLUT_LIB) -linker '$(CC)' -ldflags '$(LDFLAGS)' \
+ $(MKLIB) -o $(GLUT_LIB) -linker '$(CC)' -ldflags '$(LDFLAGS)' \
-major $(GLUT_MAJOR) -minor $(GLUT_MINOR) -patch $(GLUT_TINY) \
$(GLUT_LIB_DEPS) -install $(TOP)/$(LIB_DIR) \
$(MKLIB_OPTIONS) $(OBJECTS)
# Make the library
$(TOP)/$(LIB_DIR)/$(GLUT_LIB_NAME): depend $(OBJECTS)
- $(TOP)/bin/mklib -o $(GLUT_LIB) -linker '$(CC)' -ldflags '$(LDFLAGS)' \
+ $(MKLIB) -o $(GLUT_LIB) -linker '$(CC)' -ldflags '$(LDFLAGS)' \
-major $(GLUT_MAJOR) -minor $(GLUT_MINOR) -patch $(GLUT_TINY) \
$(GLUT_LIB_DEPS) -install $(TOP)/$(LIB_DIR) \
$(MKLIB_OPTIONS) $(OBJECTS)
# Make the library
$(TOP)/$(LIB_DIR)/$(GLUT_LIB_NAME): depend $(OBJECTS)
- $(TOP)/bin/mklib -o $(GLUT_LIB) -linker '$(CC)' -ldflags '$(LDFLAGS)' \
+ $(MKLIB) -o $(GLUT_LIB) -linker '$(CC)' -ldflags '$(LDFLAGS)' \
-major $(GLUT_MAJOR) -minor $(GLUT_MINOR) \
-patch $(GLUT_TINY) $(MKLIB_OPTIONS) -install $(TOP)/$(LIB_DIR) \
$(GLUT_LIB_DEPS) $(OBJECTS)
# Make the library
$(TOP)/$(LIB_DIR)/$(GLUT_LIB_NAME): depend $(OBJECTS)
- $(TOP)/bin/mklib -o $(GLUT_LIB) -linker '$(CC)' -ldflags '$(LDFLAGS)' \
+ $(MKLIB) -o $(GLUT_LIB) -linker '$(CC)' -ldflags '$(LDFLAGS)' \
-major $(GLUT_MAJOR) -minor $(GLUT_MINOR) -patch $(GLUT_TINY) \
$(MKLIB_OPTIONS) -install $(TOP)/$(LIB_DIR) \
$(GLUT_LIB_DEPS) $(OBJECTS)
# Make the library
$(TOP)/$(LIB_DIR)/$(GLUT_LIB_NAME): depend $(OBJECTS)
- $(TOP)/bin/mklib -o $(GLUT_LIB) -linker '$(CC)' -ldflags '$(LDFLAGS)' \
+ $(MKLIB) -o $(GLUT_LIB) -linker '$(CC)' -ldflags '$(LDFLAGS)' \
-major $(GLUT_MAJOR) -minor $(GLUT_MINOR) -patch $(GLUT_TINY) \
$(GLUT_LIB_DEPS) -install $(TOP)/$(LIB_DIR) \
$(MKLIB_OPTIONS) $(OBJECTS)
# Make the library
$(TOP)/$(LIB_DIR)/$(GLW_LIB_NAME): $(OBJECTS)
- $(TOP)/bin/mklib -o $(GLW_LIB) -linker '$(CC)' -ldflags '$(LDFLAGS)' \
+ $(MKLIB) -o $(GLW_LIB) -linker '$(CC)' -ldflags '$(LDFLAGS)' \
-major $(MAJOR) -minor $(MINOR) -patch $(TINY) \
$(MKLIB_OPTIONS) -install $(TOP)/$(LIB_DIR) \
$(GLW_LIB_DEPS) $(OBJECTS)
# Make libGL
$(TOP)/$(LIB_DIR)/$(GL_LIB_NAME): $(OBJECTS) Makefile
- @ $(TOP)/bin/mklib -o $(GL_LIB) -linker '$(CC)' -ldflags '$(LDFLAGS)' \
+ @ $(MKLIB) -o $(GL_LIB) -linker '$(CC)' -ldflags '$(LDFLAGS)' \
-major 1 -minor 2 $(MKLIB_OPTIONS) \
-install $(TOP)/$(LIB_DIR) $(GL_LIB_DEPS) $(OBJECTS) \
$(LIBDRM_LIB) $(PCIACCESS_LIB)
# Make libGL
$(TOP)/$(LIB_DIR)/$(GL_LIB_NAME): $(OBJECTS) Makefile
- $(TOP)/bin/mklib -o $(GL_LIB) -linker '$(CC)' -ldflags '$(LDFLAGS)' \
+ $(MKLIB) -o $(GL_LIB) -linker '$(CC)' -ldflags '$(LDFLAGS)' \
-major 1 -minor 2 $(MKLIB_OPTIONS) \
-install $(TOP)/$(LIB_DIR) $(GL_LIB_DEPS) $(OBJECTS)
# Make archive of core mesa object files
libmesa.a: $(MESA_OBJECTS)
- @ $(TOP)/bin/mklib -o mesa -static $(MESA_OBJECTS)
+ @ $(MKLIB) -o mesa -static $(MESA_OBJECTS)
# Make archive of gl* API dispatcher functions only
libglapi.a: $(GLAPI_OBJECTS)
- @ $(TOP)/bin/mklib -o glapi -static $(GLAPI_OBJECTS)
+ @ $(MKLIB) -o glapi -static $(GLAPI_OBJECTS)
######################################################################
mkdir $(TOP)/$(LIB_DIR)
$(TOP)/$(LIB_DIR)/$(GL_LIB_NAME): $(OBJECTS) $(MESA_MODULES) $(GLU_MODULES)
- @$(TOP)/bin/mklib -o $(GL_LIB) -ldflags '$(LDFLAGS)' -install $(TOP)/$(LIB_DIR) \
+ @$(MKLIB) -o $(GL_LIB) -ldflags '$(LDFLAGS)' -install $(TOP)/$(LIB_DIR) \
-major $(MESA_MAJOR) -minor $(MESA_MINOR) -patch $(MESA_TINY) \
$(MKLIB_OPTIONS) $(GL_LIB_DEPS) $(OBJECTS) $(MESA_MODULES) $(GLU_MODULES)
# XXX this used to be in src/mesa/Makefile and is probably broken now
directfb-libgl: $(LIBS)
- @ $(TOP)/bin/mklib -o $(GL_LIB) -linker '$(CC)' -ldflags '$(LDFLAGS)' \
+ @ $(MKLIB) -o $(GL_LIB) -linker '$(CC)' -ldflags '$(LDFLAGS)' \
-major $(MESA_MAJOR) -minor $(MESA_MINOR) -patch $(MESA_TINY) \
-install $(TOP)/$(LIB_DIR) $(MKLIB_OPTIONS) $(LIBS) \
$(GL_LIB_DEPS)
$(LIBNAME): $(OBJECTS) $(MESA_MODULES) $(WINOBJ) Makefile $(TOP)/src/mesa/drivers/dri/Makefile.template
- $(TOP)/bin/mklib -ldflags '$(LDFLAGS)' -noprefix -o $@ \
+ $(MKLIB) -ldflags '$(LDFLAGS)' -noprefix -o $@ \
$(OBJECTS) $(MESA_MODULES) $(WINOBJ) $(DRI_LIB_DEPS)
$(TOP)/$(LIB_DIR)/$(GL_LIB_NAME): $(CORE_MESA) $(OBJECTS)
- @ $(TOP)/bin/mklib -o $(GL_LIB) \
- -linker '$(CC)' -ldflags '$(LDFLAGS)' \
+ @ $(MKLIB) -o $(GL_LIB) -linker '$(CC)' -ldflags '$(LDFLAGS)' \
-major $(MESA_MAJOR) -minor $(MESA_MINOR) -patch $(MESA_TINY) \
-install $(TOP)/$(LIB_DIR) $(MKLIB_OPTIONS) \
$(CORE_MESA) $(OBJECTS) $(GL_LIB_DEPS)
osmesa8: $(TOP)/lib/$(OSMESA_LIB_NAME)
$(TOP)/lib/$(OSMESA_LIB_NAME): $(OBJECTS)
- $(TOP)/bin/mklib -o $(OSMESA_LIB) \
- -linker "$(CC)" \
+ $(MKLIB) -o $(OSMESA_LIB) -linker "$(CC)" \
-major $(MESA_MAJOR) -minor $(MESA_MINOR) -patch $(MESA_TINY) \
-install $(TOP)/$(LIB_DIR) \
$(MKLIB_OPTIONS) \
# The libOSMesa16/libOSMesa32 libraries do not use libGL but rather are built
# with all the other Mesa sources (compiled with -DCHAN_BITS=16/32
osmesa16: $(OBJECTS) $(CORE_MESA)
- $(TOP)/bin/mklib -o $(OSMESA_LIB) \
- -linker "$(CC)" \
+ $(MKLIB) -o $(OSMESA_LIB) -linker "$(CC)" \
-major $(MESA_MAJOR) -minor $(MESA_MINOR) -patch $(MESA_TINY) \
-install $(TOP)/$(LIB_DIR) \
$(MKLIB_OPTIONS) \
$(TOP)/$(LIB_DIR)/$(GL_LIB_NAME): $(OBJECTS) $(CORE_MESA)
- @ $(TOP)/bin/mklib -o $(GL_LIB) \
- -linker '$(CC)' -ldflags '$(LDFLAGS)' \
+ @ $(MKLIB) -o $(GL_LIB) -linker '$(CC)' -ldflags '$(LDFLAGS)' \
-major $(GL_MAJOR) -minor $(GL_MINOR) -patch $(GL_TINY) \
-install $(TOP)/$(LIB_DIR) \
$(MKLIB_OPTIONS) $(GL_LIB_DEPS) $(OBJECTS) $(CORE_MESA)