> Here is my reinvention of the wheel. It is a script that will compile
> any source code from the Xforms library. ...
And here's the wheel in the form of an Imakefile:
SRCS = try_main.c try_cb.c try.c
OBJS = $(SRCS:.c=.o)
SYS_LIBRARIES = -lforms $(XLIB)
EXTRA_LIBRARIES = -lm
ComplexProgramTarget(try)
Type
xmkmf -a
or, if you're on a brain dead system where `xmkmf' doesn't accept the
`-a' argument, type
xmkmf
make depend
to create your Makefile, and then type
make
and your program will attempt to compile and link. `xmkmf' invokes
the `imake' program with the proper parameters.
Imakefiles, while they're a bit cryptic and difficult to understand
when you start out, are magnificent tools for developing portable X
(and other) programs.
`imake' knows where your X include files and X libraries live, so you
don't have to worry (as much) about going between platforms. I have
Imakefiles which work without a hitch on X11R5 and X11R6 and on Suns,
SGIs, and HP systems.
There is a very well written and useful reference written by Paul
DuBois called _Software Portability with imake_ (ISBN 1-56592-055-4).
It is published by O'Reilly and Associates, Inc.
> ... If it does not compile right
> then there are bugs. If there are no buggs then it will compile right.
Actually, if it doesn't compile right there are *syntax errors*.
Programs which are syntactically correct have been known to still
contain a bug or two. :-)
spl
_________________________________________________
To unsubscribe, send the message "unsubscribe" to
xforms-request@bob.usuf2.usuhs.mil or see
http://bob.usuf2.usuhs.mil/mailserv/xforms.html
Xforms Home Page: http://bragg.phys.uwm.edu/xforms
List Archive: http://bob.usuf2.usuhs.mil/mailserv/list-archives/