To LUGNET HomepageTo LUGNET News HomepageTo LUGNET Guide Homepage
 Help on Searching
 
Post new message to lugnet.robotics.rcx.legosOpen lugnet.robotics.rcx.legos in your NNTP NewsreaderTo LUGNET News Traffic PageSign In (Members)
 Robotics / RCX / legOS / 2891
2890  |  2892
Subject: 
Re: legOS library path
Newsgroups: 
lugnet.robotics.rcx.legos
Date: 
Tue, 8 Oct 2002 12:59:54 GMT
Viewed: 
2413 times
  
In lugnet.robotics.rcx.legos, Joseph Woolley writes:
"exit" each directory.  The Makefile in demo (and now your mycode folder) is
setup to run this way.  It is possible to modify the Makefile so you can run
it from within the mycode folder, but I can't currently tell you how.  8-)

To make it so that your code can live anywhere (i.e., not necessarily
beneath the cygwin and/or BrickOS root directory you should make the
following changes to your Makefile.

1. replace any relative paths (i.e., ../ or ../../ etc.) with
$(BRICKOS_ROOT) (be sure to replace the trailing slash as well).  For example:

# name for the brickOS kernel
KERNEL=../boot/brickOS

becomes

# name for the brickOS kernel
KERNEL=$(BRICKOS_ROOT)boot/brickOS

and

include ../Makefile.common
include ../Makefile.user

becomes

include $(BRICKOS_ROOT)Makefile.common
include $(BRICKOS_ROOT)Makefile.user

There are other relative paths in some of the demo makefiles so find all the
ones which are refering to system libraries and system include paths and
replace them as described above.  You should be able to leave the makefiles
in the BrickOS root unmodified.

2. Make sure that BRICKOS_ROOT is correctly set as an environment variable.
The code in Makefile.common fails to work (at least it fails in Win32) when
you are running make from a directory other than the actual BrickOS root.
My preference for Win32 is to just set it as a permanent environment
variable via the control panel/system applet.  For a cygwin setup where the
actual path is

c:\cygwin\brickos-0.2.6.07.nmChg

you should set it to

/brickos-0.2.6.07.nmChg/

3. If you are running Win32 then make sure the cygwin/bin directory is in
your path as well as the compiler bin directory (if it is different). In my
case it is:

set path=c:\cygwin\bin;c:\cygwin\h8300-000821\H-i686-cygwin32\bin;%path%

Now you should be able to compile via make (without entering the cygwin
shell for Win32 users) from anywhere on your machine - or, at least, I can
with this setup.

Hope this helps,

John Hansen
http://members.aol.com/johnbinder/bricxcc.htm



Message is in Reply To:
  Re: legOS library path
 
"Germán Rojas" <ge-rojas@uniandes.edu.co> wrote in message news:H3Mp27.CBz@lugnet.com... (...) <snip> (...) <snip> You should add 'mycode' to the list of directories found in Makefile, just after demo. Then always run make from the legOS root (...) (22 years ago, 7-Oct-02, to lugnet.robotics.rcx.legos)

7 Messages in This Thread:



Entire Thread on One Page:
Nested:  All | Brief | Compact | Dots
Linear:  All | Brief | Compact
    

Custom Search

©2005 LUGNET. All rights reserved. - hosted by steinbruch.info GbR