diff options
Diffstat (limited to 'org.rtems.cdt/src/org/rtems/cdt/Constants.java')
-rw-r--r-- | org.rtems.cdt/src/org/rtems/cdt/Constants.java | 110 |
1 files changed, 110 insertions, 0 deletions
diff --git a/org.rtems.cdt/src/org/rtems/cdt/Constants.java b/org.rtems.cdt/src/org/rtems/cdt/Constants.java new file mode 100644 index 0000000..a991a9c --- /dev/null +++ b/org.rtems.cdt/src/org/rtems/cdt/Constants.java @@ -0,0 +1,110 @@ +/* + * Copyright (c) 2008 Embedded Brains GmbH and others. + * + * Embedded Brains GmbH + * Obere Lagerstr. 30 + * D-82178 Puchheim + * Germany + * rtems@embedded-brains.de + * + * All rights reserved. This program and the accompanying materials are made + * available under the terms of the Eclipse Public License Version 1.0 ("EPL") + * which accompanies this distribution and is available at + * + * http://www.eclipse.org/legal/epl-v10.html + * + * For purposes of the EPL, "Program" will mean the Content. + * + * Contributors: + * + * Sebastian Huber (Embedded Brains GmbH) - Initial API and implementation. + */ + +package org.rtems.cdt; + +import java.util.Map; + +public class Constants { + public static final String PATH_SEPARATOR = System.getProperty( "path.separator"); + + public static final String PATH_VARIABLE_NAME = getPathVariableName(); + + public static final String PLATFORM_DEFAULT = "default"; + + public static final String PLATFORM_CYGWIN = "cygwin"; + + public static final String BSP_PATH_MAKE_VARIABLE = "PROJECT_RELEASE"; + + public static final String DEFAULT_BASE_PATH = "/opt/rtems-4.9"; + + public static final String DEFAULT_BSP_PATH = "/opt/rtems-4.9/powerpc-rtems4.9/psim"; + + public static final String DEFAULT_CYGWIN_PATH = "C:\\"; + + public static final String DEFAULT_MINGW_PATH = "C:\\"; + + public static final String DEFAULT_MSYS_PATH = "C:\\"; + + public static final String KEY_PREFIX = "org.rtems.cdt"; + + public static final String PLATFORM_KEY = KEY_PREFIX + ".platform"; + + public static final String BASE_PATH_KEY = KEY_PREFIX + ".basePath"; + + public static final String BSP_PATH_KEY = KEY_PREFIX + ".bspPath"; + + public static final String CYGWIN_PATH_KEY = KEY_PREFIX + ".cygwinPath"; + + public static final String MINGW_PATH_KEY = KEY_PREFIX + ".mingwPath"; + + public static final String MSYS_PATH_KEY = KEY_PREFIX + ".msysPath"; + + public static final String PATH_PREPEND_KEY = KEY_PREFIX + ".pathPrepend"; + + public static final String TOOL_KEY_PREFIX = KEY_PREFIX + ".tool"; + + public static final String TOOL_ARCHIVER_KEY = TOOL_KEY_PREFIX + ".archiver"; + + public static final String TOOL_ASSEMBLER_KEY = TOOL_KEY_PREFIX + ".assembler"; + + public static final String COMPILER_KEY_PREFIX = TOOL_KEY_PREFIX + ".compiler"; + + public static final String TOOL_COMPILER_C_KEY = COMPILER_KEY_PREFIX + ".c"; + + public static final String TOOL_COMPILER_CPP_KEY = COMPILER_KEY_PREFIX + ".cpp"; + + public static final String LINKER_KEY_PREFIX = TOOL_KEY_PREFIX + ".linker"; + + public static final String TOOL_LINKER_C_KEY = LINKER_KEY_PREFIX + ".c"; + + public static final String TOOL_LINKER_CPP_KEY = LINKER_KEY_PREFIX + ".cpp"; + + public static final String TOOL_OPTIONS_KEY_POSTFIX = ".options"; + + public static final String TOOL_OPTIONS_ARCHIVER_KEY = TOOL_ARCHIVER_KEY + TOOL_OPTIONS_KEY_POSTFIX; + + public static final String TOOL_OPTIONS_ASSEMBLER_KEY = TOOL_ASSEMBLER_KEY + TOOL_OPTIONS_KEY_POSTFIX; + + public static final String TOOL_OPTIONS_COMPILER_C_KEY = TOOL_COMPILER_C_KEY + TOOL_OPTIONS_KEY_POSTFIX; + + public static final String TOOL_OPTIONS_COMPILER_CPP_KEY = TOOL_COMPILER_CPP_KEY + TOOL_OPTIONS_KEY_POSTFIX; + + public static final String TOOL_OPTIONS_LINKER_C_KEY = TOOL_LINKER_C_KEY + TOOL_OPTIONS_KEY_POSTFIX; + + public static final String TOOL_OPTIONS_LINKER_CPP_KEY = TOOL_LINKER_CPP_KEY + TOOL_OPTIONS_KEY_POSTFIX; + + private static String getPathVariableName() { + Map<String, String> env = System.getenv(); + for (String name : env.keySet()) { + if (name.equalsIgnoreCase( "PATH")) { + return name; + } + } + + return "PATH"; + } + + private Constants() { + // Do nothing + } +} |