summaryrefslogtreecommitdiffstats
path: root/src/mesa/es/sources.mak
blob: 9bb7a6ff38c644abfd51f3ac659c4bf82857718d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
include $(MESA)/sources.mak

# always use local version of GLAPI_ASM_SOURCES
LOCAL_ES1_API_ASM := $(addprefix glapi/glapi-es1/, $(GLAPI_ASM_SOURCES))

LOCAL_ES1_INCLUDES :=			\
	-I.				\
	-I./glapi/glapi-es1		\
	-I$(MESA)/state_tracker

LOCAL_ES2_API_ASM := $(subst es1,es2, $(LOCAL_ES1_API_ASM))
LOCAL_ES2_INCLUDES := $(subst es1,es2, $(LOCAL_ES1_INCLUDES))

# MESA sources
# Ideally, the omit list should be replaced by features.

MAIN_OMITTED :=				\
	main/api_exec.c			\
	main/condrender.c		\
	main/dlopen.c			\
	main/get.c
MAIN_SOURCES := $(filter-out $(MAIN_OMITTED), $(MAIN_SOURCES))

VBO_OMITTED :=				\
	vbo/vbo_save.c			\
	vbo/vbo_save_api.c		\
	vbo/vbo_save_draw.c		\
	vbo/vbo_save_loopback.c
VBO_SOURCES := $(filter-out $(VBO_OMITTED), $(VBO_SOURCES))

STATETRACKER_OMITTED :=				\
	state_tracker/st_api.c			\
	state_tracker/st_cb_drawpixels.c	\
	state_tracker/st_cb_feedback.c		\
	state_tracker/st_cb_rasterpos.c		\
	state_tracker/st_draw_feedback.c
STATETRACKER_SOURCES := $(filter-out $(STATETRACKER_OMITTED), $(STATETRACKER_SOURCES))

SHADER_OMITTED :=			\
	shader/atifragshader.c
SHADER_SOURCES := $(filter-out $(SHADER_OMITTED), $(SHADER_SOURCES))

MESA_ES1_SOURCES :=			\
	$(MAIN_SOURCES)			\
	$(MATH_SOURCES)			\
	$(MATH_XFORM_SOURCES)		\
	$(VBO_SOURCES)			\
	$(TNL_SOURCES)			\
	$(SHADER_SOURCES)		\
	$(SWRAST_SOURCES)		\
	$(SWRAST_SETUP_SOURCES)		\
	$(COMMON_DRIVER_SOURCES)	\
	$(ASM_C_SOURCES)		\
	$(SLANG_SOURCES)

MESA_ES1_GALLIUM_SOURCES :=		\
	$(MAIN_SOURCES)			\
	$(MATH_SOURCES)			\
	$(VBO_SOURCES)			\
	$(STATETRACKER_SOURCES)		\
	$(SHADER_SOURCES)		\
	ppc/common_ppc.c		\
	x86/common_x86.c		\
	$(SLANG_SOURCES)

MESA_ES1_API_SOURCES :=			\
	$(GLAPI_SOURCES)

MESA_ES1_INCLUDES := $(INCLUDE_DIRS)

# right now es2 and es1 share MESA sources
MESA_ES2_SOURCES := $(MESA_ES1_SOURCES)
MESA_ES2_GALLIUM_SOURCES := $(MESA_ES1_GALLIUM_SOURCES)
MESA_ES2_API_SOURCES := $(MESA_ES1_API_SOURCES)

MESA_ES2_INCLUDES := $(MESA_ES1_INCLUDES)

# asm is shared by any ES version and any library
MESA_ES_ASM := $(MESA_ASM_SOURCES)

# collect sources, adjust the pathes
ES1_SOURCES := $(addprefix $(MESA)/,$(MESA_ES1_SOURCES))
ES1_GALLIUM_SOURCES := $(addprefix $(MESA)/,$(MESA_ES1_GALLIUM_SOURCES))
ES1_API_SOURCES := $(addprefix $(MESA)/,$(MESA_ES1_API_SOURCES))

ES2_SOURCES := $(addprefix $(MESA)/,$(MESA_ES2_SOURCES))
ES2_GALLIUM_SOURCES := $(addprefix $(MESA)/,$(MESA_ES2_GALLIUM_SOURCES))
ES2_API_SOURCES := $(addprefix $(MESA)/,$(MESA_ES2_API_SOURCES))

# collect includes
ES1_INCLUDES := $(LOCAL_ES1_INCLUDES) $(MESA_ES1_INCLUDES)
ES2_INCLUDES := $(LOCAL_ES2_INCLUDES) $(MESA_ES2_INCLUDES)

# collect objects, including asm
ES1_OBJECTS :=					\
	$(MESA_ES1_SOURCES:.c=.o)		\
	$(MESA_ES_ASM:.S=.o)

ES1_GALLIUM_OBJECTS :=				\
	$(MESA_ES1_GALLIUM_SOURCES:.c=.o)	\
	$(MESA_ES_ASM:.S=.o)

ES1_API_OBJECTS :=				\
	$(LOCAL_ES1_API_ASM:.S=.o)		\
	$(MESA_ES1_API_SOURCES:.c=.o)

ES2_OBJECTS :=					\
	$(MESA_ES2_SOURCES:.c=.o)		\
	$(MESA_ES_ASM:.S=.o)

ES2_GALLIUM_OBJECTS :=				\
	$(MESA_ES2_GALLIUM_SOURCES:.c=.o)	\
	$(MESA_ES_ASM:.S=.o)

ES2_API_OBJECTS :=				\
	$(LOCAL_ES2_API_ASM:.S=.o)		\
	$(MESA_ES2_API_SOURCES:.c=.o)

# collect sources for makedepend
ES1_ALL_SOURCES := $(ES1_SOURCES) $(ES1_GALLIUM_SOURCES) $(ES1_API_SOURCES)
ES2_ALL_SOURCES := $(ES2_SOURCES) $(ES2_GALLIUM_SOURCES) $(ES2_API_SOURCES)

# sort to remove duplicates
ES1_ALL_SOURCES := $(sort $(ES1_ALL_SOURCES))
ES2_ALL_SOURCES := $(sort $(ES2_ALL_SOURCES))