This is the mail archive of the java@gcc.gnu.org mailing list for the Java project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: Getting started with GCJ


> On Tuesday, November 6, 2001, at 01:00 AM, Michael J McGonagle wrote:
> Basically, I was hoping that someone could direct me to a page or site
> that explains going about getting up and running with gcj. I am running
> Mandrake 8.0, and it comes with gcj version 2.96 (isn't that the version
> number of gcc?).

I've just been thru this with some (partial) success. First step is to 
install the latest release (CVS) in /usr/local so that its available as an 
ALTERNATIVE to your trusted compiler. Write your Makefiles to use the 
version you'll install into /usr/local/bin. Installation/compiling is 
straightforward but compute intensive.  Just follow the instructions, 
especially the part that says to use separate build and source directories.

Then the following Makefile should get you started

BIN= \
     MyClass.o \
	... snip ...

CP=classes:... snip ...:rt.jar

.SUFFIXES:
.SUFFIXES: .java .o

%.o: %.java
   @echo Compiling $<
   @/usr/local/bin/gcj -c -O2 -o $@ -I/myjar.jar $<

all: $(BIN)

ctags:
   ctags -R .


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]