OSDN Git Service

Replace tacky wrapper macros with tacky in-line type-casts
[android-x86/external-mesa.git] / Makefile
1 CSRCS = symbol_table.c hash_table.c glsl_types.c 
2 CCSRCS = glsl_parser.tab.cpp glsl_lexer.cpp glsl_parser_extras.cpp \
3         ast_expr.cpp
4 #       ast_to_hir.cpp ir.cpp hir_field_selection.cpp
5 OBJS = $(CSRCS:.c=.o)  $(CCSRCS:.cpp=.o)
6
7 CC = gcc
8 CXX = g++
9 WARN     = -Wall -Wextra -Wunsafe-loop-optimizations -Wstack-protector \
10         -Wunreachable-code
11 CPPFLAGS = -D_FORTIFY_SOURCE=2 -D_GNU_SOURCE
12 CFLAGS   = -O0 -ggdb3 -fstack-protector $(CPPFLAGS) $(WARN) -std=c89 -ansi -pedantic
13 CXXFLAGS = -O0 -ggdb3 -fstack-protector $(CPPFLAGS) $(WARN)
14 LDLAGS   = -ggdb3
15
16 glsl: $(OBJS)
17         $(CXX) $(LDLAGS) $(OBJS) -o glsl
18
19 glsl_parser.tab.cpp glsl_parser.tab.h: glsl_parser.y
20         bison --report-file=glsl_parser.output -v -d \
21             --output=glsl_parser.tab.cpp \
22             --name-prefix=_mesa_glsl_ $< && \
23         mv glsl_parser.tab.hpp glsl_parser.tab.h
24
25 glsl_lexer.cpp: glsl_lexer.l
26         flex --outfile="glsl_lexer.cpp" $<
27
28 glsl_parser_tab.o: glsl_parser.tab.cpp
29 glsl_types.o: glsl_types.c glsl_types.h builtin_types.h
30 glsl_lexer.o: glsl_lexer.cpp glsl_parser.tab.h glsl_parser_extras.h ast.h
31 glsl_parser.o:  glsl_parser_extras.h ast.h
32 ast_to_hir.o: ast_to_hir.cpp symbol_table.h glsl_parser_extras.h ast.h glsl_types.h ir.h
33
34 builtin_types.h: builtin_types.sh
35         ./builtin_types.sh > builtin_types.h
36
37 clean:
38         rm -f $(OBJS) glsl
39         rm -f glsl_lexer.cpp glsl_parser.tab.{cpp,h,hpp} glsl_parser.output
40         rm -f builtin_types.h
41         rm -f *~