aboutsummaryrefslogtreecommitdiff
path: root/src/lib/Makefile.pamphlet
diff options
context:
space:
mode:
authordos-reis <gdr@axiomatics.org>2007-08-14 05:14:52 +0000
committerdos-reis <gdr@axiomatics.org>2007-08-14 05:14:52 +0000
commitab8cc85adde879fb963c94d15675783f2cf4b183 (patch)
treec202482327f474583b750b2c45dedfc4e4312b1d /src/lib/Makefile.pamphlet
downloadopen-axiom-ab8cc85adde879fb963c94d15675783f2cf4b183.tar.gz
Initial population.
Diffstat (limited to 'src/lib/Makefile.pamphlet')
-rw-r--r--src/lib/Makefile.pamphlet212
1 files changed, 212 insertions, 0 deletions
diff --git a/src/lib/Makefile.pamphlet b/src/lib/Makefile.pamphlet
new file mode 100644
index 00000000..3f2f37ac
--- /dev/null
+++ b/src/lib/Makefile.pamphlet
@@ -0,0 +1,212 @@
+%% 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 [[<unistd.h>]], [[<sys/stat.h>]], and
+[[<sys/socket.h>]]
+
+<<environment>>=
+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.
+
+<<environment>>=
+terminal_io_sources = cursor.c edin.c fnct_key.c openpty.c prt.c wct.c
+@
+
+
+\subsection{Graphics}
+
+HyperDoc and any other graphics capability.
+
+<<environment>>=
+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]]
+
+<<environment>>=
+
+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}
+<<C from pamphlet>>=
+.PRECIOUS: %.c
+
+%.c: $(srcdir)/%.c.pamphlet
+ $(axiom_build_document) --tangle --output=$@ $<
+@
+
+\subsection{object from C}
+<<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}
+<<cleanup>>=
+# 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
+@
+
+<<*>>=
+<<environment>>
+
+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
+
+.PHONY: mk-target-libdir
+mk-target-libdir:
+ [ -d $(axiom_target_libdir) ] \
+ || $(mkinstalldirs) $(axiom_target_libdir)
+
+
+$(axiom_target_libdir)/libspad.la: $(libspad_la_objects) mk-target-libdir
+ $(LIBTOOL) --mode=link $(CC) -o $@ $(libspad_la_objects) \
+ -rpath $(libdir)/axiom/target/$(target)/lib
+
+<<C from pamphlet>>
+
+<<object from C>>
+
+<<cleanup>>
+@
+
+\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}