From 8b902056d53e0e14f7d58ac7f95091ab06abc72e Mon Sep 17 00:00:00 2001 From: Benjamin Franzke Date: Tue, 24 Jan 2012 20:38:01 +0100 Subject: automake: src/egl/wayland So we can use the wayland scanner makro, which is way better than our previous runtime-pkgconfig hack. Reviewed-by: Matt Turner --- src/egl/wayland/.gitignore | 9 ++++ src/egl/wayland/Makefile | 30 ----------- src/egl/wayland/Makefile.am | 1 + src/egl/wayland/wayland-drm/.gitignore | 3 -- src/egl/wayland/wayland-drm/Makefile | 47 ------------------ src/egl/wayland/wayland-drm/Makefile.am | 15 ++++++ src/egl/wayland/wayland-egl/Makefile | 71 --------------------------- src/egl/wayland/wayland-egl/Makefile.am | 9 ++++ src/egl/wayland/wayland-egl/wayland-egl.pc.in | 14 +++--- 9 files changed, 40 insertions(+), 159 deletions(-) create mode 100644 src/egl/wayland/.gitignore delete mode 100644 src/egl/wayland/Makefile create mode 100644 src/egl/wayland/Makefile.am delete mode 100644 src/egl/wayland/wayland-drm/.gitignore delete mode 100644 src/egl/wayland/wayland-drm/Makefile create mode 100644 src/egl/wayland/wayland-drm/Makefile.am delete mode 100644 src/egl/wayland/wayland-egl/Makefile create mode 100644 src/egl/wayland/wayland-egl/Makefile.am (limited to 'src/egl/wayland') diff --git a/src/egl/wayland/.gitignore b/src/egl/wayland/.gitignore new file mode 100644 index 0000000..407633a --- /dev/null +++ b/src/egl/wayland/.gitignore @@ -0,0 +1,9 @@ +.deps/ +.libs/ +Makefile +Makefile.in +libwayland-egl.la +libwayland-drm.la +wayland-drm-client-protocol.h +wayland-drm-server-protocol.h +wayland-drm-protocol.c diff --git a/src/egl/wayland/Makefile b/src/egl/wayland/Makefile deleted file mode 100644 index c38a130..0000000 --- a/src/egl/wayland/Makefile +++ /dev/null @@ -1,30 +0,0 @@ -# src/egl/wayland/Makefile - -TOP = ../../.. -include $(TOP)/configs/current - -SUBDIRS = wayland-drm wayland-egl - -default: subdirs - - -subdirs: - @for dir in $(SUBDIRS) ; do \ - if [ -d $$dir ] ; then \ - (cd $$dir && $(MAKE)) || exit 1 ; \ - fi \ - done - -install: - @for dir in $(SUBDIRS) ; do \ - if [ -d $$dir ] ; then \ - (cd $$dir && $(MAKE) install) || exit 1 ; \ - fi \ - done - -clean: - -@for dir in $(SUBDIRS) ; do \ - if [ -d $$dir ] ; then \ - (cd $$dir && $(MAKE) clean) ; \ - fi \ - done diff --git a/src/egl/wayland/Makefile.am b/src/egl/wayland/Makefile.am new file mode 100644 index 0000000..ca7207c --- /dev/null +++ b/src/egl/wayland/Makefile.am @@ -0,0 +1 @@ +SUBDIRS = wayland-drm wayland-egl diff --git a/src/egl/wayland/wayland-drm/.gitignore b/src/egl/wayland/wayland-drm/.gitignore deleted file mode 100644 index f4ed848..0000000 --- a/src/egl/wayland/wayland-drm/.gitignore +++ /dev/null @@ -1,3 +0,0 @@ -wayland-drm-client-protocol.h -wayland-drm-server-protocol.h -wayland-drm-protocol.c diff --git a/src/egl/wayland/wayland-drm/Makefile b/src/egl/wayland/wayland-drm/Makefile deleted file mode 100644 index 42222a9..0000000 --- a/src/egl/wayland/wayland-drm/Makefile +++ /dev/null @@ -1,47 +0,0 @@ -# src/egl/wayland/wayland-drm/Makefile - -TOP = ../../../.. -include $(TOP)/configs/current - -GEN_SOURCES = wayland-drm-protocol.c - -GEN_HEADERS = wayland-drm-client-protocol.h wayland-drm-server-protocol.h - -wayland_drm_SOURCES = wayland-drm.c $(GEN_SOURCES) -wayland_drm_OBJECTS = $(wayland_drm_SOURCES:.c=.o) - -wayland_drm_INCLUDES = \ - $(WAYLAND_CFLAGS) \ - -I$(TOP)/src/egl/main \ - -I$(TOP)/include - -# Generate protocol sources -prefix=$(shell $(PKG_CONFIG) --variable=prefix wayland-server) -exec_prefx=$(shell $(PKG_CONFIG) --variable=exec_prefix wayland-server) -wayland_protocoldir = $(PWD)/protocol -wayland_scanner=$(exec_prefix)/bin/wayland-scanner - -default: depend libwayland-drm.a $(GEN_SOURCES) $(GEN_HEADERS) - -libwayland-drm.a: $(wayland_drm_OBJECTS) Makefile - $(MKLIB) -o wayland-drm -static $(wayland_drm_OBJECTS) - -depend: - rm -f depend - touch depend - $(MKDEP) $(MKDEP_OPTIONS) $(wayland_drm_INCLUDES) $(wayland_drm_SOURCES) 2> /dev/null - -clean: - rm -rf libwayland-drm.a $(wayland_drm_OBJECTS) \ - $(GEN_SOURCES) $(GEN_HEADERS) - rm -f depend depend.bak - -install: - @echo -n "" - -$(wayland_drm_OBJECTS): %.o: %.c $(GEN_HEADERS) - $(CC) -c $(wayland_drm_INCLUDES) $(CFLAGS) $< -o $@ - -include $(prefix)/share/aclocal/wayland-scanner.mk - -sinclude depend diff --git a/src/egl/wayland/wayland-drm/Makefile.am b/src/egl/wayland/wayland-drm/Makefile.am new file mode 100644 index 0000000..cf15eda --- /dev/null +++ b/src/egl/wayland/wayland-drm/Makefile.am @@ -0,0 +1,15 @@ +AM_CFLAGS = -I$(top_srcdir)/src/egl/main \ + -I$(top_srcdir)/include \ + $(DEFINES) \ + $(WAYLAND_CFLAGS) + +noinst_LTLIBRARIES = libwayland-drm.la +libwayland_drm_la_SOURCES = wayland-drm.c wayland-drm-protocol.c +noinst_HEADERS = wayland-drm.h + +BUILT_SOURCES = wayland-drm-protocol.c \ + wayland-drm-client-protocol.h \ + wayland-drm-server-protocol.h +CLEANFILES = $(BUILT_SOURCES) + +@wayland_scanner_rules@ diff --git a/src/egl/wayland/wayland-egl/Makefile b/src/egl/wayland/wayland-egl/Makefile deleted file mode 100644 index b9d13dc..0000000 --- a/src/egl/wayland/wayland-egl/Makefile +++ /dev/null @@ -1,71 +0,0 @@ -# src/egl/wayland/wayland-egl/Makefile - -TOP = ../../../.. -include $(TOP)/configs/current - -INCLUDE_DIRS = -I$(TOP)/include \ - -I$(TOP)/include/EGL \ - -I$(TOP)/src/egl/wayland/wayland-drm - - -HEADERS = wayland-egl-priv.h -SOURCES = wayland-egl.c - -OBJECTS = $(SOURCES:.c=.o) - -LOCAL_CFLAGS = $(LIBDRM_CFLAGS) \ - $(WAYLAND_CFLAGS) - -LOCAL_LIBS = - -.c.o: - $(CC) -c $(INCLUDE_DIRS) $(CFLAGS) $(LOCAL_CFLAGS) $< -o $@ - - -default: depend library - -# wayland-egl Library -library: $(TOP)/$(LIB_DIR)/$(WAYLAND_EGL_LIB_NAME) - -$(TOP)/$(LIB_DIR)/$(WAYLAND_EGL_LIB_NAME): $(OBJECTS) $(LOCAL_LIBS) - $(MKLIB) -o $(WAYLAND_EGL_LIB) -linker '$(CC)' -ldflags '$(LDFLAGS)' \ - -install $(TOP)/$(LIB_DIR) $(MKLIB_OPTIONS) \ - -L$(TOP)/$(LIB_DIR) $(WAYLAND_EGL_LIB_DEPS) \ - $(OBJECTS) $(LOCAL_LIBS) - -PKG_CONFIG_DIR = $(INSTALL_LIB_DIR)/pkgconfig - -gl_pcedit = sed \ - -e 's,@INSTALL_DIR@,$(INSTALL_DIR),' \ - -e 's,@INSTALL_LIB_DIR@,$(INSTALL_LIB_DIR),' \ - -e 's,@INSTALL_INC_DIR@,$(INSTALL_INC_DIR),' \ - -e 's,@VERSION@,$(MESA_MAJOR).$(MESA_MINOR).$(MESA_TINY),' \ - -e 's,@WAYLAND_EGL_PC_REQ_PRIV@,$(WAYLAND_EGL_PC_REQ_PRIV),' \ - -e 's,@WAYLAND_EGL_PC_LIB_PRIV@,$(WAYLAND_EGL_PC_LIB_PRIV),' \ - -e 's,@WAYLAND_EGL_PC_CFLAGS@,$(WAYLAND_EGL_PC_CFLAGS),' \ - -e 's,@WAYLAND_EGL_LIB@,$(WAYLAND_EGL_LIB),' - -wayland-egl.pc: wayland-egl.pc.in - $(gl_pcedit) $< > $@ - -install: default wayland-egl.pc - $(INSTALL) -d $(DESTDIR)$(INSTALL_LIB_DIR) - $(MINSTALL) $(TOP)/$(LIB_DIR)/$(WAYLAND_EGL_LIB_GLOB) \ - $(DESTDIR)$(INSTALL_LIB_DIR) - $(INSTALL) -d $(DESTDIR)$(PKG_CONFIG_DIR) - $(INSTALL) -m 644 wayland-egl.pc $(DESTDIR)$(PKG_CONFIG_DIR) - -clean: - -rm -f *.o - -rm -f depend depend.bak - -depend: $(SOURCES) $(HEADERS) - @ echo "running $(MKDEP)" - @ rm -f depend - @ touch depend - $(MKDEP) $(MKDEP_OPTIONS) $(DEFINES) $(INCLUDE_DIRS) \ - $(SOURCES) $(HEADERS) > /dev/null 2>/dev/null - - --include depend -# DO NOT DELETE diff --git a/src/egl/wayland/wayland-egl/Makefile.am b/src/egl/wayland/wayland-egl/Makefile.am new file mode 100644 index 0000000..a19a5fc --- /dev/null +++ b/src/egl/wayland/wayland-egl/Makefile.am @@ -0,0 +1,9 @@ +pkgconfigdir = $(libdir)/pkgconfig +pkgconfig_DATA = wayland-egl.pc + +AM_CFLAGS = $(DEFINES) + +lib_LTLIBRARIES = libwayland-egl.la +noinst_HEADERS = wayland-egl-priv.h +libwayland_egl_la_SOURCES = wayland-egl.c +libwayland_egl_la_LDFLAGS = -version-info 1 diff --git a/src/egl/wayland/wayland-egl/wayland-egl.pc.in b/src/egl/wayland/wayland-egl/wayland-egl.pc.in index 3c2067c..f8a8df2 100644 --- a/src/egl/wayland/wayland-egl/wayland-egl.pc.in +++ b/src/egl/wayland/wayland-egl/wayland-egl.pc.in @@ -1,12 +1,10 @@ -prefix=@INSTALL_DIR@ -exec_prefix=${prefix} -libdir=@INSTALL_LIB_DIR@ -includedir=@INSTALL_INC_DIR@ +prefix=@prefix@ +exec_prefix=@exec_prefix@ +libdir=@libdir@ +includedir=@includedir@ Name: wayland-egl Description: Mesa wayland-egl library -Requires.private: @WAYLAND_EGL_PC_REQ_PRIV@ Version: @VERSION@ -Libs: -L${libdir} -l@WAYLAND_EGL_LIB@ -Libs.private: @WAYLAND_EGL_PC_LIB_PRIV@ -Cflags: -I${includedir} @WAYLAND_EGL_PC_CFLAGS@ +Libs: -L${libdir} -lwayland-egl +Cflags: -I${includedir} -- cgit v1.1