Module: Mesa
Branch: master
Commit: 8260e9a8217bf003f490b17cbd9df93bf0cc6675
URL:    
http://cgit.freedesktop.org/mesa/mesa/commit/?id=8260e9a8217bf003f490b17cbd9df93bf0cc6675

Author: Chris Li <[email protected]>
Date:   Wed Feb 24 17:43:38 2010 -0800

gallium/llvmpipe: add PROGS target/rule to Makefile.template

So other directory can share it.
Also remove the libllvmpipe.a dependency from test
programs. It is not needed any more.

Signed-Off-By: Christopher Li <[email protected]>

---

 src/gallium/Makefile.template         |    7 +++++--
 src/gallium/drivers/llvmpipe/Makefile |   14 ++++++--------
 2 files changed, 11 insertions(+), 10 deletions(-)

diff --git a/src/gallium/Makefile.template b/src/gallium/Makefile.template
index 91a9b54..b5a9938 100644
--- a/src/gallium/Makefile.template
+++ b/src/gallium/Makefile.template
@@ -26,7 +26,7 @@ INCLUDES = \
 
 ##### TARGETS #####
 
-default: depend lib$(LIBNAME).a
+default: depend lib$(LIBNAME).a $(PROGS)
 
 lib$(LIBNAME).a: $(OBJECTS) $(EXTRA_OBJECTS) Makefile 
$(TOP)/src/gallium/Makefile.template
        $(MKLIB) -o $(LIBNAME) -static $(OBJECTS) $(EXTRA_OBJECTS)
@@ -36,13 +36,16 @@ depend: $(C_SOURCES) $(CPP_SOURCES) $(ASM_SOURCES) 
$(SYMLINKS) $(GENERATED_SOURC
        touch depend
        $(MKDEP) $(MKDEP_OPTIONS) $(INCLUDES) $(C_SOURCES) $(CPP_SOURCES) 
$(ASM_SOURCES) $(GENERATED_SOURCES) 2> /dev/null
 
+$(PROGS): % : %.o
+       $(LD) $(filter %.o,$^) -o $@ -Wl,--start-group  $(LIBS) -Wl,--end-group
+
 # Emacs tags
 tags:
        etags `find . -name \*.[ch]` `find $(TOP)/src/gallium/include -name 
\*.h`
 
 # Remove .o and backup files
 clean:
-       rm -f $(OBJECTS) $(GENERATED_SOURCES) lib$(LIBNAME).a depend depend.bak
+       rm -f $(OBJECTS) $(GENERATED_SOURCES) $(PROGS) lib$(LIBNAME).a depend 
depend.bak
 
 # Dummy target
 install:
diff --git a/src/gallium/drivers/llvmpipe/Makefile 
b/src/gallium/drivers/llvmpipe/Makefile
index 89c06ea..74d728d 100644
--- a/src/gallium/drivers/llvmpipe/Makefile
+++ b/src/gallium/drivers/llvmpipe/Makefile
@@ -42,6 +42,10 @@ C_SOURCES = \
 
 CPP_SOURCES = \
 
+PROGS := lp_test_format        \
+        lp_test_blend  \
+        lp_test_conv
+
 
 include ../../Makefile.template
 
@@ -49,13 +53,7 @@ lp_tile_soa.c: lp_tile_soa.py 
../../auxiliary/util/u_format_parse.py ../../auxil
        python lp_tile_soa.py ../../auxiliary/util/u_format.csv > $@
 
 
-testprogs := lp_test_format    \
-            lp_test_blend      \
-            lp_test_conv
-
-LIBS += $(GL_LIB_DEPS) -L. -lllvmpipe -L../../auxiliary/ -lgallium
+LIBS += $(GL_LIB_DEPS) -L../../auxiliary/ -lgallium
 
-#$(testprogs): lp_test_% : lp_test_%.o lp_test_main.o libllvmpipe.a
-#      $(LD) $(filter %.o,$^) -o $@ -Wl,--start-group  $(LIBS) -Wl,--end-group
+$(PROGS): lp_test_main.o
 
-#default: $(testprogs)

_______________________________________________
mesa-commit mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/mesa-commit

Reply via email to