moduels support multiple architectures build for 1 module
authorCarsten Haitzler <raster@rasterman.com>
Mon, 7 Feb 2005 15:34:20 +0000 (15:34 +0000)
committerCarsten Haitzler <raster@rasterman.com>
Mon, 7 Feb 2005 15:34:20 +0000 (15:34 +0000)
SVN revision: 13228

13 files changed:
TODO
configure.in
src/bin/e_module.c
src/modules/battery/Makefile.am
src/modules/clock/Makefile.am
src/modules/dropshadow/Makefile.am
src/modules/flame/Makefile.am
src/modules/ibar/Makefile.am
src/modules/ibox/Makefile.am
src/modules/pager/Makefile.am
src/modules/snow/Makefile.am
src/modules/temperature/Makefile.am
src/modules/test/Makefile.am

diff --git a/TODO b/TODO
index eb3d957..8a2b218 100644 (file)
--- a/TODO
+++ b/TODO
@@ -29,7 +29,6 @@ Current freeze issues are:
 
 ISSUES:
 
-* module needs to handle multiple architectures for modules (eg in ~/.e/e/modules)
 * ibar, temp and battery modules should only make 1 gadget per container and allow u to enable/disable that gadget on that container (like clock)
 * pager needs to be able to split off each desk in a zone it a different gadget
 * gadman gadget menu needs icons :)
index 0cebc79..62d5474 100644 (file)
@@ -4,10 +4,14 @@ dnl Process this file with autoconf to produce a configure script.
 rm -f config.cache
 
 AC_INIT(configure.in)
+AC_CANONICAL_BUILD
+AC_CANONICAL_HOST
+AC_CANONICAL_TARGET
+AC_ISC_POSIX
 AM_INIT_AUTOMAKE(enlightenment, 0.17.0_pre10)
 AM_CONFIG_HEADER(config.h)
 
-AC_ISC_POSIX
+AC_C_BIGENDIAN
 AC_PROG_CC
 AM_PROG_CC_STDC
 AC_HEADER_STDC
@@ -15,6 +19,10 @@ AC_C_CONST
 AM_ENABLE_SHARED
 AM_PROG_LIBTOOL
 
+MODULE_ARCH="$target_os-$target_cpu"
+AC_SUBST(MODULE_ARCH)
+AC_DEFINE_UNQUOTED(MODULE_ARCH, "$MODULE_ARCH", "Module architecture")
+
 if test "x${bindir}" = 'x${exec_prefix}/bin'; then
   if test "x${exec_prefix}" = "xNONE"; then
     if test "x${prefix}" = "xNONE"; then
index 2f4072e..2beccbb 100644 (file)
@@ -87,7 +87,7 @@ e_module_new(char *name)
    m->api = &_e_module_api;
    if (name[0] != '/')
      {
-       snprintf(buf, sizeof(buf), "%s/module.so", name);
+       snprintf(buf, sizeof(buf), "%s/%s/module.so", MODULE_ARCH, name);
        modpath = e_path_find(_e_path_modules, buf);
      }
    else
index 5506063..9681969 100644 (file)
@@ -17,7 +17,7 @@ INCLUDES               = -I. \
                         -I$(top_srcdir)/src/lib \
                         -I$(top_srcdir)/src/modules \
                         @e_cflags@
-pkgdir                 = $(libdir)/enlightenment/modules/$(MODULE)
+pkgdir                 = $(libdir)/enlightenment/modules/$(MODULE)/$(MODULE_ARCH)
 pkg_LTLIBRARIES        = module.la
 module_la_SOURCES      = e_mod_main.c \
                         e_mod_main.h
index e5f0570..2c7544d 100644 (file)
@@ -17,7 +17,7 @@ INCLUDES               = -I. \
                         -I$(top_srcdir)/src/lib \
                         -I$(top_srcdir)/src/modules \
                         @e_cflags@
-pkgdir                 = $(libdir)/enlightenment/modules/$(MODULE)
+pkgdir                 = $(libdir)/enlightenment/modules/$(MODULE)/$(MODULE_ARCH)
 pkg_LTLIBRARIES        = module.la
 module_la_SOURCES      = e_mod_main.c \
                         e_mod_main.h
index 152f1f0..2021175 100644 (file)
@@ -29,7 +29,7 @@ INCLUDES               = -I. \
                         -I$(top_srcdir)/src/lib \
                         -I$(top_srcdir)/src/modules \
                         @e_cflags@
