diff options
author | Zack Rusin <[email protected]> | 2008-01-04 09:27:42 -0500 |
---|---|---|
committer | Zack Rusin <[email protected]> | 2008-01-04 09:27:42 -0500 |
commit | 9789c301b476b1127f847144fd5c8313e6ba8be8 (patch) | |
tree | 9d0de9d3d09063870b8671e2bec6679e1dd19d23 /src/mesa/pipe/llvm/Makefile | |
parent | 3385f3d250df1ad6899c0ac59a8f6b845cc5d504 (diff) |
llvm: we need custom rules so had to redo the build a little bit
also don't use sse when llvm is enabled
Diffstat (limited to 'src/mesa/pipe/llvm/Makefile')
-rw-r--r-- | src/mesa/pipe/llvm/Makefile | 80 |
1 files changed, 80 insertions, 0 deletions
diff --git a/src/mesa/pipe/llvm/Makefile b/src/mesa/pipe/llvm/Makefile new file mode 100644 index 00000000000..b1463f67cf7 --- /dev/null +++ b/src/mesa/pipe/llvm/Makefile @@ -0,0 +1,80 @@ +# -*-makefile-*- +TOP = ../../../.. +include $(TOP)/configs/current + +LIBNAME = gallivm + + +GALLIVM_SOURCES = \ + gallivm.cpp \ + instructions.cpp \ + storage.cpp + +INC_SOURCES = gallivm_builtins.cpp llvm_base_shader.cpp + +CPP_SOURCES = \ + $(GALLIVM_SOURCES) + +C_SOURCES = +ASM_SOURCES = + +OBJECTS = $(C_SOURCES:.c=.o) \ + $(CPP_SOURCES:.cpp=.o) \ + $(ASM_SOURCES:.S=.o) + +### Include directories +INCLUDES = \ + -I. \ + -I$(TOP)/src/mesa/pipe \ + -I$(TOP)/src/mesa \ + -I$(TOP)/include + + +##### RULES ##### + +.c.o: + $(CC) -c $(INCLUDES) $(LLVM_CFLAGS) $(CFLAGS) $(DRIVER_DEFINES) $< -o $@ + +.cpp.o: + $(CXX) -c $(INCLUDES) $(LLVM_CXXFLAGS) $(CXXFLAGS) $(DRIVER_DEFINES) $< -o $@ + +.S.o: + $(CC) -c $(INCLUDES) $(CFLAGS) $(DRIVER_DEFINES) $< -o $@ + +##### TARGETS ##### + +default:: depend symlinks $(LIBNAME) + + +$(LIBNAME): $(OBJECTS) Makefile + $(TOP)/bin/mklib -o $@ -static $(OBJECTS) + + +depend: $(C_SOURCES) $(CPP_SOURCES) $(ASM_SOURCES) $(INC_SOURCES) + rm -f depend + touch depend + $(MKDEP) $(MKDEP_OPTIONS) $(DRIVER_DEFINES) $(INCLUDES) $(C_SOURCES) $(CPP_SOURCES) \ + $(ASM_SOURCES) $(INC_SOURCES) 2> /dev/null + + +gallivm_builtins.cpp: llvm_builtins.c + clang --emit-llvm $< |llvm-as|opt -std-compile-opts|llvm2cpp -gen-contents -o=$@ -f -for=shader -funcname=createGallivmBuiltins + +llvm_base_shader.cpp: llvm_entry.c + clang --emit-llvm $< |llvm-as |opt -std-compile-opts |llvm2cpp -for=Shader -gen-module -o=$@ -funcname=createBaseShader + +# Emacs tags +tags: + etags `find . -name \*.[ch]` `find ../include` + + +# Remove .o and backup files +clean: + -rm -f *.o */*.o *~ *.so *~ server/*.o + -rm -f depend depend.bak + -rm -f gallivm_builtins.cpp llvm_base_shader.cpp + +symlinks: + + +include depend |