module swap PrgEnv-cray/5.2.82 PrgEnv-gnu
or
module swap PrgEnv-cray/5.2.82 PrgEnv-intel
git clone http://github.com/hannorein/rebound
cd rebound/examples/openmp
sed -i 's,^\(export OPENGL=\).*,\1'0',' Makefile
$(CC) -shared $(OPT) -I../../src $(PREDEF) problem.c -L<full_path_to_rebound_src_dir>/librebound.so -o rebound
make