C_runtime/Makefile
author Edouard Tisserant <edouard.tisserant@gmail.com>
Wed, 24 Apr 2024 02:15:33 +0200
changeset 3937 e13543d716b6
permissions -rw-r--r--
C++ runtime: add eRPC server, minimal CLI and Makefile. WIP.
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
e13543d716b6 C++ runtime: add eRPC server, minimal CLI and Makefile. WIP.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
    10
e13543d716b6 C++ runtime: add eRPC server, minimal CLI and Makefile. WIP.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
    11
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
    12
            $(ERPC_C_ROOT)/port \
e13543d716b6 C++ runtime: add eRPC server, minimal CLI and Makefile. WIP.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
    13
            $(ERPC_C_ROOT)/setup \
e13543d716b6 C++ runtime: add eRPC server, minimal CLI and Makefile. WIP.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
    14
            $(ERPC_C_ROOT)/transports \
e13543d716b6 C++ runtime: add eRPC server, minimal CLI and Makefile. WIP.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
    15
            $(ERPC_ROOT)/test/common/config \
e13543d716b6 C++ runtime: add eRPC server, minimal CLI and Makefile. WIP.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
    16
            $(ERPC_ROOT)/erpcgen/src
e13543d716b6 C++ runtime: add eRPC server, minimal CLI and Makefile. WIP.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
    17
e13543d716b6 C++ runtime: add eRPC server, minimal CLI and Makefile. WIP.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
    18
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
    19
e13543d716b6 C++ runtime: add eRPC server, minimal CLI and Makefile. WIP.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
    20
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
    21
                $(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
    22
                $(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
    23
                $(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
    24
                $(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
    25
                $(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
    26
                $(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
    27
                $(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
    28
                $(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
    29
                $(ERPC_C_ROOT)/infra/erpc_framed_transport.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_message_buffer.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_message_loggers.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_transport_arbitrator.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_utils.cpp \
e13543d716b6 C++ runtime: add eRPC server, minimal CLI and Makefile. WIP.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
    34
                $(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
    35
                $(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
    36
                $(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
    37
                $(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
    38
                $(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
    39
			
e13543d716b6 C++ runtime: add eRPC server, minimal CLI and Makefile. WIP.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
    40
SOURCES +=  $(RUNTIME_ROOT)/c_erpc_PLCObject_client.cpp \
e13543d716b6 C++ runtime: add eRPC server, minimal CLI and Makefile. WIP.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
    41
            $(RUNTIME_ROOT)/c_erpc_PLCObject_server.cpp \
e13543d716b6 C++ runtime: add eRPC server, minimal CLI and Makefile. WIP.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
    42
            $(RUNTIME_ROOT)/erpc_PLCObject_client.cpp \
e13543d716b6 C++ runtime: add eRPC server, minimal CLI and Makefile. WIP.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
    43
            $(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
    44
            $(RUNTIME_ROOT)/erpc_PLCObject_server.cpp \
e13543d716b6 C++ runtime: add eRPC server, minimal CLI and Makefile. WIP.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
    45
			$(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
    46
			$(RUNTIME_ROOT)/PLCObject.cpp
e13543d716b6 C++ runtime: add eRPC server, minimal CLI and Makefile. WIP.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
    47
e13543d716b6 C++ runtime: add eRPC server, minimal CLI and Makefile. WIP.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
    48
e13543d716b6 C++ runtime: add eRPC server, minimal CLI and Makefile. WIP.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
    49
# 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
    50
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
    51
e13543d716b6 C++ runtime: add eRPC server, minimal CLI and Makefile. WIP.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
    52
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
    53
# CFLAGS += -Os -DNDEBUG
e13543d716b6 C++ runtime: add eRPC server, minimal CLI and Makefile. WIP.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
    54
CXXFLAGS += -g3 -O0 -DDEBUG
e13543d716b6 C++ runtime: add eRPC server, minimal CLI and Makefile. WIP.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
    55
e13543d716b6 C++ runtime: add eRPC server, minimal CLI and Makefile. WIP.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
    56
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
    57
LD = $(CXX)
e13543d716b6 C++ runtime: add eRPC server, minimal CLI and Makefile. WIP.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
    58
e13543d716b6 C++ runtime: add eRPC server, minimal CLI and Makefile. WIP.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
    59
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
    60
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
    61
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
    62
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
    63
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
    64
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
    65
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
    66
e13543d716b6 C++ runtime: add eRPC server, minimal CLI and Makefile. WIP.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
    67
$(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
    68
	@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
    69
	$(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
    70
e13543d716b6 C++ runtime: add eRPC server, minimal CLI and Makefile. WIP.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
    71
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
    72
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
    73
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
    74
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
    75
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
    76
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
    77
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
    78
e13543d716b6 C++ runtime: add eRPC server, minimal CLI and Makefile. WIP.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
    79
$(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
    80
	@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
    81
	$(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
    82
e13543d716b6 C++ runtime: add eRPC server, minimal CLI and Makefile. WIP.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
    83
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
    84
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
    85
e13543d716b6 C++ runtime: add eRPC server, minimal CLI and Makefile. WIP.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
    86
.PHONY: all $(APP_NAME)
e13543d716b6 C++ runtime: add eRPC server, minimal CLI and Makefile. WIP.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
    87
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
    88
e13543d716b6 C++ runtime: add eRPC server, minimal CLI and Makefile. WIP.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
    89
$(OBJECTS_DIRS) :
e13543d716b6 C++ runtime: add eRPC server, minimal CLI and Makefile. WIP.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
    90
	mkdir -p $@
e13543d716b6 C++ runtime: add eRPC server, minimal CLI and Makefile. WIP.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
    91
e13543d716b6 C++ runtime: add eRPC server, minimal CLI and Makefile. WIP.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
    92
$(OBJECTS_ALL): | $(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
$(APP_NAME): $(OBJECTS_ALL)
e13543d716b6 C++ runtime: add eRPC server, minimal CLI and Makefile. WIP.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
    95
	@echo Linking, $(APP_NAME)
e13543d716b6 C++ runtime: add eRPC server, minimal CLI and Makefile. WIP.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
    96
	$(LD) $(LDFLAGS) \
e13543d716b6 C++ runtime: add eRPC server, minimal CLI and Makefile. WIP.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
    97
		$(OBJECTS_ALL) \
e13543d716b6 C++ runtime: add eRPC server, minimal CLI and Makefile. WIP.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
    98
		-o $@ \
e13543d716b6 C++ runtime: add eRPC server, minimal CLI and Makefile. WIP.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
    99
		$(LIBRARIES)
e13543d716b6 C++ runtime: add eRPC server, minimal CLI and Makefile. WIP.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   100
	@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
   101
e13543d716b6 C++ runtime: add eRPC server, minimal CLI and Makefile. WIP.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   102
.PHONY: clean
e13543d716b6 C++ runtime: add eRPC server, minimal CLI and Makefile. WIP.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   103
clean::
e13543d716b6 C++ runtime: add eRPC server, minimal CLI and Makefile. WIP.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   104
	@echo "Cleaning $(APP_NAME)"
e13543d716b6 C++ runtime: add eRPC server, minimal CLI and Makefile. WIP.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   105
	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
   106
e13543d716b6 C++ runtime: add eRPC server, minimal CLI and Makefile. WIP.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
   107
-include $(OBJECTS_ALL:.o=.d)