diff mbox

[v3] Keystone2: Inherit linux-generic

Message ID 1397773114-25459-1-git-send-email-taras.kondratiuk@linaro.org
State Superseded
Headers show

Commit Message

Taras Kondratiuk April 17, 2014, 10:18 p.m. UTC
Sources and headers search paths are configured to look in linux-generic
if absent in linux-keystone2 directory. linux-keystone2 is empty now,
so library build for this platform will match linux-generic.

Signed-off-by: Taras Kondratiuk <taras.kondratiuk@linaro.org>
---
v2..v3: Do not make linux-generic copy. Insted use it directly via vpath.

I've extracted this patch from Keystone series. No need to repost a whole
series until we agreed on base patch.

 platform/linux-keystone2/Makefile |  100 +++++++++++++++++++++++++++++++++++++
 1 file changed, 100 insertions(+)
 create mode 100644 platform/linux-keystone2/Makefile

Comments

=?UTF-8?q?David=20Nystr=C3=B6m?= April 18, 2014, 2:11 p.m. UTC | #1
On 18 Apr 2014 00:19, "Taras Kondratiuk" <taras.kondratiuk@linaro.org>
wrote:
>
> Sources and headers search paths are configured to look in linux-generic
> if absent in linux-keystone2 directory. linux-keystone2 is empty now,
> so library build for this platform will match linux-generic.
>
> Signed-off-by: Taras Kondratiuk <taras.kondratiuk@linaro.org>
> ---
> v2..v3: Do not make linux-generic copy. Insted use it directly via vpath.
>
> I've extracted this patch from Keystone series. No need to repost a whole
> series until we agreed on base patch.
>
>  platform/linux-keystone2/Makefile |  100
+++++++++++++++++++++++++++++++++++++
>  1 file changed, 100 insertions(+)
>  create mode 100644 platform/linux-keystone2/Makefile
>
> diff --git a/platform/linux-keystone2/Makefile
b/platform/linux-keystone2/Makefile
> new file mode 100644
> index 0000000..8537f0a
> --- /dev/null
> +++ b/platform/linux-keystone2/Makefile
> @@ -0,0 +1,100 @@
> +##
> +## Copyright (c) 2013, Linaro Limited
> +## All rights reserved.
> +##
> +## SPDX-License-Identifier:     BSD-3-Clause
> +##
> +
> +.DEFAULT_GOAL := libs
> +
> +ODP_ROOT = ../..
> +LIB_DIR  = ./lib
> +DOC_DIR  = ./doc
> +
> +LINUX_GENERIC_DIR = ../linux-generic
> +
> +EXTRA_CFLAGS  += -I$(ODP_ROOT)/include
> +EXTRA_CFLAGS  += -I./include
> +EXTRA_CFLAGS  += -I./include/api
> +EXTRA_CFLAGS  += -I$(LINUX_GENERIC_DIR)/include
> +EXTRA_CFLAGS  += -I$(LINUX_GENERIC_DIR)/include/api
> +
> +include $(ODP_ROOT)/Makefile.inc
> +STATIC_LIB = ./lib/libodp.a
> +
> +#
> +# Object files
> +#
> +OBJS     =
> +OBJS    += $(OBJ_DIR)/odp_barrier.o
> +OBJS    += $(OBJ_DIR)/odp_buffer.o
> +OBJS    += $(OBJ_DIR)/odp_buffer_pool.o
> +OBJS    += $(OBJ_DIR)/odp_coremask.o
> +OBJS    += $(OBJ_DIR)/odp_init.o
> +OBJS    += $(OBJ_DIR)/odp_linux.o
> +OBJS    += $(OBJ_DIR)/odp_packet.o
> +OBJS    += $(OBJ_DIR)/odp_packet_flags.o
> +OBJS    += $(OBJ_DIR)/odp_packet_io.o
> +OBJS    += $(OBJ_DIR)/odp_packet_socket.o
> +OBJS    += $(OBJ_DIR)/odp_queue.o
> +OBJS    += $(OBJ_DIR)/odp_schedule.o
> +OBJS    += $(OBJ_DIR)/odp_shared_memory.o
> +OBJS    += $(OBJ_DIR)/odp_spinlock.o
> +OBJS    += $(OBJ_DIR)/odp_system_info.o
> +OBJS    += $(OBJ_DIR)/odp_thread.o
> +OBJS    += $(OBJ_DIR)/odp_ticketlock.o
> +OBJS    += $(OBJ_DIR)/odp_time.o
> +OBJS    += $(OBJ_DIR)/odp_timer.o
> +OBJS    += $(OBJ_DIR)/odp_ring.o
> +OBJS    += $(OBJ_DIR)/odp_rwlock.o
> +
> +DEPS     = $(OBJS:.o=.d)
> +
> +.PHONY: all
> +all: libs
> +
> +-include $(DEPS)
> +
> +$(LIB_DIR):
> +       $(MKDIR) $(LIB_DIR)
> +
> +#
> +# Compile rules
> +#
> +vpath %.c source $(LINUX_GENERIC_DIR)/source
> +
> +$(OBJ_DIR)/%.o: %.c
> +       $(ECHO) "  CC   $<"
> +       $(CC) -c -MD $(EXTRA_CFLAGS) $(CFLAGS) -o $@ $<
> +
> +#
> +# Lib rule
> +#
> +$(STATIC_LIB): $(OBJS)
> +       $(AR) -cr $@ $(OBJS)
> +
> +clean:
> +       $(RMDIR) $(OBJ_DIR)
> +       $(RMDIR) $(LIB_DIR)
> +
> +.PHONY: docs
> +docs:
> +       $(ECHO) "Documenation is not yet available"
> +       @false
> +
> +.PHONY: libs
> +libs: $(OBJ_DIR) $(LIB_DIR) $(STATIC_LIB)
> +
> +.PHONY: lib_install
> +lib_install: libs
> +       install -d $(DESTDIR)/lib
> +       install -m 0644 ${STATIC_LIB} $(DESTDIR)/lib/
> +
> +.PHONY: headers_install
> +headers_install: libs
> +       $(ECHO) Installing headers to $(DESTDIR)/include
> +       $(COPY) $(ODP_ROOT)/include $(DESTDIR)
> +       $(COPY) $(LINUX_GENERIC_DIR)/include/api/* $(DESTDIR)/include/
> +       -$(COPY) include/api/* $(DESTDIR)/include/
> +
> +install: lib_install headers_install
> --
> 1.7.9.5
>
>
> _______________________________________________
> lng-odp mailing list
> lng-odp@lists.linaro.org
> http://lists.linaro.org/mailman/listinfo/lng-odp

+1.

Br,
David
diff mbox

Patch

diff --git a/platform/linux-keystone2/Makefile b/platform/linux-keystone2/Makefile
new file mode 100644
index 0000000..8537f0a
--- /dev/null
+++ b/platform/linux-keystone2/Makefile
@@ -0,0 +1,100 @@ 
+##
+## Copyright (c) 2013, Linaro Limited
+## All rights reserved.
+##
+## SPDX-License-Identifier:     BSD-3-Clause
+##
+
+.DEFAULT_GOAL := libs
+
+ODP_ROOT = ../..
+LIB_DIR  = ./lib
+DOC_DIR  = ./doc
+
+LINUX_GENERIC_DIR = ../linux-generic
+
+EXTRA_CFLAGS  += -I$(ODP_ROOT)/include
+EXTRA_CFLAGS  += -I./include
+EXTRA_CFLAGS  += -I./include/api
+EXTRA_CFLAGS  += -I$(LINUX_GENERIC_DIR)/include
+EXTRA_CFLAGS  += -I$(LINUX_GENERIC_DIR)/include/api
+
+include $(ODP_ROOT)/Makefile.inc
+STATIC_LIB = ./lib/libodp.a
+
+#
+# Object files
+#
+OBJS     =
+OBJS    += $(OBJ_DIR)/odp_barrier.o
+OBJS    += $(OBJ_DIR)/odp_buffer.o
+OBJS    += $(OBJ_DIR)/odp_buffer_pool.o
+OBJS    += $(OBJ_DIR)/odp_coremask.o
+OBJS    += $(OBJ_DIR)/odp_init.o
+OBJS    += $(OBJ_DIR)/odp_linux.o
+OBJS    += $(OBJ_DIR)/odp_packet.o
+OBJS    += $(OBJ_DIR)/odp_packet_flags.o
+OBJS    += $(OBJ_DIR)/odp_packet_io.o
+OBJS    += $(OBJ_DIR)/odp_packet_socket.o
+OBJS    += $(OBJ_DIR)/odp_queue.o
+OBJS    += $(OBJ_DIR)/odp_schedule.o
+OBJS    += $(OBJ_DIR)/odp_shared_memory.o
+OBJS    += $(OBJ_DIR)/odp_spinlock.o
+OBJS    += $(OBJ_DIR)/odp_system_info.o
+OBJS    += $(OBJ_DIR)/odp_thread.o
+OBJS    += $(OBJ_DIR)/odp_ticketlock.o
+OBJS    += $(OBJ_DIR)/odp_time.o
+OBJS    += $(OBJ_DIR)/odp_timer.o
+OBJS    += $(OBJ_DIR)/odp_ring.o
+OBJS    += $(OBJ_DIR)/odp_rwlock.o
+
+DEPS     = $(OBJS:.o=.d)
+
+.PHONY: all
+all: libs
+
+-include $(DEPS)
+
+$(LIB_DIR):
+	$(MKDIR) $(LIB_DIR)
+
+#
+# Compile rules
+#
+vpath %.c source $(LINUX_GENERIC_DIR)/source
+
+$(OBJ_DIR)/%.o: %.c
+	$(ECHO) "  CC   $<"
+	$(CC) -c -MD $(EXTRA_CFLAGS) $(CFLAGS) -o $@ $<
+
+#
+# Lib rule
+#
+$(STATIC_LIB): $(OBJS)
+	$(AR) -cr $@ $(OBJS)
+
+clean:
+	$(RMDIR) $(OBJ_DIR)
+	$(RMDIR) $(LIB_DIR)
+
+.PHONY: docs
+docs:
+	$(ECHO) "Documenation is not yet available"
+	@false
+
+.PHONY: libs
+libs: $(OBJ_DIR) $(LIB_DIR) $(STATIC_LIB)
+
+.PHONY: lib_install
+lib_install: libs
+	install -d $(DESTDIR)/lib
+	install -m 0644 ${STATIC_LIB} $(DESTDIR)/lib/
+
+.PHONY: headers_install
+headers_install: libs
+	$(ECHO) Installing headers to $(DESTDIR)/include
+	$(COPY) $(ODP_ROOT)/include $(DESTDIR)
+	$(COPY) $(LINUX_GENERIC_DIR)/include/api/* $(DESTDIR)/include/
+	-$(COPY) include/api/* $(DESTDIR)/include/
+
+install: lib_install headers_install