6 include $(TOP
)/configs
/current
9 ES1_LIBS
:= libes1gallium.a libes1api.a
10 ES2_LIBS
:= libes2gallium.a libes2api.a
12 # Default rule: create ES1 and ES2 libs
14 default
: subdirs depend es1 es2
20 # force the inclusion of es's mfeatures.h
21 ES1_CPPFLAGS
:= -include main
/mfeatures_es1.h
-D__GL_EXPORTS
22 ES2_CPPFLAGS
:= -include main
/mfeatures_es2.h
-D__GL_EXPORTS
24 ES1_OBJ_DIR
:= objs-es1
25 ES2_OBJ_DIR
:= objs-es2
28 ES1_OBJECTS
:= $(addprefix $(ES1_OBJ_DIR
)/, $(ES1_OBJECTS
))
29 ES1_GALLIUM_OBJECTS
:= $(addprefix $(ES1_OBJ_DIR
)/, $(ES1_GALLIUM_OBJECTS
))
30 ES1_API_OBJECTS
:= $(addprefix $(ES1_OBJ_DIR
)/, $(ES1_API_OBJECTS
))
32 ES2_OBJECTS
:= $(addprefix $(ES2_OBJ_DIR
)/, $(ES2_OBJECTS
))
33 ES2_GALLIUM_OBJECTS
:= $(addprefix $(ES2_OBJ_DIR
)/, $(ES2_GALLIUM_OBJECTS
))
34 ES2_API_OBJECTS
:= $(addprefix $(ES2_OBJ_DIR
)/, $(ES2_API_OBJECTS
))
36 # compile either ES1 or ES2 sources
39 $(CC
) -c
$(CFLAGS
) $(ES
$(1)_CPPFLAGS
) $(ES
$(1)_INCLUDES
) -o
$@
$<
42 $(ES1_OBJ_DIR
)/%.o
: %.c
45 $(ES1_OBJ_DIR
)/%.o
: %.S
48 $(ES1_OBJ_DIR
)/%.o
: $(MESA
)/%.c
51 $(ES1_OBJ_DIR
)/%.o
: $(MESA
)/%.S
54 $(ES2_OBJ_DIR
)/%.o
: %.c
57 $(ES2_OBJ_DIR
)/%.o
: %.S
60 $(ES2_OBJ_DIR
)/%.o
: $(MESA
)/%.c
63 $(ES2_OBJ_DIR
)/%.o
: $(MESA
)/%.S
66 libes1.a
: $(ES1_OBJECTS
)
67 @
$(TOP
)/bin
/mklib
-o es1
-static
$(ES1_OBJECTS
)
69 libes2.a
: $(ES2_OBJECTS
)
70 @
$(TOP
)/bin
/mklib
-o es2
-static
$(ES1_OBJECTS
)
72 libes1gallium.a
: $(ES1_GALLIUM_OBJECTS
)
73 @
$(TOP
)/bin
/mklib
-o es1gallium
-static
$(ES1_GALLIUM_OBJECTS
)
75 libes2gallium.a
: $(ES2_GALLIUM_OBJECTS
)
76 @
$(TOP
)/bin
/mklib
-o es2gallium
-static
$(ES2_GALLIUM_OBJECTS
)
78 libes1api.a
: $(ES1_API_OBJECTS
)
79 @
$(TOP
)/bin
/mklib
-o es1api
-static
$(ES1_API_OBJECTS
)
81 libes2api.a
: $(ES2_API_OBJECTS
)
82 @
$(TOP
)/bin
/mklib
-o es2api
-static
$(ES2_API_OBJECTS
)
84 GENERATED_SOURCES
:= \
90 main
/api_exec_es1.c
: main
/APIspec.txt main
/es_generator.py main
/apiutil.py main
/es1_special
91 $(PYTHON2
) $(PYTHON_FLAGS
) main
/es_generator.py
-S main
/APIspec.txt
-V GLES1.1
> $@
93 main
/api_exec_es2.c
: main
/APIspec.txt main
/es_generator.py main
/apiutil.py main
/es2_special
94 $(PYTHON2
) $(PYTHON_FLAGS
) main
/es_generator.py
-S main
/APIspec.txt
-V GLES2.0
> $@
96 main
/get_es1.c
: main
/get_gen.py
97 $(PYTHON2
) $(PYTHON_FLAGS
) $< 1 > $@
99 main
/get_es2.c
: main
/get_gen.py
100 $(PYTHON2
) $(PYTHON_FLAGS
) $< 2 > $@
104 -rm -f
$(ES1_LIBS
) $(ES2_LIBS
)
105 -rm -rf
$(ES1_OBJ_DIR
) $(ES2_OBJ_DIR
)
106 -rm -f
$(GENERATED_SOURCES
)
115 make
-C
$(MESA
) asm_subdirs
117 depend
: $(ES1_ALL_SOURCES
) $(ES2_ALL_SOURCES
)
118 @echo
"running $(MKDEP)"
120 @
# MESA is "..", but luckily, directories are longer than 2 characters
121 @
$(MKDEP
) -f-
-p
$(ES1_OBJ_DIR
)/ $(DEFINES
) $(ES1_CFLAGS
) \
122 $(ES1_INCLUDES
) $(ES1_ALL_SOURCES
) 2>/dev
/null | \
123 sed
-e
's,^$(ES1_OBJ_DIR)/$(MESA)/,$(ES1_OBJ_DIR)/,' > depend
124 @
$(MKDEP
) -f-
-p
$(ES2_OBJ_DIR
)/ $(DEFINES
) $(ES2_CFLAGS
) \
125 $(ES2_INCLUDES
) $(ES2_ALL_SOURCES
) 2>/dev
/null | \
126 sed
-e
's,^$(ES2_OBJ_DIR)/$(MESA)/,$(ES2_OBJ_DIR)/,' >> depend