view main/jrules/ubuntu.unix.inc @ 266:3aeab6193316 main

New external code library for the PixyCam
author Bob Cook <bob@bobcookdev.com>
date Sun, 01 May 2016 14:13:52 -0700
parents d38a53727c56
children
line wrap: on
line source

# -----------------------------------------------------------------------------------------
#
#   jrules/ubuntu.unix.inc
#
#   Bob Cook Development, Robotics Library
#   http://www.bobcookdev.com/rl/
#    
#   Implements the jamrules actions for projects to run on Ubuntu/i686 platforms; could
#   work on any desktop Linux distribution.
#
#   Copyright (c) 2010 Bob Cook
#   
#   Permission is hereby granted, free of charge, to any person obtaining a copy
#   of this software and associated documentation files (the "Software"), to deal
#   in the Software without restriction, including without limitation the rights
#   to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
#   copies of the Software, and to permit persons to whom the Software is
#   furnished to do so, subject to the following conditions:
#   
#   The above copyright notice and this permission notice shall be included in
#   all copies or substantial portions of the Software.
#   
#   THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
#   IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
#   FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
#   AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
#   LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
#   OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
#   THE SOFTWARE.
#
# -----------------------------------------------------------------------------------------

if $(TRACE) { echo "trace /jrules/ubuntu.unix.inc" ; }

# -----------------------------------------------------------------------------------------

UBUNTU_TOOLS_GCC       = gcc ;
UBUNTU_TOOLS_GPLUSPLUS = g++ ;

UBUNTU_POCO_INC = "/home/bob/software/poco/deploy/ubuntu/usr/local/include" ;
UBUNTU_POCO_LIBDIR = "/home/bob/software/poco/deploy/ubuntu/usr/local/lib" ;

UBUNTU_FLTK_INC = "/home/bob/software/fltk/deploy/usr/include" ;
UBUNTU_FLTK_LIBDIR = "/home/bob/software/fltk/deploy/usr/lib" ;

UBUNTU_LIBUSB_INC = "/usr/include/libusb-1.0" ;

UBUNTU_STD_LIBDIR = "/usr/lib" ;

UBUNTU_SYSINCDIR = $(UBUNTU_POCO_INC) $(UBUNTU_FLTK_INC) $(UBUNTU_LIBUSB_INC) ;
UBUNTU_SYSLIBDIR = $(UBUNTU_POCO_LIBDIR) $(UBUNTU_FLTK_LIBDIR) $(UBUNTU_STD_LIBDIR) ;

# -----------------------------------------------------------------------------------------

actions ubuntu_as
{
    echo $(2) [$(1)]
    $(UBUNTU_TOOLS_GCC) -c -o $(1) -I$(UBUNTU_INCDIR) $(2)
}

# -----------------------------------------------------------------------------------------

actions ubuntu_cc
{
    echo $(2) [$(1)]
    $(UBUNTU_TOOLS_GCC) -Wall $(UBUNTU_OPTIM) -c -o $(1) -I$(UBUNTU_INCDIR) $(2)
}

# -----------------------------------------------------------------------------------------

actions ubuntu_c++
{
    echo $(2) [$(1)]
    $(UBUNTU_TOOLS_GPLUSPLUS) -Wall $(UBUNTU_OPTIM) -c -o $(1) -I$(UBUNTU_SYSINCDIR) -I$(UBUNTU_INCDIR) $(2)
}

# -----------------------------------------------------------------------------------------

actions ubuntu_link
{
    echo $(1)
    $(UBUNTU_TOOLS_GPLUSPLUS) -o $(1) $(2) -L$(UBUNTU_SYSLIBDIR) -L$(UBUNTU_LIBDIR) -l$(UBUNTU_LIBS) -Wl,-Map,$(UBUNTU_LINKMAP)
}

# -----------------------------------------------------------------------------------------