> Is it possible to keep them in my personal directory (the one
> which contains my C files) and compile the whole thing there.
Yes. No problem.
> If yes, could you please tell me *exactly* how I should compile
> (parameters of cc) those C files, or tell me the content of
> my makefile.
I suggest that you create `bin', `man', `lib' and `include'
directories at the top level of your home directory so that you can
reference them with
$HOME/bin, $HOME/man, $HOME/lib, and $HOME/include
respectively -- there's no particular requirement to do so but it
is neater that way. Note: you'll need to create $HOME/man/man1 and
$HOME/man/man3 subdirectories, as well.
Then edit `mkconfig.h' appropriately. For example, change
[...]
# where the library and executables should be installed
LIB_TOPDIR=/usr
BIN_DIR=/usr/local/bin
[...]
to
[...]
# where the library and executables should be installed
LIB_TOPDIR=$(HOME)
BIN_DIR=$(HOME)/bin
[...]
Note the parentheses around HOME -- this makes `make' happy.
Now install the package with
make install
You should now have the binaries, the library, the includes, and the
manual pages installed.
To compile an object module, you'll want to do
cc -c whatever.c -I$(HOME)/include ... other options ...
and to link do
cc -o whatever whatever.o ... -L$(HOME)/lib -lforms -lX11 ...
That should do it.
If you use dynamically loaded libraries (the .so libraries), you will
most likely need to also set an environment variable
setenv LD_LIBRARY_PATH $HOME/lib
at run time. You should refer to the shared object loader manual
page, usually
man ld.so
for information.
To read the manual pages with `man' you will want to set an
environment variable, also:
setenv MANPATH $HOME/man
Otherwise, `man' won't be able to find the manual pages.
Bear in mind that I'm doing this off the top of my head and one or
another of these steps may need a bit of refinement or correction,
especially if you're on a different system than a Sun or SGI, since
these are the ones with which I have the most experience. The best
advise I can give is read the manual pages for `make', `cc' (or `gcc'
if that's what you're using), `man', and `ld.so'.
spl
_________________________________________________
To unsubscribe, send the message "unsubscribe" to
xforms-request@bob.usuhs.mil or see
http://bob.usuhs.mil/mailserv/xforms.html
XForms Home Page: http://bragg.phys.uwm.edu/xforms
List Archive: http://bob.usuhs.mil/mailserv/list-archives/