2 include $(TOP
)/configs
/current
6 -I
$(TOP
)/src
/gallium
/include \
7 -I
$(TOP
)/src
/gallium
/auxiliary \
8 -I
$(TOP
)/src
/egl
/main \
9 -I
$(TOP
)/src
/egl
/wayland
/wayland-drm
/ \
12 common_SOURCES
= $(wildcard common
/*.c
)
13 common_OBJECTS
= $(common_SOURCES
:.c
=.o
)
16 -I
$(TOP
)/src
/gallium
/drivers \
21 $(shell pkg-config
--cflags-only-I libdrm dri2proto
)
23 x11_SOURCES
= $(wildcard x11
/*.c
) \
25 x11_OBJECTS
= $(x11_SOURCES
:.c
=.o
)
28 -I
$(TOP
)/src
/gallium
/winsys \
29 -I
$(TOP
)/src
/egl
/wayland
/wayland-egl \
30 -I
$(TOP
)/src
/egl
/wayland
/wayland-drm \
31 $(shell pkg-config
--cflags-only-I libdrm wayland-client
)
33 wayland_SOURCES
= $(wildcard wayland
/*.c
)
34 wayland_OBJECTS
= $(wayland_SOURCES
:.c
=.o
)
36 drm_INCLUDES
= -I
$(TOP
)/src
/gallium
/winsys
$(shell pkg-config
--cflags-only-I libdrm
) \
37 -I
$(TOP
)/src
/gbm
/main
-I
$(TOP
)/src
/gallium
/state_trackers
/gbm
38 drm_SOURCES
= $(wildcard drm
/*.c
)
39 drm_OBJECTS
= $(drm_SOURCES
:.c
=.o
)
42 fbdev_INCLUDES
= -I
$(TOP
)/src
/gallium
/winsys
/sw
43 fbdev_SOURCES
= $(wildcard fbdev
/*.c
)
44 fbdev_OBJECTS
= $(fbdev_SOURCES
:.c
=.o
)
47 ALL_INCLUDES
= $(common_INCLUDES
) $(x11_INCLUDES
) $(drm_INCLUDES
) $(fbdev_INCLUDES
)
48 ALL_SOURCES
= $(common_SOURCES
) $(x11_SOURCES
) $(drm_SOURCES
) $(fbdev_SOURCES
)
50 EGL_OBJECTS
= $(common_OBJECTS
)
51 EGL_CPPFLAGS
= $(common_INCLUDES
)
54 ifneq ($(findstring x11
, $(EGL_PLATFORMS
)),)
55 EGL_OBJECTS
+= $(x11_OBJECTS
)
56 EGL_CPPFLAGS
+= -DHAVE_X11_BACKEND
58 ifneq ($(findstring wayland
, $(EGL_PLATFORMS
)),)
59 EGL_OBJECTS
+= $(wayland_OBJECTS
)
60 EGL_CPPFLAGS
+= -DHAVE_WAYLAND_BACKEND
61 DEFINES
+= -DHAVE_WAYLAND_BACKEND
63 ifneq ($(findstring drm
, $(EGL_PLATFORMS
)),)
64 EGL_OBJECTS
+= $(drm_OBJECTS
)
65 EGL_CPPFLAGS
+= -DHAVE_DRM_BACKEND
67 ifneq ($(findstring fbdev
, $(EGL_PLATFORMS
)),)
68 EGL_OBJECTS
+= $(fbdev_OBJECTS
)
69 EGL_CPPFLAGS
+= -DHAVE_FBDEV_BACKEND
74 default
: depend libegl.a
76 libegl.a
: $(EGL_OBJECTS
) Makefile
77 $(MKLIB
) -o egl
-static
$(EGL_OBJECTS
)
82 $(MKDEP
) $(MKDEP_OPTIONS
) $(ALL_INCLUDES
) $(ALL_SOURCES
) 2> /dev
/null
87 rm -f depend depend.bak
96 $(CC
) -c
$(common_INCLUDES
) $($(1)_INCLUDES
) $(DEFINES
) $(CFLAGS
) $< -o
$@
99 $(common_OBJECTS
): %.o
: %.c
100 $(CC
) -c
$(EGL_CPPFLAGS
) $(DEFINES
) $(CFLAGS
) $< -o
$@
102 $(x11_OBJECTS
): %.o
: %.c
105 $(wayland_OBJECTS
): %.o
: %.c
106 $(call egl-cc
,wayland
)
108 $(drm_OBJECTS
): %.o
: %.c
111 $(fbdev_OBJECTS
): %.o
: %.c