From 59e190202e57ab151fe8a23a2ca14615c1e8c4d9 Mon Sep 17 00:00:00 2001 From: Uros Majstorovic Date: Wed, 2 Feb 2022 06:52:04 +0100 Subject: fixed build --- ecp/build.sh | 4 ++-- ecp/src/ecp/Makefile | 2 +- ecp/src/ecp/common.mk | 7 +++---- ecp/src/ecp/crypto/Makefile | 2 +- ecp/src/platform/common.mk | 4 ++-- ecp/test/Makefile | 2 +- ecp/util/Makefile | 2 +- 7 files changed, 11 insertions(+), 12 deletions(-) diff --git a/ecp/build.sh b/ecp/build.sh index 4b7a16f..acb1a14 100755 --- a/ecp/build.sh +++ b/ecp/build.sh @@ -7,7 +7,7 @@ else fi PLATFORM=posix -cd src +cd src/ecp if [ "$ARG" != "clean" ]; then make platform=$PLATFORM clean fi @@ -16,7 +16,7 @@ if [ "$ARG" == "all" ]; then make platform=$PLATFORM install fi -cd ../util +cd ../../util if [ "$ARG" != "clean" ]; then make platform=$PLATFORM clean fi diff --git a/ecp/src/ecp/Makefile b/ecp/src/ecp/Makefile index 5fed12a..4590dd3 100644 --- a/ecp/src/ecp/Makefile +++ b/ecp/src/ecp/Makefile @@ -2,7 +2,7 @@ include common.mk obj = core.o timer.o dir.o dir_srv.o subdirs = crypto $(platform_dir) -build_dir = ../build-$(platform) +build_dir = ../../build-$(platform) include $(platform_dir)/platform_obj.mk diff --git a/ecp/src/ecp/common.mk b/ecp/src/ecp/common.mk index a2f8663..4c511f8 100644 --- a/ecp/src/ecp/common.mk +++ b/ecp/src/ecp/common.mk @@ -1,9 +1,8 @@ platform ?= posix pwd := $(abspath $(dir $(firstword $(MAKEFILE_LIST)))) -ecp_dir := $(abspath $(dir $(lastword $(MAKEFILE_LIST)))/..) -src_dir := $(abspath $(ecp_dir)/src) -platform_dir = $(abspath $(ecp_dir)/platform/$(platform)) +src_dir := $(abspath $(dir $(lastword $(MAKEFILE_LIST)))/..) +platform_dir = $(abspath $(src_dir)/platform/$(platform)) include $(platform_dir)/platform.mk -CFLAGS += -I$(src_dir) -I$(platform_dir) +CFLAGS += -I$(src_dir)/ecp -I$(platform_dir) diff --git a/ecp/src/ecp/crypto/Makefile b/ecp/src/ecp/crypto/Makefile index b1d2996..3a50965 100644 --- a/ecp/src/ecp/crypto/Makefile +++ b/ecp/src/ecp/crypto/Makefile @@ -1,5 +1,5 @@ include ../common.mk -ssl_dir = ../../../ext/libressl +ssl_dir = ../../../../ext/libressl CFLAGS += -I$(ssl_dir)/include MAKEFLAGS += -I$(pwd)/.. diff --git a/ecp/src/platform/common.mk b/ecp/src/platform/common.mk index d49792b..18d130d 100644 --- a/ecp/src/platform/common.mk +++ b/ecp/src/platform/common.mk @@ -1,3 +1,3 @@ platform ?= posix -src_dir := $(abspath $(dir $(lastword $(MAKEFILE_LIST)))../src) -include $(src_dir)/common.mk +src_dir := $(abspath $(dir $(lastword $(MAKEFILE_LIST)))/..) +include $(src_dir)/ecp/common.mk diff --git a/ecp/test/Makefile b/ecp/test/Makefile index 5aeb57a..20b50e5 100644 --- a/ecp/test/Makefile +++ b/ecp/test/Makefile @@ -1,5 +1,5 @@ src_dir = ../src -include $(src_dir)/common.mk +include $(src_dir)/ecp/common.mk CFLAGS += -I../util -Wno-int-to-void-pointer-cast dep=../build-posix/*.a ../util/libecputil.a diff --git a/ecp/util/Makefile b/ecp/util/Makefile index 72b6290..e65a757 100644 --- a/ecp/util/Makefile +++ b/ecp/util/Makefile @@ -1,5 +1,5 @@ src_dir = ../src -include $(src_dir)/common.mk +include $(src_dir)/ecp/common.mk obj=util.o dep=../build-posix/*.a ./libecputil.a -- cgit v1.2.3