-pkgdir                 = $(libdir)/enlightenment/modules/$(MODULE)
+pkgdir                 = $(libdir)/enlightenment/modules/$(MODULE)/$(MODULE_ARCH)
 pkg_LTLIBRARIES        = module.la
 module_la_SOURCES      = e_mod_main.c \
                         e_mod_main.h
index ec14cf9..ae0ea6a 100644 (file)
@@ -17,7 +17,7 @@ INCLUDES               = -I. \
                         -I$(top_srcdir)/src/lib \
                         -I$(top_srcdir)/src/modules \
                         @e_cflags@
-pkgdir                 = $(libdir)/enlightenment/modules/$(MODULE)
+pkgdir                 = $(libdir)/enlightenment/modules/$(MODULE)/$(MODULE_ARCH)
 pkg_LTLIBRARIES        = module.la
 module_la_SOURCES      = e_mod_main.c \
                         e_mod_main.h
index 7775951..3907c0b 100644 (file)
@@ -17,7 +17,7 @@ INCLUDES               = -I. \
                         -I$(top_srcdir)/src/lib \
                         -I$(top_srcdir)/src/modules \
                         @e_cflags@
-pkgdir                 = $(libdir)/enlightenment/modules/$(MODULE)
+pkgdir                 = $(libdir)/enlightenment/modules/$(MODULE)/$(MODULE_ARCH)
 pkg_LTLIBRARIES        = module.la
 module_la_SOURCES      = e_mod_main.c \
                         e_mod_main.h
index e929398..0668505 100644 (file)
@@ -17,7 +17,7 @@ INCLUDES               = -I. \
                         -I$(top_srcdir)/src/lib \
                         -I$(top_srcdir)/src/modules \
                         @e_cflags@
-pkgdir                 = $(libdir)/enlightenment/modules/$(MODULE)
+pkgdir                 = $(libdir)/enlightenment/modules/$(MODULE)/$(MODULE_ARCH)
 pkg_LTLIBRARIES        = module.la
 module_la_SOURCES      = e_mod_main.c \
                         e_mod_main.h
index 8128e73..e5f93e8 100644 (file)
@@ -17,7 +17,7 @@ INCLUDES               = -I. \
                         -I$(top_srcdir)/src/lib \
                         -I$(top_srcdir)/src/modules \
                         @e_cflags@
-pkgdir                 = $(libdir)/enlightenment/modules/$(MODULE)
+pkgdir                 = $(libdir)/enlightenment/modules/$(MODULE)/$(MODULE_ARCH)
 pkg_LTLIBRARIES        = module.la
 module_la_SOURCES      = e_mod_main.c \
                         e_mod_main.h
index 1659a0d..f04d9de 100644 (file)
@@ -20,7 +20,7 @@ INCLUDES               = -I. \
                         -I$(top_srcdir)/src/lib \
                         -I$(top_srcdir)/src/modules \
                         @e_cflags@
-pkgdir                 = $(libdir)/enlightenment/modules/$(MODULE)
+pkgdir                 = $(libdir)/enlightenment/modules/$(MODULE)/$(MODULE_ARCH)
 pkg_LTLIBRARIES        = module.la
 module_la_SOURCES      = e_mod_main.c \
                         e_mod_main.h
index c05f9d5..f2612c7 100644 (file)
@@ -17,7 +17,7 @@ INCLUDES               = -I. \
                         -I$(top_srcdir)/src/lib \
                         -I$(top_srcdir)/src/modules \
                         @e_cflags@
-pkgdir                 = $(libdir)/enlightenment/modules/$(MODULE)
+pkgdir                 = $(libdir)/enlightenment/modules/$(MODULE)/$(MODULE_ARCH)
 pkg_LTLIBRARIES        = module.la
 module_la_SOURCES      = e_mod_main.c \
                         e_mod_main.h
index 21d9174..de6c192 100644 (file)
@@ -15,7 +15,7 @@ INCLUDES               = -I. \
                         -I$(top_srcdir)/src/lib \
                         -I$(top_srcdir)/src/modules \
                         @e_cflags@
-pkgdir                 = $(libdir)/enlightenment/modules/$(MODULE)
+pkgdir                 = $(libdir)/enlightenment/modules/$(MODULE)/$(MODULE_ARCH)
 pkg_LTLIBRARIES        = module.la
 module_la_SOURCES      = e_mod_main.c \
                         e_mod_main.h