author | Edouard Tisserant <edouard.tisserant@gmail.com> |
Sat, 23 Nov 2024 00:49:26 +0100 | |
changeset 4044 | 2a4b8b59d165 |
parent 3949 | f64dce4e2f62 |
child 4058 | 5472b88bbc9d |
permissions | -rw-r--r-- |
3937
e13543d716b6
C++ runtime: add eRPC server, minimal CLI and Makefile. WIP.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff
changeset
|
1 |
# Builds standalone C/C++ Beremiz runtime |
e13543d716b6
C++ runtime: add eRPC server, minimal CLI and Makefile. WIP.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff
changeset
|
2 |
|
e13543d716b6
C++ runtime: add eRPC server, minimal CLI and Makefile. WIP.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff
changeset
|
3 |
# This Makefile is based on fragments of eRPC Makefiles |
e13543d716b6
C++ runtime: add eRPC server, minimal CLI and Makefile. WIP.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff
changeset
|
4 |
|
e13543d716b6
C++ runtime: add eRPC server, minimal CLI and Makefile. WIP.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff
changeset
|
5 |
APP_NAME = beremiz_runtime |
e13543d716b6
C++ runtime: add eRPC server, minimal CLI and Makefile. WIP.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff
changeset
|
6 |
|
e13543d716b6
C++ runtime: add eRPC server, minimal CLI and Makefile. WIP.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff
changeset
|
7 |
RUNTIME_ROOT = $(abspath $(dir $(lastword $(MAKEFILE_LIST)))) |
e13543d716b6
C++ runtime: add eRPC server, minimal CLI and Makefile. WIP.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff
changeset
|
8 |
ERPC_ROOT ?= $(abspath $(RUNTIME_ROOT)/../../erpc) |
e13543d716b6
C++ runtime: add eRPC server, minimal CLI and Makefile. WIP.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff
changeset
|
9 |
ERPC_C_ROOT = $(ERPC_ROOT)/erpc_c |
3940
934bd46a7500
C++ runtime: WIP: untested PLCObject implementation. Still missing tracing.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
3937
diff
changeset
|
10 |
BEREMIZ_ROOT = $(abspath $(RUNTIME_ROOT)/..) |
934bd46a7500
C++ runtime: WIP: untested PLCObject implementation. Still missing tracing.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
3937
diff
changeset
|
11 |
MATIEC_ROOT ?= $(abspath $(RUNTIME_ROOT)/../../matiec) |
3937
e13543d716b6
C++ runtime: add eRPC server, minimal CLI and Makefile. WIP.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff
changeset
|
12 |
|
e13543d716b6
C++ runtime: add eRPC server, minimal CLI and Makefile. WIP.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff
changeset
|
13 |
INCLUDES += $(ERPC_C_ROOT)/infra \ |
e13543d716b6
C++ runtime: add eRPC server, minimal CLI and Makefile. WIP.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff
changeset
|
14 |
$(ERPC_C_ROOT)/port \ |
e13543d716b6
C++ runtime: add eRPC server, minimal CLI and Makefile. WIP.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff
changeset
|
15 |
$(ERPC_C_ROOT)/setup \ |
e13543d716b6
C++ runtime: add eRPC server, minimal CLI and Makefile. WIP.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff
changeset
|
16 |
$(ERPC_C_ROOT)/transports \ |
e13543d716b6
C++ runtime: add eRPC server, minimal CLI and Makefile. WIP.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff
changeset
|
17 |
$(ERPC_ROOT)/test/common/config \ |
3940
934bd46a7500
C++ runtime: WIP: untested PLCObject implementation. Still missing tracing.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
3937
diff
changeset
|
18 |
$(ERPC_ROOT)/erpcgen/src \ |
934bd46a7500
C++ runtime: WIP: untested PLCObject implementation. Still missing tracing.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
3937
diff
changeset
|
19 |
$(BEREMIZ_ROOT)/targets \ |
934bd46a7500
C++ runtime: WIP: untested PLCObject implementation. Still missing tracing.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
3937
diff
changeset
|
20 |
$(MATIEC_ROOT)/lib/C |
3937
e13543d716b6
C++ runtime: add eRPC server, minimal CLI and Makefile. WIP.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff
changeset
|
21 |
|
e13543d716b6
C++ runtime: add eRPC server, minimal CLI and Makefile. WIP.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff
changeset
|
22 |
INCLUDES := $(foreach includes, $(INCLUDES), -I $(includes)) |
e13543d716b6
C++ runtime: add eRPC server, minimal CLI and Makefile. WIP.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff
changeset
|
23 |
|
e13543d716b6
C++ runtime: add eRPC server, minimal CLI and Makefile. WIP.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff
changeset
|
24 |
ERPC_SOURCES += $(ERPC_ROOT)/erpcgen/src/format_string.cpp \ |
e13543d716b6
C++ runtime: add eRPC server, minimal CLI and Makefile. WIP.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff
changeset
|
25 |
$(ERPC_ROOT)/erpcgen/src/Logging.cpp \ |
e13543d716b6
C++ runtime: add eRPC server, minimal CLI and Makefile. WIP.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff
changeset
|
26 |
$(ERPC_ROOT)/erpcgen/src/options.cpp \ |
e13543d716b6
C++ runtime: add eRPC server, minimal CLI and Makefile. WIP.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff
changeset
|
27 |
$(ERPC_C_ROOT)/infra/erpc_arbitrated_client_manager.cpp \ |
e13543d716b6
C++ runtime: add eRPC server, minimal CLI and Makefile. WIP.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff
changeset
|
28 |
$(ERPC_C_ROOT)/infra/erpc_basic_codec.cpp \ |
e13543d716b6
C++ runtime: add eRPC server, minimal CLI and Makefile. WIP.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff
changeset
|
29 |
$(ERPC_C_ROOT)/infra/erpc_client_manager.cpp \ |
e13543d716b6
C++ runtime: add eRPC server, minimal CLI and Makefile. WIP.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff
changeset
|
30 |
$(ERPC_C_ROOT)/infra/erpc_crc16.cpp \ |
e13543d716b6
C++ runtime: add eRPC server, minimal CLI and Makefile. WIP.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff
changeset
|
31 |
$(ERPC_C_ROOT)/infra/erpc_server.cpp \ |
e13543d716b6
C++ runtime: add eRPC server, minimal CLI and Makefile. WIP.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff
changeset
|
32 |
$(ERPC_C_ROOT)/infra/erpc_simple_server.cpp \ |
e13543d716b6
C++ runtime: add eRPC server, minimal CLI and Makefile. WIP.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff
changeset
|
33 |
$(ERPC_C_ROOT)/infra/erpc_framed_transport.cpp \ |
4044
2a4b8b59d165
eRPC: switch to beremiz/erpc fork with no CRC on TCP
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
3949
diff
changeset
|
34 |
$(ERPC_C_ROOT)/infra/erpc_nocrc_framed_transport.cpp \ |
3937
e13543d716b6
C++ runtime: add eRPC server, minimal CLI and Makefile. WIP.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff
changeset
|
35 |
$(ERPC_C_ROOT)/infra/erpc_message_buffer.cpp \ |
e13543d716b6
C++ runtime: add eRPC server, minimal CLI and Makefile. WIP.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff
changeset
|
36 |
$(ERPC_C_ROOT)/infra/erpc_message_loggers.cpp \ |
e13543d716b6
C++ runtime: add eRPC server, minimal CLI and Makefile. WIP.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff
changeset
|
37 |
$(ERPC_C_ROOT)/infra/erpc_transport_arbitrator.cpp \ |
e13543d716b6
C++ runtime: add eRPC server, minimal CLI and Makefile. WIP.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff
changeset
|
38 |
$(ERPC_C_ROOT)/infra/erpc_utils.cpp \ |
e13543d716b6
C++ runtime: add eRPC server, minimal CLI and Makefile. WIP.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff
changeset
|
39 |
$(ERPC_C_ROOT)/port/erpc_port_stdlib.cpp \ |
e13543d716b6
C++ runtime: add eRPC server, minimal CLI and Makefile. WIP.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff
changeset
|
40 |
$(ERPC_C_ROOT)/port/erpc_threading_pthreads.cpp \ |
e13543d716b6
C++ runtime: add eRPC server, minimal CLI and Makefile. WIP.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff
changeset
|
41 |
$(ERPC_C_ROOT)/port/erpc_serial.cpp \ |
e13543d716b6
C++ runtime: add eRPC server, minimal CLI and Makefile. WIP.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff
changeset
|
42 |
$(ERPC_C_ROOT)/transports/erpc_serial_transport.cpp \ |
e13543d716b6
C++ runtime: add eRPC server, minimal CLI and Makefile. WIP.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff
changeset
|
43 |
$(ERPC_C_ROOT)/transports/erpc_tcp_transport.cpp |
e13543d716b6
C++ runtime: add eRPC server, minimal CLI and Makefile. WIP.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff
changeset
|
44 |
|
3949
f64dce4e2f62
C runtime: initial fixes. Now runs and traces first_steps example.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
3940
diff
changeset
|
45 |
SOURCES += $(RUNTIME_ROOT)/erpc_PLCObject_client.cpp \ |
3937
e13543d716b6
C++ runtime: add eRPC server, minimal CLI and Makefile. WIP.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff
changeset
|
46 |
$(RUNTIME_ROOT)/erpc_PLCObject_interface.cpp \ |
e13543d716b6
C++ runtime: add eRPC server, minimal CLI and Makefile. WIP.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff
changeset
|
47 |
$(RUNTIME_ROOT)/erpc_PLCObject_server.cpp \ |
3940
934bd46a7500
C++ runtime: WIP: untested PLCObject implementation. Still missing tracing.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
3937
diff
changeset
|
48 |
$(RUNTIME_ROOT)/md5.cpp \ |
934bd46a7500
C++ runtime: WIP: untested PLCObject implementation. Still missing tracing.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
3937
diff
changeset
|
49 |
$(RUNTIME_ROOT)/blob.cpp \ |
3937
e13543d716b6
C++ runtime: add eRPC server, minimal CLI and Makefile. WIP.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff
changeset
|
50 |
$(RUNTIME_ROOT)/posix_main.cpp \ |
e13543d716b6
C++ runtime: add eRPC server, minimal CLI and Makefile. WIP.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff
changeset
|
51 |
$(RUNTIME_ROOT)/PLCObject.cpp |
e13543d716b6
C++ runtime: add eRPC server, minimal CLI and Makefile. WIP.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff
changeset
|
52 |
|
e13543d716b6
C++ runtime: add eRPC server, minimal CLI and Makefile. WIP.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff
changeset
|
53 |
|
e13543d716b6
C++ runtime: add eRPC server, minimal CLI and Makefile. WIP.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff
changeset
|
54 |
# get version from version.py |
e13543d716b6
C++ runtime: add eRPC server, minimal CLI and Makefile. WIP.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff
changeset
|
55 |
BEREMIZ_VERSION := $(shell python3 $(RUNTIME_ROOT)/../version.py) |
e13543d716b6
C++ runtime: add eRPC server, minimal CLI and Makefile. WIP.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff
changeset
|
56 |
|
e13543d716b6
C++ runtime: add eRPC server, minimal CLI and Makefile. WIP.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff
changeset
|
57 |
CXXFLAGS += -std=gnu++17 -Wunused-variable -Wno-deprecated-register -Wno-narrowing -Werror -DBEREMIZ_VERSION=$(BEREMIZ_VERSION) |
e13543d716b6
C++ runtime: add eRPC server, minimal CLI and Makefile. WIP.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff
changeset
|
58 |
# CFLAGS += -Os -DNDEBUG |
e13543d716b6
C++ runtime: add eRPC server, minimal CLI and Makefile. WIP.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff
changeset
|
59 |
CXXFLAGS += -g3 -O0 -DDEBUG |
e13543d716b6
C++ runtime: add eRPC server, minimal CLI and Makefile. WIP.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff
changeset
|
60 |
|
e13543d716b6
C++ runtime: add eRPC server, minimal CLI and Makefile. WIP.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff
changeset
|
61 |
LIBRARIES += -lpthread -lrt -lc -lm |
e13543d716b6
C++ runtime: add eRPC server, minimal CLI and Makefile. WIP.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff
changeset
|
62 |
LD = $(CXX) |
e13543d716b6
C++ runtime: add eRPC server, minimal CLI and Makefile. WIP.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff
changeset
|
63 |
|
e13543d716b6
C++ runtime: add eRPC server, minimal CLI and Makefile. WIP.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff
changeset
|
64 |
OBJS_ROOT = $(RUNTIME_ROOT)/build |
e13543d716b6
C++ runtime: add eRPC server, minimal CLI and Makefile. WIP.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff
changeset
|
65 |
SOURCES_ABS := $(foreach s,$(SOURCES),$(abspath $(s))) |
e13543d716b6
C++ runtime: add eRPC server, minimal CLI and Makefile. WIP.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff
changeset
|
66 |
SOURCES_REL := $(subst $(RUNTIME_ROOT)/,,$(SOURCES_ABS)) |
e13543d716b6
C++ runtime: add eRPC server, minimal CLI and Makefile. WIP.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff
changeset
|
67 |
SOURCE_DIRS_ABS := $(sort $(foreach f,$(SOURCES_ABS),$(dir $(f)))) |
e13543d716b6
C++ runtime: add eRPC server, minimal CLI and Makefile. WIP.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff
changeset
|
68 |
SOURCE_DIRS_REL := $(subst $(RUNTIME_ROOT)/,,$(SOURCE_DIRS_ABS)) |
e13543d716b6
C++ runtime: add eRPC server, minimal CLI and Makefile. WIP.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff
changeset
|
69 |
CXX_SOURCES = $(filter %.cpp,$(SOURCES_REL)) |
e13543d716b6
C++ runtime: add eRPC server, minimal CLI and Makefile. WIP.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff
changeset
|
70 |
OBJECTS_CXX := $(addprefix $(OBJS_ROOT)/,$(CXX_SOURCES:.cpp=.o)) |
e13543d716b6
C++ runtime: add eRPC server, minimal CLI and Makefile. WIP.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff
changeset
|
71 |
|
e13543d716b6
C++ runtime: add eRPC server, minimal CLI and Makefile. WIP.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff
changeset
|
72 |
$(OBJS_ROOT)/%.o: $(RUNTIME_ROOT)/%.cpp |
e13543d716b6
C++ runtime: add eRPC server, minimal CLI and Makefile. WIP.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff
changeset
|
73 |
@echo Compiling $(subst $(RUNTIME_ROOT)/,,$<) |
e13543d716b6
C++ runtime: add eRPC server, minimal CLI and Makefile. WIP.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff
changeset
|
74 |
$(CXX) $(CXXFLAGS) $(INCLUDES) -MMD -MF $(basename $@).d -MP -o $@ -c $< |
e13543d716b6
C++ runtime: add eRPC server, minimal CLI and Makefile. WIP.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff
changeset
|
75 |
|
e13543d716b6
C++ runtime: add eRPC server, minimal CLI and Makefile. WIP.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff
changeset
|
76 |
ERPC_OBJS_ROOT = $(RUNTIME_ROOT)/erpcbuild |
e13543d716b6
C++ runtime: add eRPC server, minimal CLI and Makefile. WIP.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff
changeset
|
77 |
ERPC_SOURCES_ABS := $(foreach s,$(ERPC_SOURCES),$(abspath $(s))) |
e13543d716b6
C++ runtime: add eRPC server, minimal CLI and Makefile. WIP.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff
changeset
|
78 |
ERPC_SOURCES_REL := $(subst $(ERPC_ROOT)/,,$(ERPC_SOURCES_ABS)) |
e13543d716b6
C++ runtime: add eRPC server, minimal CLI and Makefile. WIP.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff
changeset
|
79 |
ERPC_SOURCE_DIRS_ABS := $(sort $(foreach f,$(ERPC_SOURCES_ABS),$(dir $(f)))) |
e13543d716b6
C++ runtime: add eRPC server, minimal CLI and Makefile. WIP.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff
changeset
|
80 |
ERPC_SOURCE_DIRS_REL := $(subst $(ERPC_ROOT)/,,$(ERPC_SOURCE_DIRS_ABS)) |
e13543d716b6
C++ runtime: add eRPC server, minimal CLI and Makefile. WIP.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff
changeset
|
81 |
ERPC_CXX_SOURCES = $(filter %.cpp,$(ERPC_SOURCES_REL)) |
e13543d716b6
C++ runtime: add eRPC server, minimal CLI and Makefile. WIP.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff
changeset
|
82 |
ERPC_OBJECTS_CXX := $(addprefix $(ERPC_OBJS_ROOT)/,$(ERPC_CXX_SOURCES:.cpp=.o)) |
e13543d716b6
C++ runtime: add eRPC server, minimal CLI and Makefile. WIP.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff
changeset
|
83 |
|
e13543d716b6
C++ runtime: add eRPC server, minimal CLI and Makefile. WIP.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff
changeset
|
84 |
$(ERPC_OBJS_ROOT)/%.o: $(ERPC_ROOT)/%.cpp |
e13543d716b6
C++ runtime: add eRPC server, minimal CLI and Makefile. WIP.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff
changeset
|
85 |
@echo Compiling, $(subst $(ERPC_ROOT)/,,$<) |
e13543d716b6
C++ runtime: add eRPC server, minimal CLI and Makefile. WIP.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff
changeset
|
86 |
$(CXX) $(CXXFLAGS) $(INCLUDES) -MMD -MF $(basename $@).d -MP -o $@ -c $< |
e13543d716b6
C++ runtime: add eRPC server, minimal CLI and Makefile. WIP.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff
changeset
|
87 |
|
e13543d716b6
C++ runtime: add eRPC server, minimal CLI and Makefile. WIP.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff
changeset
|
88 |
OBJECTS_ALL := $(sort $(ERPC_OBJECTS_CXX) $(OBJECTS_CXX)) |
e13543d716b6
C++ runtime: add eRPC server, minimal CLI and Makefile. WIP.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff
changeset
|
89 |
OBJECTS_DIRS := $(OBJS_ROOT) $(addprefix $(OBJS_ROOT)/,$(SOURCE_DIRS_REL)) $(ERPC_OBJS_ROOT) $(addprefix $(ERPC_OBJS_ROOT)/,$(ERPC_SOURCE_DIRS_REL)) |
e13543d716b6
C++ runtime: add eRPC server, minimal CLI and Makefile. WIP.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff
changeset
|
90 |
|
e13543d716b6
C++ runtime: add eRPC server, minimal CLI and Makefile. WIP.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff
changeset
|
91 |
.PHONY: all $(APP_NAME) |
e13543d716b6
C++ runtime: add eRPC server, minimal CLI and Makefile. WIP.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff
changeset
|
92 |
all: $(APP_NAME) $(OBJECTS_DIRS) |
e13543d716b6
C++ runtime: add eRPC server, minimal CLI and Makefile. WIP.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff
changeset
|
93 |
|
e13543d716b6
C++ runtime: add eRPC server, minimal CLI and Makefile. WIP.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff
changeset
|
94 |
$(OBJECTS_DIRS) : |
e13543d716b6
C++ runtime: add eRPC server, minimal CLI and Makefile. WIP.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff
changeset
|
95 |
mkdir -p $@ |
e13543d716b6
C++ runtime: add eRPC server, minimal CLI and Makefile. WIP.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff
changeset
|
96 |
|
e13543d716b6
C++ runtime: add eRPC server, minimal CLI and Makefile. WIP.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff
changeset
|
97 |
$(OBJECTS_ALL): | $(OBJECTS_DIRS) |
e13543d716b6
C++ runtime: add eRPC server, minimal CLI and Makefile. WIP.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff
changeset
|
98 |
|
e13543d716b6
C++ runtime: add eRPC server, minimal CLI and Makefile. WIP.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff
changeset
|
99 |
$(APP_NAME): $(OBJECTS_ALL) |
e13543d716b6
C++ runtime: add eRPC server, minimal CLI and Makefile. WIP.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff
changeset
|
100 |
@echo Linking, $(APP_NAME) |
e13543d716b6
C++ runtime: add eRPC server, minimal CLI and Makefile. WIP.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff
changeset
|
101 |
$(LD) $(LDFLAGS) \ |
e13543d716b6
C++ runtime: add eRPC server, minimal CLI and Makefile. WIP.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff
changeset
|
102 |
$(OBJECTS_ALL) \ |
e13543d716b6
C++ runtime: add eRPC server, minimal CLI and Makefile. WIP.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff
changeset
|
103 |
-o $@ \ |
e13543d716b6
C++ runtime: add eRPC server, minimal CLI and Makefile. WIP.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff
changeset
|
104 |
$(LIBRARIES) |
e13543d716b6
C++ runtime: add eRPC server, minimal CLI and Makefile. WIP.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff
changeset
|
105 |
@echo "Output binary:" ; echo " $(APP_NAME)" |
e13543d716b6
C++ runtime: add eRPC server, minimal CLI and Makefile. WIP.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff
changeset
|
106 |
|
e13543d716b6
C++ runtime: add eRPC server, minimal CLI and Makefile. WIP.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff
changeset
|
107 |
.PHONY: clean |
e13543d716b6
C++ runtime: add eRPC server, minimal CLI and Makefile. WIP.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff
changeset
|
108 |
clean:: |
e13543d716b6
C++ runtime: add eRPC server, minimal CLI and Makefile. WIP.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff
changeset
|
109 |
@echo "Cleaning $(APP_NAME)" |
e13543d716b6
C++ runtime: add eRPC server, minimal CLI and Makefile. WIP.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff
changeset
|
110 |
rm -rf $(OBJECTS_ALL) $(OBJECTS_DIRS) $(APP_NAME) |
e13543d716b6
C++ runtime: add eRPC server, minimal CLI and Makefile. WIP.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff
changeset
|
111 |
|
e13543d716b6
C++ runtime: add eRPC server, minimal CLI and Makefile. WIP.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff
changeset
|
112 |
-include $(OBJECTS_ALL:.o=.d) |