4 include $(TOP)/configs/current
6 MESA_LIBS := libmesa.a libmesagallium.a
12 # define preprocessor flags
13 MESA_CPPFLAGS := $(API_DEFINES) $(DEFINES)
16 MESA_CPPFLAGS += $(INCLUDE_DIRS)
19 CFLAGS := $(filter-out $(DEFINES), $(CFLAGS))
20 CXXFLAGS := $(filter-out $(DEFINES), $(CXXFLAGS))
22 # LLVM is needed for the state tracker
23 MESA_CFLAGS := $(LLVM_CFLAGS) $(CFLAGS)
24 MESA_CXXFLAGS := $(LLVM_CFLAGS) $(CXXFLAGS)
27 $(CC) -c -o $@ $< $(MESA_CPPFLAGS) $(MESA_CFLAGS)
30 $(CXX) -c -o $@ $< $(MESA_CPPFLAGS) $(MESA_CXXFLAGS)
33 $(CC) -c -o $@ $< $(MESA_CPPFLAGS) $(MESA_CFLAGS)
35 # Default: build dependencies, then asm_subdirs, GLSL built-in lib,
36 # then convenience libs (.a) and finally the device drivers:
37 default: $(DEPENDS) $(MESA_LIBS)
39 ######################################################################
40 # Helper libraries used by many drivers:
42 # Make archive of core mesa object files
43 libmesa.a: $(MESA_OBJECTS) $(GLSL_LIBS)
44 @ $(MKLIB) -o mesa -static $(MESA_OBJECTS) $(GLSL_LIBS)
46 # Make archive of subset of core mesa object files for gallium
47 libmesagallium.a: $(MESA_GALLIUM_OBJECTS) $(GLSL_LIBS)
48 @ $(MKLIB) -o mesagallium -static $(MESA_GALLIUM_OBJECTS) $(GLSL_LIBS)
50 ######################################################################
51 # Dependency generation
53 depend: $(ALL_FILES) main/git_sha1.h
54 @ echo "running $(MKDEP)"
56 @$(MKDEP) $(MKDEP_OPTIONS) $(MESA_CPPFLAGS) \
57 $(ALL_FILES) > /dev/null 2>/dev/null
59 ######################################################################
62 install: default $(DRICORE_INSTALL_TARGET)
63 @for driver in $(DRIVER_DIRS) ; do \
65 osmesa) $(MAKE) -f Makefile.old install-osmesa || exit 1 ;; \
69 install-osmesa: default
70 $(MINSTALL) $(TOP)/$(LIB_DIR)/$(OSMESA_LIB_GLOB) \
71 $(DESTDIR)$(INSTALL_LIB_DIR)
75 etags `find . -name \*.[ch]` $(TOP)/include/GL/*.h
80 -rm -f depend depend.bak libmesa.a libmesagallium.a