Click here to Skip to main content
Click here to Skip to main content
Add your own
alternative version
Go to top

Tool for Converting VC++2005 Project to Linux Makefile

, 13 Jul 2012
Convert .sln/.vcproj (VC++2005) to Linux makefile
sln2mak.zip
sln2mak
sln2mak
Properties
sln2mak.csproj.user
sln2mak_bin.zip
sln2mak.exe
using System;
using System.Collections.Generic;
using System.Text;
using Microsoft.VisualStudio.VCProjectEngine;

namespace sln2mak
{
    class VcTargetType
    {
        #region Members
        /****************************************************************/
        private bool    exeflag ;
        private bool    dllflag ;
        private bool    libflag ;
        private string  confName;
        /****************************************************************/
        #endregion /* Members */

        #region LifeCycle
        /****************************************************************/
        public VcTargetType (VCConfiguration config)
        {
            exeflag = false ;
            dllflag = false ;
            libflag = false ;

            confName = config.ConfigurationName;
            iSetTargetFlags(config.ConfigurationType);
        }
        /****************************************************************/
        #endregion /* LifeCycle */

        #region Private Operations
        /****************************************************************/
        /// <summary>
        /// Set true to flag that responses target type
        /// </summary>
        /// <param name="configType"></param>
        private void iSetTargetFlags(ConfigurationTypes configType)
        {
            switch (configType)//dynamiclib or staticlib and etc.
            {
                case (ConfigurationTypes.typeApplication):
                    exeflag = true;
                    dllflag = false;
                    libflag = false;
                    break;
                case (ConfigurationTypes.typeDynamicLibrary):
                    exeflag = false;
                    dllflag = true;
                    libflag = false;
                    break;
                case (ConfigurationTypes.typeStaticLibrary):
                    exeflag = false;
                    dllflag = false;
                    libflag = true;
                    break;
                case (ConfigurationTypes.typeGeneric):
                    //TODO: check what is typeGeneric
                    exeflag = false;
                    dllflag = false;
                    libflag = false;
                    break;
                default://ConfigurationTypes.typeUnknown
                    //TODO: throw exception or exit with error
                    exeflag = false;
                    dllflag = false;
                    libflag = false;
                    break;
            }
        }

        /****************************************************************/
        #endregion /* Private Operations */

        #region Access Region
        /****************************************************************/
        public bool ExeFlag
        { 
            get { return exeflag; } 
        }
        public bool DllFlag
        {
            get { return dllflag; }
        }
        public bool LibFlag
        {
            get { return libflag; }
        }
        public string ConfigName 
        {
            get { return confName; } 
        }
        /****************************************************************/
        #endregion /* Access Region */
    }
}

By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

Share

About the Author

Maria Adamsky
Software Developer EFC Real Solutions on Time,LTD
Israel Israel
Software developer at EFC Real Solutions on Time,LTD(Israel) in infrastructure team.
Developing Grid computing application for data communication simulations.
Writing Cross-Platform Software (Windows and Linux).

| Advertise | Privacy | Mobile
Web02 | 2.8.140916.1 | Last Updated 13 Jul 2012
Article Copyright 2008 by Maria Adamsky
Everything else Copyright © CodeProject, 1999-2014
Terms of Service
Layout: fixed | fluid