blob: 47853b352b1295e007e23c4546975d00d498ba2e [file] [log] [blame]
/**
********************************************************************************
* Copyright (c) 2020-2021 Robert Bosch GmbH.
*
* This program and the accompanying materials are made
* available under the terms of the Eclipse Public License 2.0
* which is available at https://www.eclipse.org/legal/epl-2.0/
*
* SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Robert Bosch GmbH - initial API and implementation
* *******************************************************************************
*/
package org.eclipse.app4mc.slg.linux.generators
class LinuxMakeGenerator {
// Suppress default constructor
private new() {
throw new IllegalStateException("Utility class");
}
static def String getContent(boolean experimentalCodeMatching, boolean instrumentation) '''
synthetic: main.o tasks.o runnables.o «IF experimentalCodeMatching»codesnippets.o«ENDIF» «IF instrumentation»instrument.o«ENDIF» «IF !experimentalCodeMatching» labels.o ticksUtils.o«ENDIF»
gcc -o synthetic main.o tasks.o runnables.o «IF !experimentalCodeMatching» labels.o ticksUtils.o«ENDIF» «IF experimentalCodeMatching»codesnippets.o«ENDIF» «IF instrumentation»instrument.o«ENDIF» -pthread
main.o: Executable/main/_src/main.c
gcc -c «IF !experimentalCodeMatching»-Isynthetic_gen/labels/_inc -Isynthetic_gen/ticksUtils/_inc«ENDIF» -Isynthetic_gen/tasks/_inc -Isynthetic_gen/runnables/_inc -Isynthetic_gen «IF experimentalCodeMatching»-Isynthetic_gen/codesnippets/_inc«ENDIF» Executable/main/_src/main.c
tasks.o: synthetic_gen/tasks/_src/tasks.c
gcc -c «IF !experimentalCodeMatching»-Isynthetic_gen/labels/_inc -Isynthetic_gen/ticksUtils/_inc«ENDIF» -Isynthetic_gen/tasks/_inc -Isynthetic_gen/runnables/_inc «IF experimentalCodeMatching»-Isynthetic_gen/codesnippets/_inc«ENDIF» synthetic_gen/tasks/_src/tasks.c
runnables.o: synthetic_gen/runnables/_src/runnables.c
gcc -c «IF !experimentalCodeMatching»-Isynthetic_gen/labels/_inc -Isynthetic_gen/ticksUtils/_inc«ENDIF» -Isynthetic_gen/runnables/_inc «IF experimentalCodeMatching»-Isynthetic_gen/codesnippets/_inc«ENDIF» synthetic_gen/runnables/_src/runnables.c -O2
«IF !experimentalCodeMatching»
labels.o: synthetic_gen/labels/_src/labels.c
gcc -c -Isynthetic_gen/labels/_inc synthetic_gen/labels/_src/labels.c -O2
ticksUtils.o: synthetic_gen/ticksUtils/_src/ticksUtils.c
gcc -c -Isynthetic_gen/ticksUtils/_inc synthetic_gen/ticksUtils/_src/ticksUtils.c -O2
«ELSE»
codesnippets.o: synthetic_gen/codesnippets/_src/codesnippets.c
gcc -c -Isynthetic_gen/codesnippets/_inc synthetic_gen/codesnippets/_src/codesnippets.c
«ENDIF»
«IF instrumentation »
instrument.o: synthetic_gen/instrument.c
gcc -c -Isynthetic_gen synthetic_gen/instrument.c
«ENDIF»
'''
}