[LINUX] Fix for make install
authorSathishkumar <x0203598@ti.com>
Thu, 5 Sep 2013 11:34:31 +0000 (17:04 +0530)
committerSaurabh Bipin Chandra <a0131926@ti.com>
Thu, 5 Sep 2013 16:09:16 +0000 (21:39 +0530)
This patch fixes make install. All the required headers are
copied to $(includedir)/dce on make install.
Unused variables(X11 and WAYLAND) are removed in Makefile.am and
pkg-config on libmmrpc is removed as no libmmrpc.pc is available.
xdc_target_types__=gnu/targets/std.h is added to libdce.h, so
that applications need not do it when using libdce.h.

Change-Id: I8cc70aa2102becdbdc4c6b1e38e2aaa91739c4cc
Signed-off-by: Sathishkumar <x0203598@ti.com>
Makefile.am
configure.ac
libdce.c
libdce.h
libdce.pc.in
libdce_linux.c
packages/codec_engine/Makefile.am [new file with mode: 0644]
packages/ivahd_codecs/Makefile.am [new file with mode: 0644]
packages/xdais/Makefile.am [new file with mode: 0644]
packages/xdctools/Makefile.am [new file with mode: 0644]

index 0a0a6b922c53bdfb1f593ab75cc64655a16e71b8..356c4cbb4ccb76d11c63eb57c1d6bfcd5b541423 100644 (file)
@@ -1,26 +1,31 @@
 ## Process this file with automake to produce Makefile.in
 
+SUBDIRS                      = \
+                               packages/codec_engine \
+                               packages/ivahd_codecs \
+                               packages/xdais \
+                               packages/xdctools
+
 
 lib_LTLIBRARIES              = libdce.la
 
 
 CE_CFLAGS                    = \
-                               -I$(CODEC_ENGINE)/ \
-                               -I$(FRAMEWORK_COMPONENTS) \
-                               -I$(IVAHD_CODECS) \
-                               -I$(XDAIAS) \
-                               -I$(XDCTOOLS)/ \
-                               -I$(IPC)/packages/ti/ipc/mm \
-                               -DBUILDOS_LINUX=1 \
+                               -I$(top_srcdir)/packages/codec_engine \
+                               -I$(top_srcdir)/packages/ivahd_codecs \
+                               -I$(top_srcdir)/packages/xdais \
+                               -I$(top_srcdir)/packages/xdctools \
+                               -I$(IPC_HEADERS)/ \
+                              -DBUILDOS_LINUX=1 \
                                -Wno-pointer-to-int-cast
 
 
 libdce_la_SOURCES            = libdce.c memplugin_linux.c libdce_linux.c
-libdce_la_CFLAGS             = $(WARN_CFLAGS) $(CE_CFLAGS) $(DRM_CFLAGS) $(X11_CFLAGS) $(WAYLAND_CFLAGS)
+libdce_la_CFLAGS             = $(WARN_CFLAGS) $(CE_CFLAGS) $(DRM_CFLAGS)
 libdce_la_LDFLAGS            = -no-undefined -version-info 1:0:0
-libdce_la_LIBADD             = $(DRM_LIBS) $(X11_LIBS) $(WAYLAND_LIBS) $(MMRPC_LIBS)
+libdce_la_LIBADD             = $(DRM_LIBS) -lmmrpc
 
-libdce_la_includedir         = $(includedir)
+libdce_la_includedir         = $(includedir)/dce
 libdce_la_include_HEADERS    = libdce.h
 
 pkgconfig_DATA               = libdce.pc
index fbf34b86d7a1788db4ff7f69cb1605c6bd5f2820..a27bd0840c2a9888a35bbd1b4bcec27dcccbe957 100644 (file)
@@ -51,7 +51,7 @@ PKG_CHECK_MODULES(DRM, libdrm libdrm_omap)
 
 dnl *** checks for libraries ***
 dnl Check for libmmrpc
-PKG_CHECK_MODULES(MMRPC, libmmrpc)
+#PKG_CHECK_MODULES(MMRPC, libmmrpc)
 
 dnl *** checks for header files ***
 dnl check if we have ANSI C header files
@@ -69,62 +69,19 @@ dnl *** checks for dependancy libraries ***
 
 dnl *** set variables based on configure arguments ***
 
