wayland-drm: Drop the non-premul formats, use format codes from drm_fourcc.h
[mesa.git] / src / egl / wayland / wayland-egl / Makefile
1 # src/egl/wayland/wayland-egl/Makefile
2
3 TOP = ../../../..
4 include $(TOP)/configs/current
5
6 INCLUDE_DIRS = -I$(TOP)/include \
7 -I$(TOP)/include/EGL \
8 -I$(TOP)/src/egl/wayland/wayland-drm
9
10
11 HEADERS = wayland-egl-priv.h
12 SOURCES = wayland-egl.c
13
14 OBJECTS = $(SOURCES:.c=.o)
15
16 LOCAL_CFLAGS = $(LIBDRM_CFLAGS) \
17 $(WAYLAND_CFLAGS)
18
19 LOCAL_LIBS =
20
21 .c.o:
22 $(CC) -c $(INCLUDE_DIRS) $(CFLAGS) $(LOCAL_CFLAGS) $< -o $@
23
24
25 default: depend library
26
27 # wayland-egl Library
28 library: $(TOP)/$(LIB_DIR)/$(WAYLAND_EGL_LIB_NAME)
29
30 $(TOP)/$(LIB_DIR)/$(WAYLAND_EGL_LIB_NAME): $(OBJECTS) $(LOCAL_LIBS)
31 $(MKLIB) -o $(WAYLAND_EGL_LIB) -linker '$(CC)' -ldflags '$(LDFLAGS)' \
32 -install $(TOP)/$(LIB_DIR) $(MKLIB_OPTIONS) \
33 -L$(TOP)/$(LIB_DIR) $(WAYLAND_EGL_LIB_DEPS) \
34 $(OBJECTS) $(LOCAL_LIBS)
35
36 PKG_CONFIG_DIR = $(INSTALL_LIB_DIR)/pkgconfig
37
38 gl_pcedit = sed \
39 -e 's,@INSTALL_DIR@,$(INSTALL_DIR),' \
40 -e 's,@INSTALL_LIB_DIR@,$(INSTALL_LIB_DIR),' \
41 -e 's,@INSTALL_INC_DIR@,$(INSTALL_INC_DIR),' \
42 -e 's,@VERSION@,$(MESA_MAJOR).$(MESA_MINOR).$(MESA_TINY),' \
43 -e 's,@WAYLAND_EGL_PC_REQ_PRIV@,$(WAYLAND_EGL_PC_REQ_PRIV),' \
44 -e 's,@WAYLAND_EGL_PC_LIB_PRIV@,$(WAYLAND_EGL_PC_LIB_PRIV),' \
45 -e 's,@WAYLAND_EGL_PC_CFLAGS@,$(WAYLAND_EGL_PC_CFLAGS),' \
46 -e 's,@WAYLAND_EGL_LIB@,$(WAYLAND_EGL_LIB),'
47
48 wayland-egl.pc: wayland-egl.pc.in
49 $(gl_pcedit) $< > $@
50
51 install: default wayland-egl.pc
52 $(INSTALL) -d $(DESTDIR)$(INSTALL_LIB_DIR)
53 $(MINSTALL) $(TOP)/$(LIB_DIR)/$(WAYLAND_EGL_LIB_GLOB) \
54 $(DESTDIR)$(INSTALL_LIB_DIR)
55 $(INSTALL) -d $(DESTDIR)$(PKG_CONFIG_DIR)
56 $(INSTALL) -m 644 wayland-egl.pc $(DESTDIR)$(PKG_CONFIG_DIR)
57
58 clean:
59 -rm -f *.o
60 -rm -f depend depend.bak
61
62 depend: $(SOURCES) $(HEADERS)
63 @ echo "running $(MKDEP)"
64 @ rm -f depend
65 @ touch depend
66 $(MKDEP) $(MKDEP_OPTIONS) $(DEFINES) $(INCLUDE_DIRS) \
67 $(SOURCES) $(HEADERS) > /dev/null 2>/dev/null
68
69
70 -include depend
71 # DO NOT DELETE