summaryrefslogtreecommitdiff
path: root/src/mesa/Makefile
diff options
context:
space:
mode:
authorEric Anholt <eric@anholt.net>2010-06-21 11:29:15 -0700
committerEric Anholt <eric@anholt.net>2010-06-24 17:23:21 -0700
commit0a1b54df7ac118722bb627c61cb322cb4e248ace (patch)
treec01794fe2833bbfa38a24e975d000ee00804271a /src/mesa/Makefile
parent3d6012303c3ce24c75d209267e6914f706d025c5 (diff)
glsl2: Replace the GLSL compiler with the glsl2 project.
Diffstat (limited to 'src/mesa/Makefile')
-rw-r--r--src/mesa/Makefile19
1 files changed, 10 insertions, 9 deletions
diff --git a/src/mesa/Makefile b/src/mesa/Makefile
index 4f81768924..84ced27953 100644
--- a/src/mesa/Makefile
+++ b/src/mesa/Makefile
@@ -35,16 +35,24 @@ MESA_GALLIUM_OBJECTS := $(addprefix $(MESA_OBJ_DIR)/, $(MESA_GALLIUM_OBJECTS))
MESA_INCLUDES := $(INCLUDE_DIRS)
ES1_INCLUDES := -I$(TOP)/src/mapi/es1api $(INCLUDE_DIRS)
ES2_INCLUDES := -I$(TOP)/src/mapi/es2api $(INCLUDE_DIRS)
-
+MESA_INCLUDES := -I$(TOP)/src/glsl $(MESA_INCLUDES)
define mesa-cc-c
@mkdir -p $(dir $@)
$(CC) -c -o $@ $< $($(1)_CPPFLAGS) $($(1)_INCLUDES) $(CFLAGS)
endef
+define mesa-cxx-c
+ @mkdir -p $(dir $@)
+ $(CXX) -c -o $@ $< $($(1)_CPPFLAGS) $($(1)_INCLUDES) $(CXXFLAGS)
+endef
+
$(MESA_OBJ_DIR)/%.o: %.c
$(call mesa-cc-c,MESA)
+$(MESA_OBJ_DIR)/%.o: %.cpp
+ $(call mesa-cxx-c,MESA)
+
$(MESA_OBJ_DIR)/%.o: %.S
$(call mesa-cc-c,MESA)
@@ -63,7 +71,7 @@ $(ES2_OBJ_DIR)/%.o: %.S
# Default: build dependencies, then asm_subdirs, GLSL built-in lib,
# then convenience libs (.a) and finally the device drivers:
-default: $(DEPENDS) asm_subdirs glsl_builtin \
+default: $(DEPENDS) asm_subdirs \
$(MESA_LIBS) $(ES1_LIBS) $(ES2_LIBS) driver_subdirs
main/api_exec_es1.c: main/APIspec.xml main/es_generator.py main/APIspecutil.py main/APIspec.py
@@ -114,12 +122,6 @@ asm_subdirs:
######################################################################
-# GLSL built-in library
-glsl_builtin:
- (cd shader/slang/library && $(MAKE)) || exit 1 ;
-
-
-######################################################################
# Dependency generation
depend: $(ALL_SOURCES)
@@ -234,7 +236,6 @@ clean: clean-es1 clean-es2
-rm -f depend depend.bak libmesa.a libmesagallium.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