-
-if test "$CODEC_ENGINE" != "" ; then
-       AC_MSG_NOTICE([Checking component : CODEC_ENGINE])
-       AC_CHECK_FILES(["$CODEC_ENGINE"],,[AC_MSG_ERROR(["$CODEC_ENGINE" not found Set path variable CODEC_ENGINE])])
-       AC_SUBST(CODEC_ENGINE)
-else
-       AC_MSG_ERROR([Set path variable CODEC_ENGINE])
-fi
-
-if test "$FRAMEWORK_COMPONENTS" != "" ; then
-       AC_MSG_NOTICE([Checking component : FRAMEWORK_COMPONENTS])
-        AC_CHECK_FILES(["$FRAMEWORK_COMPONENTS"],,[AC_MSG_ERROR(["$FRAMEWORK_COMPONENTS" not found Set path variable FRAMEWORK_COMPONENTS])])
-       AC_SUBST(FRAMEWORK_COMPONENTS)
+if test "$IPC_HEADERS" != "" ; then
+        AC_CHECK_FILES(["$IPC_HEADERS"],,[AC_MSG_ERROR(["$IPC_HEADERS" not found, Set path variable IPC_HEADERS])])
+        AC_SUBST(IPC_HEADERS)
 else
-        AC_MSG_ERROR([Set path variable FRAMEWORK_COMPONENTS])
+        AC_MSG_ERROR([Set path variable IPC_HEADERS])
 fi
 
-if test "$IVAHD_CODECS" != "" ; then
-       AC_MSG_NOTICE([Checking component : IVAHD_CODECS])
-        AC_CHECK_FILES(["$IVAHD_CODECS"],,[AC_MSG_ERROR(["$IVAHD_CODECS" not fou nd Set path variable IVAHD_CODECS])])
-       AC_SUBST(IVAHD_CODECS)
-else
-        AC_MSG_ERROR([Set path variable IVAHD_CODECS])
-fi
-
-if test "$XDAIAS" != "" ; then
-       AC_MSG_NOTICE([Checking component : XDAIAS])
-        AC_CHECK_FILES(["$XDAIAS"],,[AC_MSG_ERROR(["$XDAIAS" not found Set path variable XDAIAS])])
-       AC_SUBST(XDAIAS)
-else
-        AC_MSG_ERROR([Set path variable XDAIAS])
-fi
-
-if test "$XDCTOOLS" != "" ; then
-        AC_MSG_NOTICE([Checking component : XDCTOOLS])
-        AC_CHECK_FILES(["$XDCTOOLS"],,[AC_MSG_ERROR(["$XDCTOOLS" not found Set path variable XDCTOOLS])])
-       AC_SUBST(XDCTOOLS)
-else
-        AC_MSG_ERROR([Set path variable XDCTOOLS])
-fi
-
-if test "$IPC" != "" ; then
-        AC_MSG_NOTICE([Checking component : IPC])
-        AC_CHECK_FILES(["$IPC"],,[AC_MSG_ERROR(["$IPC" not found Set path variable IPC])])
-        AC_SUBST(IPC)
-else
-        AC_MSG_ERROR([Set path variable IPC])
-fi
-
-
-
-
-
-
 AC_CONFIG_FILES([
 libdce.pc
 Makefile
+packages/codec_engine/Makefile
+packages/ivahd_codecs/Makefile
+packages/xdais/Makefile
+packages/xdctools/Makefile
 ])
 AC_OUTPUT
index 25d0789c48222d9e5ea287c840e75c5764ce07ce..3bbed457fab91f3989d06755be5bd9e3128ab202 100644 (file)
--- a/libdce.c
+++ b/libdce.c
@@ -83,9 +83,9 @@
 
 /********************* GLOBALS ***********************/
 /* Hande used for Remote Communication                               */
-static MmRpc_Handle    MmRpcHandle = NULL;
-sem_t                 *dce_semaphore = NULL;
-static int             count = 0;
+MmRpc_Handle    MmRpcHandle = NULL;
+sem_t          *dce_semaphore = NULL;
+static int      count = 0;
 
 
 /****************** INLINE FUNCTIONS ********************/
index cffa006d64f241041ae25e0bbe0413c47b57cdc8..ea63e66938bc522cbe2d9a284b237a6047cc74ac 100644 (file)
--- a/libdce.h
+++ b/libdce.h
@@ -33,6 +33,7 @@
 #ifndef __LIBDCE_H__
 #define __LIBDCE_H__
 
+#define xdc_target_types__ gnu/targets/std.h
 #include <xdc/std.h>
 #include <ti/sdo/ce/Engine.h>
 #include <ti/sdo/ce/video3/viddec3.h>
