This is the mail archive of the
java@gcc.gnu.org
mailing list for the Java project.
Re: Getting started with GCJ
- To: Michael J McGonagle <fndsnd at earthlink dot net>
- Subject: Re: Getting started with GCJ
- From: Brad Cox <bcox at virtualschool dot edu>
- Date: Wed, 7 Nov 2001 08:26:46 -0500
- Cc: java at gcc dot gnu dot org
> 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 .