Wednesday, February 18, 2009

Goal 0 Completed

Project reference:

Goal 0 was completed on Monday - I successfully linked libjs_static.a with the a custom written program. Earlier, what I was doing was trying to build libjs_static.a from scratch all over again, since I thought that was the basic purpose of the makefile. Incidentally, the above mentioned library is not that easy to build(so I realised, the hard way), and I figured that as my first makefile, I wouldn't have been allotted such a difficult task to complete on my own! Putting two and two together and finally making four, I developed a new makefile to link my program with libjs_static.a, and in turn would be built using the default tools already provided with the source tree.

My project directory will be /js/src/build-debug/lirc. The makefile and custom program reside there itself. The makefile used is:
#First makefile!
CPPFLAGS=-DDEBUG -g3 -include ../mozilla-config.h -I../../nanojit -I ../dist/include/js -I../
all: jittest
jittest: jittest.cpp ../libjs_static.a
$(CC) $(CPPFLAGS) -o $@ $^
rm *.o
rm jittest
TODO: embed VPATH in makefile itself.

Now, task 0 completed, I have to build a parser for raw LIR instructions, and call the corresponding jit methods to convert the instruction into machine code. More on that later.

No comments:

Post a Comment