What is the best way to compile nodejs on an arm board (cubieboard or raspberry pi)?

After reading all kind of stuff (mostly out of date) I'm now lost on which is the best way to have nodejs running on raspberry pi or on cubieboard?

I tried the following on both boards, and it works (since node.js 0.8.10).

sudo apt-get install build-essential libssl-dev
export NODE_VER=0.8.16
cd ~
curl http://nodejs.org/dist/v$NODE_VER/node-v$NODE_VER.tar.gz | tar xz
cd node-v$NODE_VER
./configure --shared-openssl --without-snapshot
time make CFLAGS+=-O2 CXXFLAGS+=-O2
sudo make install

But, since I'm completely noob when it comes to hardware related compilation, I don't even know if I'm right!

So my question(s) is(are) the following:

  • is this procedure seems ok? no hidden problems?
  • what shared-openssl and without-snapshot mean? (functionally speaking)
  • what the **** these CFLAGS and CXXFLAGS are?

UPDATE

Thanks to the comments of you dear fellows, I dug into code. So it seems that shared-openssl stands for :

Link to a shared OpenSSl DLL instead of static linking (here)

And without-snapshot stands for:

Build without snapshotting V8 libraries. You might want to set this for cross-compiling. [Default: False](here)

But I do not cross compile, so it seems useless, isn't it?

Then I tried to have a look for the CFLAGS and CXXFLAGS default values, but I found nothing relevant. Any idea?

Regards