softpipe: more work to get non-reduced primitives working in vbuf
[mesa.git] / src / gallium / auxiliary / gallivm / Makefile
index 39fac6ea4a56ccf2630085aa19e2c5ad6acd5a79..c3f7bfba93be5ed8ebc33f55d4194fd734665058 100644 (file)
@@ -15,7 +15,7 @@ GALLIVM_SOURCES = \
         storagesoa.cpp \
         instructionssoa.cpp
 
-INC_SOURCES = gallivm_builtins.cpp
+INC_SOURCES = gallivm_builtins.cpp gallivmsoabuiltins.cpp
 
 CPP_SOURCES = \
        $(GALLIVM_SOURCES)
@@ -65,8 +65,14 @@ depend: $(C_SOURCES) $(CPP_SOURCES) $(ASM_SOURCES) $(INC_SOURCES)
 
 
 gallivm_builtins.cpp: llvm_builtins.c
-       clang --emit-llvm $< |llvm-as|opt -std-compile-opts|llvm2cpp -gen-contents -o=$@ -f -for=shader -funcname=createGallivmBuiltins
+       clang --emit-llvm < $< |llvm-as|opt -std-compile-opts > temp1.bin
+       (echo "static const unsigned char llvm_builtins_data[] = {"; od -txC temp1.bin | sed -e "s/^[0-9]*//" -e s"/ \([0-9a-f][0-9a-f]\)/0x\1,/g" -e"\$$d" | sed -e"\$$s/,$$/};/") >$@
+       rm temp1.bin
 
+gallivmsoabuiltins.cpp: soabuiltins.c
+       clang --emit-llvm < $< |llvm-as|opt -std-compile-opts > temp2.bin
+       (echo "static const unsigned char soabuiltins_data[] = {"; od -txC temp2.bin | sed -e "s/^[0-9]*//" -e s"/ \([0-9a-f][0-9a-f]\)/0x\1,/g" -e"\$$d" | sed -e"\$$s/,$$/};/") >$@
+       rm temp2.bin
 
 # Emacs tags
 tags:
@@ -78,6 +84,7 @@ clean:
        -rm -f *.o */*.o *~ *.so *~ server/*.o
        -rm -f depend depend.bak
        -rm -f gallivm_builtins.cpp
+       -rm -f gallivmsoabuiltins.cpp
 
 symlinks: