Using GCC directly

Search for "arduino makefile" and you'll find some threads to get you going.

-br