summaryrefslogtreecommitdiff
path: root/ecp/platform
diff options
context:
space:
mode:
Diffstat (limited to 'ecp/platform')
-rw-r--r--ecp/platform/common.mk3
-rw-r--r--ecp/platform/fe310.mk7
-rw-r--r--ecp/platform/fe310/Makefile3
-rw-r--r--ecp/platform/fe310/platform.mk3
-rw-r--r--ecp/platform/fe310/platform_obj.mk (renamed from ecp/platform/fe310_obj.mk)0
-rw-r--r--ecp/platform/posix/Makefile3
-rw-r--r--ecp/platform/posix/platform.mk (renamed from ecp/platform/posix.mk)2
-rw-r--r--ecp/platform/posix/platform_obj.mk (renamed from ecp/platform/posix_obj.mk)0
8 files changed, 8 insertions, 13 deletions
diff --git a/ecp/platform/common.mk b/ecp/platform/common.mk
new file mode 100644
index 0000000..d49792b
--- /dev/null
+++ b/ecp/platform/common.mk
@@ -0,0 +1,3 @@
+platform ?= posix
+src_dir := $(abspath $(dir $(lastword $(MAKEFILE_LIST)))../src)
+include $(src_dir)/common.mk
diff --git a/ecp/platform/fe310.mk b/ecp/platform/fe310.mk
deleted file mode 100644
index fd3e6dd..0000000
--- a/ecp/platform/fe310.mk
+++ /dev/null
@@ -1,7 +0,0 @@
-FE310_HOME ?= $(PWD)/../../fw/fe310
-export FE310_HOME
-
-include $(FE310_HOME)/common.mk
-CFLAGS += -I$(FE310_HOME) -DECP_WITH_VCONN=1 -DECP_DEBUG=1 -D__FE310__
-
-platform = fe310
diff --git a/ecp/platform/fe310/Makefile b/ecp/platform/fe310/Makefile
index 340effa..1a3502a 100644
--- a/ecp/platform/fe310/Makefile
+++ b/ecp/platform/fe310/Makefile
@@ -1,5 +1,4 @@
-include ../fe310.mk
-CFLAGS += -I../../src
+include ../common.mk
obj_tr = transport.o
obj_tm = time.o
diff --git a/ecp/platform/fe310/platform.mk b/ecp/platform/fe310/platform.mk
new file mode 100644
index 0000000..0230f29
--- /dev/null
+++ b/ecp/platform/fe310/platform.mk
@@ -0,0 +1,3 @@
+fe310_dir = $(abspath $(src_dir)/../../fw/fe310)
+include $(fe310_dir)/platform.mk
+CFLAGS += -I$(fe310_dir) -DECP_WITH_VCONN=1 -DECP_DEBUG=1 -D__FE310__
diff --git a/ecp/platform/fe310_obj.mk b/ecp/platform/fe310/platform_obj.mk
index 52e4bb1..52e4bb1 100644
--- a/ecp/platform/fe310_obj.mk
+++ b/ecp/platform/fe310/platform_obj.mk
diff --git a/ecp/platform/posix/Makefile b/ecp/platform/posix/Makefile
index aebb994..1a3502a 100644
--- a/ecp/platform/posix/Makefile
+++ b/ecp/platform/posix/Makefile
@@ -1,5 +1,4 @@
-include ../posix.mk
-CFLAGS += -I../../src
+include ../common.mk
obj_tr = transport.o
obj_tm = time.o
diff --git a/ecp/platform/posix.mk b/ecp/platform/posix/platform.mk
index 7e7daeb..0370c58 100644
--- a/ecp/platform/posix.mk
+++ b/ecp/platform/posix/platform.mk
@@ -1,4 +1,2 @@
CFLAGS += -O3 -DECP_WITH_PTHREAD=1 -DECP_WITH_HTABLE=1 -DECP_WITH_RBUF=1 -DECP_WITH_MSGQ=1 -DECP_WITH_VCONN=1 -DECP_WITH_DIRSRV -DECP_DEBUG=1
LDFLAGS += -lm -pthread
-
-platform = posix
diff --git a/ecp/platform/posix_obj.mk b/ecp/platform/posix/platform_obj.mk
index 6ca3b8d..6ca3b8d 100644
--- a/ecp/platform/posix_obj.mk
+++ b/ecp/platform/posix/platform_obj.mk