4 Replies Latest reply on Oct 14, 2014 10:57 AM by Intel_Alvarado

    Makefile - Detect I am running on Edison

    KurtE

      Now that I have a few things running using the Arduino IDE, I would like to now try developing directly on the Edison using PuTTY and winscp.

       

      I have a few projects, that I have running on a few other linux boxes (RPI, BeagleBone Black, ODroid U3 and a little bit on a NUC running Ubuntu), that I would like to try migrating over the the Edison.

       

      One of the first issues I ran into is my makefiles are setup to detect which OS they are running on to do things like find where the tools are.  Currently for all of these other boxes I use the environment variable

      $OSTYPE to detect which platform I am on. Example from one of my makefiles:

      #~~~~~~~~~~~~~~~~~~~~ Toolchain Prefix ~~~~~~~~~~~~~~~~~~~~

      ifeq ($(OSTYPE),linux-gnueabi)

      #BBBk

      TCHAIN_PREFIX=arm-angstrom-linux-gnueabi-

      else

      #RPI

      TCHAIN_PREFIX=arm-linux-gnueabihf-

      endif

       

      #TCHAIN_PREFIX=x86_64-linux-gnu-

       

      Question so far I have not found any settings for this on the Edison.  Suggestions?

       

      Also is there any thread or document that describes which init files can be used to set things, like: /etc/profile ~/.profile   ???

       

      I tried creating a file /home/root/.profile that was an extract off of same file for BBBk which tries to detect if the directory $HOME/bin exists and add it to the path, but the script fails with access denied

       

      Thanks