Skip to content

Commit

Permalink
Initial commit at Tue Apr 25 08:41:48 EDT 2017 by tim on stravinsky
Browse files Browse the repository at this point in the history
  • Loading branch information
RTimothyEdwards committed Apr 25, 2017
0 parents commit 231a299
Show file tree
Hide file tree
Showing 1,249 changed files with 482,203 additions and 0 deletions.
10 changes: 10 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
*.*%
*.cdslck
.inca.db.*
inca.*.pak
*.swp
*~
*/av_extracted*/
.nfs*
*.cd-
*/mommdl/
72 changes: 72 additions & 0 deletions INSTALL
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
Autoconf Capsule Summary:
----------------------------------------

Compile and install:

./configure [options]
make
make install

Autoconf options (use "./configure --help" for a complete list):

--prefix=DIR Indicates the install directory. Determines the
install directory of the executable. Determines the
install directory of the libraries (${prefix}/lib)
unless use of "--libdir=DIR" overrides it. Defaults
to /usr/local/.

--libdir=DIR By default, ${prefix}/lib/. Otherwise, run-time
files used by magic are installed here, and
${CAD_ROOT} is set to DIR. In some distributions,
this is set to /usr/share/.

--with-interpreter=ARG
Enable one of the two interpreters. ARG may be
one of "tcl" or "scheme".

--with-tcl Equivalent to "--with-interpreter=tcl".
Normally enabled, if available.

--with-opengl Enable OpenGL as a graphics option. Normally
enabled, if available.

--without-x Disable X11 as a graphics option. Normally
enabled.

--disable-nonmanhattan
Disable non-Manhattan extensions. Normally
enabled.

--disable-readline
Disable the GNU "readline" package. Normally
enabled.

--disable-threads
Disable threaded X11 and OpenGL graphics.
Normally enabled.

Notes to Magic maintainers:
--------------------------

This directory contains all the sources for the Magic system and related
programs. The system runs on a number of machines. You should read the
Magic Maintainer's manual as well as the introduction to Magic before
compiling the system. These documents are in the "doc" subdirectory in
PostScript, as well as the original LaTeX source.

The "proper" way to profile the amount of CPU time spent in each procedure
is to edit "defs.mak" and add flag "-pg" to CFLAGS. Then recompile, install,
and run. Note that this doesn't work with the Tcl version; you have to
compile the standalone version. After running, magic creates a file "gmon.out".
To view the contents, run "gprof /usr/local/bin/magic > gprof.out" (the output
can be very long).

Memory tracing in Tcl requires that Tcl and Tk be compiled with the
TCL_MEM_DEBUG option. Magic also must be compiled with TCL_MEM_DEBUG,
which can be done by adding the definition -DTCL_MEM_DEBUG to DFLAGS
in defs.mak, after running "configure".

Magic is normally compiled without the optimization flag. This is handled
by explicitly setting CFLAGS as an environment variable in the top-level
"configure" script prior to calling scripts/configure. The top-level
configure script needs to be modified to enable compile-time optimization.
129 changes: 129 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,129 @@
#
# rcsid $Header: /usr/cvsroot/magic-8.0/Makefile,v 1.1.1.1 2008/02/03 20:43:49 tim Exp $
#

MAGICDIR = .
PROGRAMS = magic
TECH = scmos
LIBRARIES = database utils extflat
MODULES = cmwind commands database dbwind debug drc extflat extract \
graphics netmenu plow resis select sim textio tiles utils \
windows wiring

MAKEFLAGS =
INSTALL_CAD_DIRS = windows doc ${TECH}

include defs.mak

all: $(ALL_TARGET)

standard:
@echo --- errors and warnings logged in file make.log
@${MAKE} mains 2>&1 | tee -a make.log | egrep -i "(.c:|Stop.|---)"

tcl:
@echo --- errors and warnings logged in file make.log
@${MAKE} tcllibrary 2>&1 | tee -a make.log | egrep -i "(.c:|Stop.|---)"

force: clean all

defs.mak:
@echo No \"defs.mak\" file found. Run "configure" to make one.

config:
${MAGICDIR}/configure

