Here's some instructions I typed up on how to compile stuff:
1. Download the zgcc image from the pdaXrom dowloads page (distro.ibiblio.org/pub/linux/distributions/pdaxrom/download/VERSION/C7x0-c860/zgcc-3.4.x.img) and put it somewhere that your Z can access (SD, CF, or NAND).
2. Make the directorys /opt/native/arm/3.4.x-xscale-softvfp (mkdir -p /opt/native/arm/3.4.x-xscale-softvfp) where x is the number in the zgcc image name.
3. Mount the image (mount -o loop /path/to/zgcc-3.4.x.img /opt/native/arm/3.4.x-xscale-softvfp). If you are using r121 or above, you need to add the "-t squashfs" option after "-o loop," but I get the impression you're using beta 1 or 3.
4. Install pcre and libiconv. If you already have them installed, reinstall them. It will probably complain about having them missing.
5. See if GCC is found. Type GCC in the terminal. If it says "gcc: no input files," it's working.
6. Download some source code to compile (usually a .tar.gz or .tar.bz2 extention, but sometimes .zip). Make sure to decompress it to a Linux filesystem (ext2 or ext3). Look in the source folder for a file called "configure" or "autogen.sh." If either of them exists, you're good to go. If only a Makefile exists, it should work, but I have had some issue.
6. cd to the source directory (cd /path/to/source-x.x.x)
7. If there is no "configure" file, but there is an "autogen.sh" file, do a "./autogen.sh," which should create a "configure file" go to step 9.
8. If there is no configure or autogen.sh file, look for a file called "Makefile." If that exists, go to step 10.
9. Configue the build. Type "CFLAGS=" -O2 -mtune=xscale -mcpu=xscale" CXXFLAGS="-O2 -mtune=xscale -mcpu=xscale" ./conigure --prefix=/usr --help" That will bring up a list of options that you can use to configurewhat will be built into the app. The FLAGS before executing configure turn on optimizations. The --prefix=/usr means that stuff will go in /usr instead of /usr/local, which can be helpful for libs and just makes things easier. Redo the configure without --help and with the options you want.
10. Type 'make' to build the app. Wait a long time. If it crashes, look at the top of the error messages...It'll probably say missing something, in which case you need to install/build and install a lib.
11. Install the app. Do a "grep DESTDIR Makefile." if that returns anything, you're good. If it is a gnu app and doesn't return anything, your still good. Other stuff, be wary. That means (to me at least) that you'll have to dig through your /usr dir for all of the files it installed. I will assume that you can use this option.
Do a "make DESTDIR=/a/temp/place/to/install/it/Data/ install". This installs the app with /a/temp/... as the root so you can package it up. You'll see why data is there later.
12. Go to .../Data/usr and go into lib and bin, in each doing a "strip *" which will make the package smaller. You can remove docs and man pages if you so desire. I keed the include directory because it doesn't take up a lot of space and is helpful for compiling some apps in the future.
13. Go back to the .../Data directory and do a "tar -czf ../data.tar.gz ./*", which puts everything from the package into a file called data.tar.gz in the next folder up. Go to that dir (cd ../) and make another folder called Control. Go into it (cd Control) and make a file called control (<favorite editor> control). Make the file in this format:
Package: <packagename>
Version: <version>
Architecture: armv5tel
Maintainer: <yournamehere>
Description: <description>
Save it, then do a "tar -czf ../control.tar.gz ./*". go into the previous direcotry (cd ../) and make another file called debian-binary (<editor> debian-binary). Type "2.0" no quotes on the first line and save it. You are now ready to make a package.
14. Make the package. Do a "tar -czf packagename_version_armv5tel.ipk ./data.tar.gz ./control.tar.gz ./debian-binary" and you have an installable ipk. Note that the package name and version must match the ones in the control file or else it won't uninstall correctly (it will install fine, though) (I think).
Note that you should have swap when compiling to avoid running out of RAM.
Hope that helps.