3 include $(TOP
)/configs
/current
18 INC_SOURCES
= gallivm_builtins.
cpp gallivmsoabuiltins.
cpp
26 OBJECTS
= $(C_SOURCES
:.c
=.o
) \
27 $(CPP_SOURCES
:.
cpp=.o
) \
30 ### Include directories
33 -I
$(TOP
)/src
/gallium
/drivers \
34 -I
$(TOP
)/src
/gallium
/auxiliary \
35 -I
$(TOP
)/src
/gallium
/include \
43 $(CC
) -c
$(INCLUDES
) $(LLVM_CFLAGS
) $(CFLAGS
) $(DRIVER_DEFINES
) $< -o
$@
46 $(CXX
) -c
$(INCLUDES
) $(LLVM_CXXFLAGS
) $(CXXFLAGS
) $(DRIVER_DEFINES
) $< -o
$@
49 $(CC
) -c
$(INCLUDES
) $(CFLAGS
) $(DRIVER_DEFINES
) $< -o
$@
53 default
:: depend symlinks
$(LIBNAME
)
56 $(LIBNAME
): $(OBJECTS
) Makefile
57 $(TOP
)/bin
/mklib
-o
$@
-static
$(OBJECTS
)
60 depend
: $(C_SOURCES
) $(CPP_SOURCES
) $(ASM_SOURCES
) $(INC_SOURCES
)
63 $(MKDEP
) $(MKDEP_OPTIONS
) $(DRIVER_DEFINES
) $(INCLUDES
) $(C_SOURCES
) $(CPP_SOURCES
) \
64 $(ASM_SOURCES
) $(INC_SOURCES
) 2> /dev
/null
67 gallivm_builtins.
cpp: llvm_builtins.c
68 clang
--emit-llvm
< $< |llvm-as|opt
-std-compile-opts
> temp1.bin
69 (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/,$$/,0x00};/") >$@
72 gallivmsoabuiltins.
cpp: soabuiltins.c
73 clang
--emit-llvm
< $< |llvm-as|opt
-std-compile-opts
> temp2.bin
74 (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/,$$/,0x00};/") >$@
79 etags
`find . -name \*.[ch]` `find ../include`
82 # Remove .o and backup files
84 -rm -f
*.o
*/*.o
*~
*.so
*~ server
/*.o
85 -rm -f depend depend.bak
86 -rm -f gallivm_builtins.
cpp
87 -rm -f gallivmsoabuiltins.
cpp