tcllibrary: database/database.h modules
@echo --- making Tcl shared libraries
for dir in ${PROGRAMS}; do \
(cd $$dir && ${MAKE} tcl-main); done

mains: database/database.h modules libs
@echo --- making main programs
for dir in ${PROGRAMS}; do \
(cd $$dir && ${MAKE} main); done

database/database.h: database/database.h.in
@echo --- making header file database/database.h
${SCRIPTS}/makedbh database/database.h.in database/database.h

modules:
@echo --- making modules
for dir in ${MODULES} ${PROGRAMS}; do \
(cd $$dir && ${MAKE} module); done

libs:
@echo --- making libraries
for dir in ${LIBRARIES}; do \
(cd $$dir && ${MAKE} lib); done

depend: database/database.h
${RM} */Depend
for dir in ${MODULES} ${UNUSED_MODULES} ${PROGRAMS}; do \
(cd $$dir && ${MAKE} depend); done

install: $(INSTALL_TARGET)

install-magic:
@echo --- installing executable to $(DESTDIR)${BINDIR}
@echo --- installing runtime files to $(DESTDIR)${LIBDIR}
@${MAKE} install-real 2>&1 >> install.log

install-real: install-dirs
for dir in ${INSTALL_CAD_DIRS}; do \
(cd $$dir && ${MAKE} install); done
for dir in ${PROGRAMS}; do \
(cd $$dir && ${MAKE} install); done

install-tcl-dirs:
${MAGICDIR}/scripts/mkdirs $(DESTDIR)${BINDIR} $(DESTDIR)${MANDIR} \
$(DESTDIR)${SYSDIR} $(DESTDIR)${TCLDIR} $(DESTDIR)${TCLDIR}/bitmaps

install-dirs:
${MAGICDIR}/scripts/mkdirs $(DESTDIR)${BINDIR} $(DESTDIR)${MANDIR} \
$(DESTDIR)${SYSDIR} $(DESTDIR)${SCMDIR}

install-tcl:
@echo --- installing executable to $(DESTDIR)${BINDIR}
@echo --- installing runtime files to $(DESTDIR)${LIBDIR}
@${MAKE} install-tcl-real 2>&1 >> install.log

install-tcl-real: install-tcl-dirs
for dir in ${INSTALL_CAD_DIRS} ${PROGRAMS}; do \
(cd $$dir && ${MAKE} install-tcl); done

clean:
for dir in ${MODULES} ${PROGRAMS} ${TECH} ${UNUSED_MODULES}; do \
(cd $$dir && ${MAKE} clean); done
${RM} *.tmp */*.tmp *.sav */*.sav *.log TAGS tags

distclean:
touch defs.mak
@${MAKE} clean
${RM} defs.mak old.defs.mak ${MAGICDIR}/scripts/defs.mak
${RM} ${MAGICDIR}/scripts/default.conf
${RM} ${MAGICDIR}/scripts/config.log ${MAGICDIR}/scripts/config.status
${RM} scripts/magic.spec magic-`cat VERSION` magic-`cat VERSION`.tgz
${RM} *.log

dist:
${RM} scripts/magic.spec magic-`cat VERSION` magic-`cat VERSION`.tgz
sed -e /@VERSION@/s%@VERSION@%`cat VERSION`% \
scripts/magic.spec.in > scripts/magic.spec
ln -nsf . magic-`cat VERSION`
tar zchvf magic-`cat VERSION`.tgz --exclude CVS \
--exclude magic-`cat VERSION`/magic-`cat VERSION` \
--exclude magic-`cat VERSION`/magic-`cat VERSION`.tgz \
magic-`cat VERSION`

clean-mains:
for dir in ${PROGRAMS}; do \
(cd $$dir && ${RM} $$dir); done

tags:
${RM} tags
find . ${MODULES} ${PROGRAMS} -name "*.[ch]" -maxdepth 1 | xargs ctags -o tags

TAGS:
${RM} TAGS
find . ${MODULES} ${PROGRAMS} -name "*.[ch]" -maxdepth 1 | xargs etags -o TAGS
Loading

0 comments on commit 231a299

Please sign in to comment.