diff --git a/ipc-linux.mak b/ipc-linux.mak
index 08b27f42a3c8363f5beb1e1fe1a38a06be4cae52..68e9617232e2c8f9c0f7b64e89843fad2d9cc3f8 100644 (file)
--- a/ipc-linux.mak
+++ b/ipc-linux.mak
#
-# Copyright (c) 2012-2013, Texas Instruments Incorporated
+# Copyright (c) 2012-2014, Texas Instruments Incorporated
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
.PHONY: config config-static config-shared
+# If you need to add any compile flags to the build of IPC user libraries,
+# you can use the CFLAGS option to the configure script.
+#
+# For example, in the very rare case where your kernel's AF_RPMSG
+# definition isn't correctly detected by IPC (see
+# linux/include/net/rpmsg.h), you can provide your kernel's definition
+# of AF_RPMSG by adding this CFLAGS line to the configure commands below
+# to force the value of AF_RPMSG to 42:
+#
+# CFLAGS="-DAF_RPMSG=42"
+
+# If the user set DESTDIR (e.g. in products.mak), pass that value via
+# --prefix= option. If DESTDIR is not set, --prefix is not thrown and
+# configure's defaults are used.
+
+ifeq ($(DESTDIR),)
+PREFIX_OPTION=
+else
+PREFIX_OPTION=--prefix=$(DESTDIR)
+endif
+
config:
@echo "Configuring Linux Ipc ..."
./configure --host=$(TOOLCHAIN_LONGNAME) \
+ $(PREFIX_OPTION) \
CC=$(TOOLCHAIN_PREFIX)gcc \
PLATFORM=$(PLATFORM) \
- CMEM_INSTALL_DIR=$(CMEM_INSTALL_DIR)
+ CMEM_INSTALL_DIR=$(CMEM_INSTALL_DIR) \
+ KERNEL_INSTALL_DIR=$(KERNEL_INSTALL_DIR) \
+ DRM_PREFIX=$(DRM_PREFIX)
+
config-static:
@echo "Configuring Linux Ipc static only libaries ..."
./configure --host=$(TOOLCHAIN_LONGNAME) --disable-shared \
+ $(PREFIX_OPTION) \
CC=$(TOOLCHAIN_PREFIX)gcc \
PLATFORM=$(PLATFORM) \
- CMEM_INSTALL_DIR=$(CMEM_INSTALL_DIR)
+ CMEM_INSTALL_DIR=$(CMEM_INSTALL_DIR) \
+ KERNEL_INSTALL_DIR=$(KERNEL_INSTALL_DIR) \
+ DRM_PREFIX=$(DRM_PREFIX)
config-shared:
@echo "Configuring Linux Ipc shared (dynamic) only libaries ..."
./configure --host=$(TOOLCHAIN_LONGNAME) --disable-static \
+ $(PREFIX_OPTION) \
CC=$(TOOLCHAIN_PREFIX)gcc \
PLATFORM=$(PLATFORM) \
- CMEM_INSTALL_DIR=$(CMEM_INSTALL_DIR)
+ CMEM_INSTALL_DIR=$(CMEM_INSTALL_DIR) \
+ KERNEL_INSTALL_DIR=$(KERNEL_INSTALL_DIR) \
+ DRM_PREFIX=$(DRM_PREFIX)