blob: 70291577b9a259d74fb6f81c03171a58edd05001 [file] [log] [blame]
[comment encoding = UTF-8 /]
[comment]
/*****************************************************************************
* Copyright (c) 2013 INTEMPORA S.A.
*
* This software is a computer program whose purpose is to transform RobotML models
* into RTMaps diagrams and RTMaps components via source code generation techniques.
*
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
* Nicolas DU LAC (INTEMPORA) - Initial API and implementation
*
*****************************************************************************/
[/comment]
[module generate_rtmaps_makefile('http://www.eclipse.org/uml2/3.0.0/UML', 'http://Papyrus/RobotML/1')]
[import org::eclipse::papyrus::robotml::generators::common::mmqueries::GeneralQueries /]
[import org::eclipse::papyrus::robotml::generators::common::mmqueries::ArchitectureQueries /]
[template public generateRTMapsMakefile(model : Model)]
[file ('user_sdk/' + model.name + '.u/makefile', false, 'UTF-8')]
[comment][for (elt: NamedElement | getElementsWithStereotype(model,'Sensor'))]
Sensor: [elt.name/]
[/for]
[for (elt: NamedElement | getElementsWithStereotype(model,'Actuator'))]
Actuator: [elt.name/]
[/for]
[for (elt: NamedElement | getElementsWithStereotype(model,'System'))]
Subsystem: [elt.name/]
[/for][/comment]
# RTMaps Makefile
# Copyright 2002-2011 (C) Intempora S.A.
ROOTDIR := $(realpath $(CURDIR)/..)
ifeq ($(ROOTDIR),)
$(error Please use make at least version 3.81)
endif
# Add C++ sources here
sources = \
[for (elt: NamedElement | getComponentModels(model))]
[if (isMacroComponent(elt.oclAsType(Class)) = false)]
maps_[elt.name/].cpp \
[/if]
[/for]
# [protected ('Additional C++ sources')]
# [/protected]
# Add C sources here
# [protected ('Additional C sources')]
csources =
# [/protected]
PCK = rtmaps_[model.name/].pck
# To add options to link:
# [protected ('Additional libraries')]
# LDLIBS += -lMyLib
# LDFLAGS += -L/my/directory/
# [/protected]
# To add options to the compiler:
# [protected ('Additional compiler options')]
# CFLAGS += my specific C flags
# CXXFLAGS += my specific C++ flags
CPPFLAGS += -I../include
# [/protected]
all: pck
RTMAPS_SDKDIR ?=/opt/rtmaps
include $(RTMAPS_SDKDIR)/templates.u/makefile.inc
[/file]
[/template]