From patchwork Thu Apr 17 22:18:34 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Taras Kondratiuk X-Patchwork-Id: 28595 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-qa0-f71.google.com (mail-qa0-f71.google.com [209.85.216.71]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 756BA2013D for ; Thu, 17 Apr 2014 22:18:55 +0000 (UTC) Received: by mail-qa0-f71.google.com with SMTP id j7sf2886388qaq.2 for ; Thu, 17 Apr 2014 15:18:55 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:delivered-to:from:to:date:message-id:cc:subject :precedence:list-id:list-unsubscribe:list-archive:list-post :list-help:list-subscribe:mime-version:errors-to:sender :x-original-sender:x-original-authentication-results:mailing-list :content-type:content-transfer-encoding; bh=HzrSCuBqwXLmGf8SUJqueEwZztsvgQRZCLXzC7nxruM=; b=Kz0GMRy/5v4IL52cOrx3uUl9fYODKnZqeUR/cmaft11FrS5GcQ4ZfN6gvyhAgg0tKB /tP5QWdpbTsy3JSe+eqj73bPVNOIvkFm0ad6fid0g+aeUpvLo+HLiYPox5Sj/SrySzCw JJzFMek6t44cJwY0SbPw+B2K1p85CNd2xFUEmAb/+TM77D36HfFnm57Hhs7AAI03VzgD EDTeYmJh3un71zhKASAI0bO1ghwPwnxDsZj1NGEtV3SFFspeWKqtNk5CN8M/jswk0jtn s9FwlnIDVApvVOsHjXVN+PxWEZL3YLkZkyJ4QsJAwsJAWOZuGpjV6KqEuiPI8wVenwj/ mPTA== X-Gm-Message-State: ALoCoQlxO9boiGGRN3/GgqZ6wy3sqbO62SnDgYs0Mm9EaFe2BDVJCbc9RBi++NUYclEONSeWLxdx X-Received: by 10.58.248.99 with SMTP id yl3mr9474520vec.9.1397773135114; Thu, 17 Apr 2014 15:18:55 -0700 (PDT) X-BeenThere: patchwork-forward@linaro.org Received: by 10.140.86.170 with SMTP id p39ls1332776qgd.49.gmail; Thu, 17 Apr 2014 15:18:55 -0700 (PDT) X-Received: by 10.52.229.97 with SMTP id sp1mr8124659vdc.23.1397773134995; Thu, 17 Apr 2014 15:18:54 -0700 (PDT) Received: from mail-ve0-f172.google.com (mail-ve0-f172.google.com [209.85.128.172]) by mx.google.com with ESMTPS id s7si4674415vev.164.2014.04.17.15.18.54 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 17 Apr 2014 15:18:54 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.128.172 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) client-ip=209.85.128.172; Received: by mail-ve0-f172.google.com with SMTP id jx11so1442710veb.17 for ; Thu, 17 Apr 2014 15:18:54 -0700 (PDT) X-Received: by 10.220.147.16 with SMTP id j16mr10712712vcv.14.1397773134898; Thu, 17 Apr 2014 15:18:54 -0700 (PDT) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patch@linaro.org Received: by 10.220.221.72 with SMTP id ib8csp68970vcb; Thu, 17 Apr 2014 15:18:54 -0700 (PDT) X-Received: by 10.224.161.83 with SMTP id q19mr14494072qax.56.1397773134475; Thu, 17 Apr 2014 15:18:54 -0700 (PDT) Received: from ip-10-141-164-156.ec2.internal (lists.linaro.org. [54.225.227.206]) by mx.google.com with ESMTPS id d5si7501105qad.201.2014.04.17.15.18.53 for (version=TLSv1 cipher=RC4-SHA bits=128/128); Thu, 17 Apr 2014 15:18:54 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of lng-odp-bounces@lists.linaro.org designates 54.225.227.206 as permitted sender) client-ip=54.225.227.206; Received: from localhost ([127.0.0.1] helo=ip-10-141-164-156.ec2.internal) by ip-10-141-164-156.ec2.internal with esmtp (Exim 4.76) (envelope-from ) id 1Waudk-0008H9-Ra; Thu, 17 Apr 2014 22:18:40 +0000 Received: from mail-ee0-f44.google.com ([74.125.83.44]) by ip-10-141-164-156.ec2.internal with esmtp (Exim 4.76) (envelope-from ) id 1Waude-0008H4-Lh for lng-odp@lists.linaro.org; Thu, 17 Apr 2014 22:18:34 +0000 Received: by mail-ee0-f44.google.com with SMTP id e49so1076405eek.31 for ; Thu, 17 Apr 2014 15:18:41 -0700 (PDT) X-Received: by 10.14.100.69 with SMTP id y45mr189694eef.108.1397773121471; Thu, 17 Apr 2014 15:18:41 -0700 (PDT) Received: from uglx0153363.synapse.com ([195.238.92.128]) by mx.google.com with ESMTPSA id o7sm70997607eew.25.2014.04.17.15.18.40 for (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 17 Apr 2014 15:18:40 -0700 (PDT) From: Taras Kondratiuk To: lng-odp@lists.linaro.org Date: Fri, 18 Apr 2014 01:18:34 +0300 Message-Id: <1397773114-25459-1-git-send-email-taras.kondratiuk@linaro.org> X-Mailer: git-send-email 1.7.9.5 Cc: linaro-networking@linaro.org Subject: [lng-odp] [PATCH v3] Keystone2: Inherit linux-generic X-BeenThere: lng-odp@lists.linaro.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: , List-Help: , List-Subscribe: , MIME-Version: 1.0 Errors-To: lng-odp-bounces@lists.linaro.org Sender: lng-odp-bounces@lists.linaro.org X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: taras.kondratiuk@linaro.org X-Original-Authentication-Results: mx.google.com; spf=neutral (google.com: 209.85.128.172 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org X-Google-Group-Id: 836684582541 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 --- 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