%% Oh Emacs, this is a -*- Makefile -*-, so give me tabs. \documentclass{article} \usepackage{axiom} \title{\$SPAD/src/lib Makefile} \author{Timothy Daly \and Gabriel Dos~Reis} \begin{document} \maketitle \begin{abstract} This Makefile builds the \Tool{Axiom} C runtime system. This runtime support consists of three main compoments: core, terminal I/O, and graphics. \end{abstract} \eject \tableofcontents \eject \section{Components} \subsection{Core runtime} The core C runtime system is required on all hosts. It is composed of \begin{itemize} \item \verb!iint bsdSignal()! \item \verb!int addtopath(const char*)! \item \verb!int directoryp(const char*)! \item \verb!int make_path_from_file(const char*, const char*)! \item \verb!int writeablep(const char*)! \item \verb!int readablep(const char*)! \item \verb!int findString(const char*, const char*)! \item \verb!int copyEnvValue(const char*, char*)! \end{itemize} Those functions are implemented in \File{cfuns-c.c} and \File{sockio-c.c}. For the most part, they depend on [[]], [[]], and [[]] <>= core_sources = bsdsignal.c cfuns-c.c sockio-c.c @ \subsection{Terminal I/O} This component provides all the routines necessary to build the \Tool{Superman} component. <>= terminal_io_sources = cursor.c edin.c fnct_key.c openpty.c prt.c wct.c @ \subsection{Graphics} HyperDoc and any other graphics capability. <>= graphics_sources = \ halloc.c \ hash.c \ pixmap.c \ spadcolors.c \ util.c \ XDither.c \ XShade.c \ XSpadFill.c @ ??? document each of those files.??? \section{environment} The \Tool{Autoconf}-subst'd variable [[axiom_c_runtime]] is computed at configure time, based on the characteristics of the host environment. It is a list of the main components. It also contain [[core]] <>= libspad_la_sources = $(foreach comp, \ $(addsuffix _sources, @axiom_c_runtime@), \ $($(comp))) libspad_la_SOURCES = $(addsuffix .pamphlet,$(libspad_la_sources)) other_sources = cfuns-c.c other_SOURCES = $(addsuffix .pamphlet,$(other_sources)) unused_sources = emupty.c libspad_la_objects = $(libspad_la_sources:.c=.lo) other_objects = $(other_sources:.c=.$(OBJEXT)) pamphlets = Makefile.pamphlet $(libspad_la_SOURCES) $(other_SOURCES) @ \section{Files} \subsection{C from pamphlet} <>= .PRECIOUS: %.c %.c: $(srcdir)/%.c.pamphlet $(axiom_build_document) --tangle --output=$@ $< @ \subsection{object from C} <>= .PRECIOUS: %.$(OBJEXT) %.lo %.lo: %.c $(axiom_c_macros_h) $(COMPILE) -o $@ $(CCF) $(axiom_includes) $(AXIOM_X11_CFLAGS) $< @ \subsection{cfuns-c.c \cite{2}} The cfuns-c file contains socket primitives used by Axiom. They must be linked into and visible from the inferior lisp. In GCL this link happens thru setting a shell variable called {\bf EXTRAS} in the {\bf h/386-linux.defs} file. This file gets included as part of the final system build of GCL. \subsection{hash.c \cite{6}} This a a string-based hash table that is used both in the graph and hyper functions. It is included here because we need it built earlier so the graph and hyper routines can refer to it. \subsection{sockio-c.c \cite{10}} The sockio-c file contains socket primitives used by Axiom. They must be linked into and visible from the inferior lisp. In GCL this link happens thru setting a shell variable called {\bf EXTRAS} in the {\bf h/386-linux.defs} file. This file gets included as part of the final system build of GCL. \section{The cleanup stanza} <>= # This is a support library, so it does not change often and # we don't need to remove the produced objects in mostlyclean. # The remoal is done by clean. mostlyclean-local: @rm -f *.lo *.$(OBJEXT) clean-local: mostlyclean-local @$(LIBTOOL) --mode=clean $(axiom_target_libdir)/libspad.la @rm -f $(other_objects) @rm -f $(libspad_la_sources) $(other_sources) @rm -fr .libs _libs @rm -f stamp distclean-local: clean-local @ <<*>>= <> subdir = src/lib/ .PHONY: all all-lib .SUFFIXES: .SUFFIXES: .o .lo .obj .c .h all: all-ax all-ax all-lib: stamp stamp: $(axiom_target_libdir)/libspad.la rm -f stamp $(STAMP) stamp $(axiom_target_libdir)/libspad.la: $(libspad_la_objects) $(mkinstalldirs) $(axiom_target_libdir) $(LIBTOOL) --mode=link $(CC) -o $@ $(libspad_la_objects) \ -rpath $(libdir)/axiom/target/$(target)/lib <> <> <> @ \eject \begin{thebibliography}{99} \bibitem{1} {\$SPAD/src/lib/bsdssignal.c.pamphlet} \bibitem{2} {\$SPAD/src/lib/cfuns-c.c.pamphlet} \bibitem{3} {\$SPAD/src/lib/cursor.c.pamphlet} \bibitem{4} {\$SPAD/src/lib/edin.c.pamphlet} \bibitem{5} {\$SPAD/src/lib/fnct\_key.c.pamphlet} \bibitem{6} {\$SPAD/src/lib/halloc.c.pamphlet} \bibitem{7} {\$SPAD/src/lib/openpty.c.pamphlet} \bibitem{8} {\$SPAD/src/lib/pixmap.c.pamphlet} \bibitem{9} {\$SPAD/src/lib/prt.c.pamphlet} \bibitem{10} {\$SPAD/src/lib/sockio-c.c.pamphlet} \bibitem{11} {\$SPAD/src/lib/spadcolors.c.pamphlet} \bibitem{12} {\$SPAD/src/lib/util.c.pamphlet} \bibitem{13} {\$SPAD/src/lib/wct.c.pamphlet} \bibitem{14} {\$SPAD/src/lib/XDither.c.pamphlet} \bibitem{15} {\$SPAD/src/lib/XShade.c.pamphlet} \bibitem{16} {\$SPAD/src/lib/XSpadFill.c.pamphlet} \end{thebibliography} \end{document}