Tags:
not added yet
Build/Project ManagementAn OMS project is a generated directory structure. In OMS there is a Project explorer which allows the creation of such project folder. Projects are hosting al resources created in a modeling effort such as sources, data, intermediate files and executables. A Project is self-contained. It can be transferred to another computer or folder and will work the same way. It contains all files for managing all the project resources. A project can be managed from within OMS and externally from the command line using the Ant tool. Related ToolsBuild management using Ant ANT build toolAn Ant Task for different C/C++ and FORTRAN compiler CC Task Some extentions to standard Ant. ANT contrib Project Directory structure
Optional:
Build FilesEach generated project contains three files that are managing the build process:
The build files are realizing build tasks such as:
The build files are consumed by the build tool called "Ant". Ant is built into the OMS Platform and also exists standalone. There is a manual at the Ant web site which describes the syntax and semantics of build files. Build Process Adaptation.The Build process can be adapted in several ways to adjust for example compiler flags, used compiler, etc. The following rules apply:
There are the following macros which can be redefined Macrodef :
build.xmlThis the is build.xml file as generated in the project folder. It imports the file build_impl.xml and proxies the tasks
<?xml version="1.0" encoding="UTF-8"?> <project basedir="." default="all"> <description> Build all the project resources. </description> <import file="conf/build_impl.xml"/> <!-- The following targets proxy to the conf/build_impl.xml targets with the same name. Since NB3.6 does not show imported targets, they are exposed here to avoid confusion. --> <target depends="build_impl.build" description="build the product" name="build"/> <target depends="build_impl.make" description="make the products" name="make"/> <target depends="build_impl.clean" description="clean up the project" name="clean"/> </project> build.properties# Adjustable build settings. # javac flags javac.deprecation = false javac.debug = true javac.source = 1.4 javac.target = 1.4 javac.verbose = false # native compiler and options # Fortran compiler FTN = g77 # Fortran compiler flags FTN.flags = -Wimplicit -fno-automatic -fcase-preserve -fno-underscoring # Fortran extentions FTN.ext = for # CC compiler CC = gcc # CC compiler flags CC.flags = # Defines CC.define = # CC file extension CC.ext = C # CC bridge compiler flags CC.bridge.flags = # architecture to run on (architecture folder in $JAVA_HOME/include, such as win32, linux, solaris,... CC.java.include = win32 # Bridge defines (FAST | DEBUG | <NONE>); default is no define CC.bridge.define = # Linker LINK = g++ LINK.flags = -mno-cygwin -Wl,--add-stdcall-alias OBJ.ext = o DLL.ext = so # misc options delete.fail = false build_imp.xml<?xml version="1.0" encoding="UTF-8"?> <!-- GENERATED FILE, DO NOT EDIT EDIT ../build.xml INSTEAD --> <project basedir=".." default="all" name="build_impl"> <macrodef name="JC-comp"> <sequential> <javac debug="${javac.debug}" deprecation="${javac.deprecation}" destdir="${build.dir}" srcdir="${src.dir}" verbose="${javac.verbose}"> <classpath> <pathelement location="${omsapi}"/> <fileset dir="${oms.lib.dir}"> <include name="omsapi.jar"/> <include name="units.jar"/> </fileset> <fileset dir="${lib.dir}"> <include name="**/*.jar"/> </fileset> </classpath> </javac> </sequential> </macrodef> <macrodef name="FC-comp"> <sequential> <cc name="${FTN}" objdir="${build.dir}"> <fileset dir="${src.dir}" includes="**/*.${FTN.ext}"/> <compilerarg line="true" value="${FTN.flags}"/> </cc> </sequential> </macrodef> <macrodef name="CC-comp"> <sequential> <cc name="${CC}" objdir="${build.dir}"> <fileset dir="${src.dir}" includes="**/*.${CC.ext}" excludes="**/*_Bridge.C"/> <compilerarg line="true" value="${CC.flags}"/> <defineset define="${CC.define}"/> </cc> </sequential> </macrodef> <macrodef name="CC-bridge"> <sequential> <cc name="${CC}" objdir="${build.dir}"> <fileset dir="${src.dir}" includes="**/*_Bridge.C"/> <compilerarg line="true" value="${CC.bridge.flags}"/> <defineset define="${CC.bridge.define}"/> <includepath location="${java.home}/../include"/> <includepath location="${java.home}/../include/${CC.java.include}"/> <includepath location="${project.home}/conf"/> </cc> </sequential> </macrodef> <macrodef name="LINK-dll"> <sequential> <cc name="${LINK}" outfile="${build.dir}/${project.name}" outtype="shared"> <fileset dir="${build.dir}"> <include name="**/*.o"/> <include name="**/*.obj"/> </fileset> <compilerarg line="true" value="${LINK.flags}"/> <libset if="is-gcc" libs="g2c"/> </cc> </sequential> </macrodef> <!-- Do it all. --> <target depends="build" name="all"/> <!-- Compile target --> <target depends="compile-java, compile-native" name="make"/> <target depends="clean, make" name="build"/> <!-- Init all --> <target name="init"> <!-- Include external property files to allow adaptation 1. in project directory 2. in users home directory --> <property file="conf/build.properties"/> <property file="${user.home}/build.properties"/> <property name="src.dir" value="src"/> <property name="build.dir" value="src"/> <property name="dist.dir" value="dist"/> <property name="doc.dir" value="doc"/> <property name="lib.dir" value="lib"/> <property name="oms.lib.dir" value="${netbeans.home}/modules/ext"/> <fail message="Set the property: 'netbeans.home' to your OMS installation." unless="netbeans.home"/> <taskdef classpath="${oms.lib.dir}/cpptasks.jar" resource="cpptasks.tasks"/> <typedef classpath="${oms.lib.dir}/cpptasks.jar" resource="cpptasks.types"/> <taskdef classpath="${oms.lib.dir}/ant-contrib-1.0b1.jar" resource="net/sf/antcontrib/antlib.xml"/> <propertyregex input="${basedir}" property="project.name" regexp="[.]*(\\|/)([\w]+)$" select="\2"/> <property name="project.home" value="${basedir}"/> <condition property="is-gcc"> <or> <equals arg1="${CC}" arg2="gcc"/> <equals arg1="${CC}" arg2="g++"/> </or> </condition> </target> <!-- Java compile --> <target depends="init" name="compile-java"> <JC-comp/> </target> <!-- Native compile --> <target depends="init" name="compile-native"> <FC-comp/> <CC-bridge/> <LINK-dll/> </target> <!-- clean --> <target depends="init" name="clean"> <delete failonerror="${delete.fail}" includeEmptyDirs="true"> <fileset dir="${build.dir}"> <include name="**/*.${OBJ.ext}"/> <include name="**/*.${DLL.ext}"/> <include name="**/*.class"/> <include name="history.xml"/> <include name="dependencies.xml"/> </fileset> <fileset dir="${dist.dir}" includes="**/*"/> <fileset/> </delete> </target> </project> Typical Compiler Settings in build.propertiesGCC/G77 on CygwinFTN = g77 FTN.flags = -Wimplicit -fno-automatic -fcase-preserve -fno-underscoring FTN.ext = for CC = gcc CC.bridge.flags = CC.java.include = win32 CC.bridge.define = LINK = g++ LINK.flags = -mno-cygwin -Wl,--add-stdcall-alias OBJ.ext = o DLL.ext = so |
Navigation Bar for Object Modeling System
Resources:
Downloads You must login to see this link. Register now, if you have no user account yet. OMS API Javadoc Publications & Presentations Annotation Reference DSL Reference Handbook 3.0 (Draft) Frequently Asked Questions (FAQ) OMS License (LGPL 2.1) New Users: 1. Get an ALM account 2. Join the OMS project Contact Us: Jack Carlson Coordinator, OMS Laboratory OMS Laboratory Jack.Carlson@colostate.edu (970) 492-7323 Olaf David Director, OMS Laboratory odavid (at) colostate.edu (970) 491-8026 |