index 5f71a29affda7b5f456a99c63e3dafd6c0610dc3..baa35f237f9ea4c081740143026d282a9d3a1dae 100644 (file)
@@ -8,4 +8,4 @@ Description: distributed codec-engine
 Version: @VERSION@
 Requires: libdrm libdrm_omap
 Libs: -L${libdir} -ldce
-Cflags: -I${includedir}/
+Cflags: -I${includedir}/dce
index 99c8b8d1ce45c7b038e5482308cca7205e23ec55..a723e7d86bcd9406ef6f5c1aed2bbb92aa3b4d1b 100644 (file)
@@ -33,7 +33,6 @@
 #include <stdlib.h>
 #include <string.h>
 #include <stdio.h>
-#include <xdc/std.h>
 
 #include <xf86drm.h>
 #include <omap_drm.h>
 
 #include <MmRpc.h>
 #include "dce_priv.h"
+#include "libdce.h"
+#include "memplugin.h"
 
 #define INVALID_DRM_FD (-1)
 
-int    OmapDrm_FD = INVALID_DRM_FD;
+int                    OmapDrm_FD  = INVALID_DRM_FD;
+struct omap_device    *OmapDev     = NULL;
+extern MmRpc_Handle    MmRpcHandle;
 
 void *dce_init(void)
 {
-    struct omap_device   *OmapDev = NULL;
-    dce_error_status      eError = DCE_EOK;
+    dce_error_status    eError = DCE_EOK;
 
     printf(" >> dce_init\n");
 
diff --git a/packages/codec_engine/Makefile.am b/packages/codec_engine/Makefile.am
new file mode 100644 (file)
index 0000000..7a6c170
--- /dev/null
@@ -0,0 +1,14 @@
+## Process this file with automake to produce Makefile.in
+
+pkg_includedir = $(includedir)/dce
+
+nobase_pkg_include_HEADERS = \
+       ti/sdo/ce/Engine.h \
+       ti/sdo/ce/visa.h \
+       ti/sdo/ce/ServerDefs.h \
+       ti/sdo/ce/video3/viddec3.h \
+       ti/sdo/ce/video2/videnc2.h \
+       ti/sdo/ce/Server.h \
+       ti/sdo/ce/skel.h \
+       ti/sdo/ce/node/node.h \
+       ti/sdo/ce/ipc/Comm.h
diff --git a/packages/ivahd_codecs/Makefile.am b/packages/ivahd_codecs/Makefile.am
new file mode 100644 (file)
index 0000000..63d0042
--- /dev/null
@@ -0,0 +1,12 @@
+## Process this file with automake to produce Makefile.in
+
+pkg_includedir = $(includedir)/dce
+
+nobase_pkg_include_HEADERS = \
+       ti/sdo/codecs/mpeg2vdec/impeg2vdec.h \
+       ti/sdo/codecs/vc1vdec/ivc1vdec.h \
+       ti/sdo/codecs/mpeg4vdec/impeg4vdec.h \
+       ti/sdo/codecs/h264vdec/ih264vdec.h \
+       ti/sdo/codecs/h264enc/ih264enc.h \
+       ti/sdo/codecs/mpeg4enc/impeg4enc.h \
+       ti/sdo/codecs/jpegvdec/ijpegvdec.h
diff --git a/packages/xdais/Makefile.am b/packages/xdais/Makefile.am
new file mode 100644 (file)
index 0000000..2bceeca
--- /dev/null
@@ -0,0 +1,11 @@
+## Process this file with automake to produce Makefile.in
+
+pkg_includedir = $(includedir)/dce
+
+nobase_pkg_include_HEADERS = \
+       ti/xdais/dm/ividenc2.h \
+       ti/xdais/dm/ividdec3.h \
+       ti/xdais/dm/ivideo.h \
+       ti/xdais/dm/xdm.h \
+       ti/xdais/ialg.h \
+       ti/xdais/xdas.h
diff --git a/packages/xdctools/Makefile.am b/packages/xdctools/Makefile.am
new file mode 100644 (file)
index 0000000..961682f
--- /dev/null
@@ -0,0 +1,7 @@
+## Process this file with automake to produce Makefile.in
+
+pkg_includedir = $(includedir)/dce
+
+nobase_pkg_include_HEADERS = \
+       xdc/std.h \
+       gnu/targets/std.h