Ion compilation under Cygwin environment. Simple!

Ion is a smallish X window manager. that takes a slightly different approach to window management; it divides your screen into frames which do not overlap in an effort to keep the cascading clutter to a minimum. Cygwin is a rather complete unix abstraction layer for Windows, and is wrapped with many ported utilities to make a rather complete UNIXish system; all the way down to XFree and zsh. Yum.

Being unhappy with the window managers offered for downlload with native Cygwin, I decided to give both Ion a shot, and check to see how much work might be required to port it to Cygwin, if any. It was a breeze!

It proved to be trivial, at most. Cygwin, being dynamic by nature, has no libdl, but the stubs and such are complete. That, and the fact that executables are saved with a .exe extension slightly confused the UNIX-minded makefiles, but not to worry.

Below is my diff to ion’s ‘system.mak’:
—- ../ion-20020207/system.mk2002-01-19 15:15:13.000000000 -0800
+++ system.mk2003-04-08 06:01:40.000000000 -0700
@ -7,7 +7,7 @ ## Installation paths ##

-PREFIX=/usr/local
+PREFIX=/usr/local/ion

# No need to modify these usually BINDIR=$(PREFIX)/bin @ -24,7 +24,7 @ ## #MODULE_SUPPORT=-DCF_NO_MODULE_SUPPORT -MODULE_SUPPORT_LDFLAGS=-export-dynamic -ldl +MODULE_SUPPORT_LDFLAGS=-export-dynamic ## @ -52,7 +52,7 @ # asprintf and vasprintf in the c library. (gnu libc has.) # If HAS_SYSTEM_ASPRINTF is not defined, an implementation # in libtu/sprintf_2.2/ is used. -#HAS_SYSTEM_ASPRINTF=1 +HAS_SYSTEM_ASPRINTF=1 ## @ -121,4 +121,7 @ BIN_MODE=755 DATA_MODE=664

-STRIP=strip
+# I’m too lazy to edit the Makefiles to pre-suppose MS-type file extensions.
+# for a simple strip operation. Return true. Feel free to strip the binary
+# yourself, if you are so inclined.
+STRIP=true

This diff should be applied in the root directory of Ion’s source; also note that for my testing, I changed the default installation directory to /usr/local/ion – feel free to change that at whim, but I have not been abole to thoroughly test ion – and don’t want to just install extra applications and such under my base cygwin heirarchy.

Note the very last few comments above – the ion binary will not be stripped; I don’t want it stipped so I can attach GDB if it goes wonky on me. If you trust it, just execute ‘strip ion.exe’ in the directory that Ion is installed to.