2017-04-25 14:41:48 +02:00
|
|
|
#
|
|
|
|
|
# rcsid $Header: /usr/cvsroot/magic-8.0/graphics/Makefile,v 1.1.1.1 2008/02/03 20:43:50 tim Exp $
|
|
|
|
|
#
|
|
|
|
|
|
|
|
|
|
MODULE = graphics
|
|
|
|
|
MAGICDIR = ..
|
2025-10-04 00:34:52 +02:00
|
|
|
BASE_SRCS = grMain.c grLock.c grDStyle.c grText.c grCMap.c grClip.c \
|
|
|
|
|
grGlyphs.c grNull.c
|
|
|
|
|
X11_SRCS = grX11su1.c grX11su2.c grX11su3.c grX11su4.c grX11su5.c
|
|
|
|
|
TK_SRCS = grTk1.c grTk2.c grTk3.c grTk4.c grTk5.c
|
|
|
|
|
TOGL_GL_SRCS = grTOGL1.c grTOGL2.c grTOGL4.c grTOGL5.c
|
|
|
|
|
TOGL_GLU_SRCS = grTOGL3.c
|
|
|
|
|
THREE_D_GL_SRCS = W3Dmain.c
|
|
|
|
|
OGL_GL_SRCS = grOGL1.c grOGL2.c grOGL4.c grOGL5.c
|
|
|
|
|
OGL_GLU_SRCS = grOGL3.c
|
|
|
|
|
TCAIRO_SRCS = grTCairo1.c grTCairo2.c grTCairo3.c grTCairo4.c grTCairo5.c
|
2017-04-25 14:41:48 +02:00
|
|
|
|
|
|
|
|
GLYPHS = bw.glyphs color.glyphs
|
|
|
|
|
OUTLINE_FONTS = FreeSerif.pt3 FreeSans.pt3 FreeMono.pt3
|
|
|
|
|
|
|
|
|
|
TKCOMMON_SRCS = grTkCommon.c
|
|
|
|
|
X11THREAD_SRCS = grX11thread.c
|
|
|
|
|
X11HELPER_SRCS = X11Helper.c
|
|
|
|
|
X11HELP_PROG = XHelper7
|
|
|
|
|
|
|
|
|
|
# Sets ${GR_SRCS} to one or more of the above
|
|
|
|
|
include ${MAGICDIR}/defs.mak
|
|
|
|
|
|
|
|
|
|
SRCS = ${BASE_SRCS} ${GR_SRCS}
|
2024-10-08 09:08:25 +02:00
|
|
|
DEPSRCS = ${BASE_SRCS}
|
|
|
|
|
ifeq (${MAKE_X11},1)
|
|
|
|
|
DEPSRCS += ${X11_SRCS} ${TK_SRCS}
|
|
|
|
|
endif
|
2025-10-04 00:34:52 +02:00
|
|
|
ifeq (${MAKE_GL},1)
|
|
|
|
|
DEPSRCS += ${OGL_GL_SRCS} ${TOGL_GL_SRCS}
|
2024-10-08 09:08:25 +02:00
|
|
|
ifeq (${MAKE_GLU},1)
|
2025-10-04 00:34:52 +02:00
|
|
|
DEPSRCS += ${OGL_GLU_SRCS} ${TOGL_GLU_SRCS}
|
|
|
|
|
endif
|
|
|
|
|
DEPSRCS += ${THREE_D_SRCS}
|
2024-10-08 09:08:25 +02:00
|
|
|
endif
|
|
|
|
|
ifeq (${MAKE_X11},1)
|
|
|
|
|
DEPSRCS += ${TKCOMMON_SRCS}
|
|
|
|
|
DEPSRCS += ${X11HELPER_SRCS} ${X11THREAD_SRCS}
|
2025-10-04 00:34:52 +02:00
|
|
|
endif
|
2024-10-08 09:08:25 +02:00
|
|
|
ifeq (${MAKE_CAIRO},1)
|
|
|
|
|
DEPSRCS += ${TCAIRO_SRCS}
|
|
|
|
|
endif
|
2025-10-04 00:34:52 +02:00
|
|
|
# Note GR_SRCS is from defs.mak
|
2017-04-25 14:41:48 +02:00
|
|
|
OBJS = ${BASE_SRCS:.c=.o} ${GR_SRCS:.c=.o}
|
|
|
|
|
CFLAGS += ${GR_CFLAGS}
|
|
|
|
|
DFLAGS += ${GR_DFLAGS}
|
|
|
|
|
CLEANS += ${GR_HELPER_PROG} *.o
|
|
|
|
|
LIBS += ${GR_LIBS}
|
|
|
|
|
|
|
|
|
|
main: ${GR_HELPER_PROG}
|
|
|
|
|
|
|
|
|
|
${GR_HELPER_PROG}: ${GR_HELPER_SRCS}
|
|
|
|
|
@echo --- building main ${GR_HELPER_PROG}
|
|
|
|
|
${RM} ${GR_HELPER_PROG}
|
build: out-of-tree outlier Makefiles — full make + install
Fix the remaining non-standard Makefiles so a full out-of-tree
`../configure && make && make install` builds and installs a complete
magic TCL tree, sources read from the source tree, all outputs in the
build tree.
Shared linker/preprocessor paths (scripts/configure.in, regenerated
scripts/configure):
* --version-script=${MAGICDIR}/magic/symbol.map -> ${MAGICSRC}/... so
every shared-library link (tclmagic.so, ...) finds the source map.
* MCPP preproc.py path ${MAGICDIR}/scripts -> ${MAGICSRC}/scripts.
Programs (built via tcllibrary, PROGRAMS = magic tcltk):
* magic/Makefile: proto.magicrc, magicWasm.o and the bitmaps/.initrc/
magicps.pro install copies use $< / $(srcdir) instead of bare names.
* tcltk/Makefile: magicexec/magicdnull compile $<; the sed'd launcher
scripts (magic.tcl/.sh, ext2spice.sh, ext2sim.sh) read $<; VERSION dep
-> ${MAGICSRC}; install-tcl copies each TCL file from the build dir if
present else $(srcdir) (magic.tcl is generated, the rest are source).
Techs (scmos):
* scmos/Makefile: SC_PP template include -> $(srcdir)/extract_template;
tech-file inputs (scmos.tech.in, *.tech.in) via $(srcdir)/$< ; recurse
into cif_template with mkdir + -f ${MAGICSRC}/scmos/cif_template/Makefile;
install copies from build-or-$(srcdir).
* scmos/cif_template/Makefile: MKDIR -> ${MAGICSRC}/scripts/mkdirs;
SC_CPP gains -I$(srcdir); cpp reads $(srcdir)/cif{in,out}.c so the .gen
includes resolve; objs/ generated in the build tree.
Data-file installs (source files copied from $(srcdir)):
* graphics/Makefile: glyphs, outline fonts, and the X11 helper build.
* windows/Makefile: glyphs and vector fonts.
* doc/Makefile: recurse into man/tutcells/html/latexfiles build-aware;
doc/man, doc/tutcells install with $< ; doc/html tars $(srcdir);
doc/latexfiles reads pre-built PostScript from ${MAGICSRC}/doc/psfiles.
Verified out-of-tree (mkdir _build; cd _build; ../configure): `make`
returns rc=0 (33 module libs, tclmagic.so, magicexec/magicdnull, scmos
tech files + cif_template objs, proto.magicrc), and
`make install DESTDIR=...` returns rc=0 installing 376 files
(bin/magic, tcl/tclmagic.so, sys/ glyphs+fonts+techs+dstyles), with the
source tree left completely clean.
Not exercised by the default TCL build/install and therefore not
converted here: the standalone .so/program variants of
lef/plot/router/ext2spice/ext2sim (their module libs do build), the
disabled oa module (-I. -> -I$(srcdir) still needed if enabled), the
WASM path, and doc/latexfiles PostScript *regeneration* (which still
writes into the source psfiles dir).
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-07-22 14:59:44 +02:00
|
|
|
${CC} ${CFLAGS} ${CPPFLAGS} ${DFLAGS} $(addprefix $(srcdir)/,${GR_HELPER_SRCS}) \
|
2017-04-25 14:41:48 +02:00
|
|
|
-o ${GR_HELPER_PROG} ${LIBS}
|
|
|
|
|
|
2020-01-28 16:40:01 +01:00
|
|
|
install: $(DESTDIR)${INSTALL_BINDIR}/${GR_HELPER_PROG} glyphs fonts
|
2017-04-25 14:41:48 +02:00
|
|
|
|
|
|
|
|
install-tcl: glyphs fonts
|
|
|
|
|
|
2020-01-28 16:40:01 +01:00
|
|
|
$(DESTDIR)${INSTALL_BINDIR}/${GR_HELPER_PROG}: ${GR_HELPER_PROG}
|
|
|
|
|
${RM} $(DESTDIR)${INSTALL_BINDIR}/${GR_HELPER_PROG}
|
|
|
|
|
${CP} ${GR_HELPER_PROG} $(DESTDIR)${INSTALL_BINDIR}
|
2017-04-25 14:41:48 +02:00
|
|
|
|
|
|
|
|
glyphs: ${GLYPHS}
|
|
|
|
|
for i in ${GLYPHS}; do \
|
2020-01-28 16:40:01 +01:00
|
|
|
${RM} $(DESTDIR)${INSTALL_SYSDIR}/$$i; \
|
build: out-of-tree outlier Makefiles — full make + install
Fix the remaining non-standard Makefiles so a full out-of-tree
`../configure && make && make install` builds and installs a complete
magic TCL tree, sources read from the source tree, all outputs in the
build tree.
Shared linker/preprocessor paths (scripts/configure.in, regenerated
scripts/configure):
* --version-script=${MAGICDIR}/magic/symbol.map -> ${MAGICSRC}/... so
every shared-library link (tclmagic.so, ...) finds the source map.
* MCPP preproc.py path ${MAGICDIR}/scripts -> ${MAGICSRC}/scripts.
Programs (built via tcllibrary, PROGRAMS = magic tcltk):
* magic/Makefile: proto.magicrc, magicWasm.o and the bitmaps/.initrc/
magicps.pro install copies use $< / $(srcdir) instead of bare names.
* tcltk/Makefile: magicexec/magicdnull compile $<; the sed'd launcher
scripts (magic.tcl/.sh, ext2spice.sh, ext2sim.sh) read $<; VERSION dep
-> ${MAGICSRC}; install-tcl copies each TCL file from the build dir if
present else $(srcdir) (magic.tcl is generated, the rest are source).
Techs (scmos):
* scmos/Makefile: SC_PP template include -> $(srcdir)/extract_template;
tech-file inputs (scmos.tech.in, *.tech.in) via $(srcdir)/$< ; recurse
into cif_template with mkdir + -f ${MAGICSRC}/scmos/cif_template/Makefile;
install copies from build-or-$(srcdir).
* scmos/cif_template/Makefile: MKDIR -> ${MAGICSRC}/scripts/mkdirs;
SC_CPP gains -I$(srcdir); cpp reads $(srcdir)/cif{in,out}.c so the .gen
includes resolve; objs/ generated in the build tree.
Data-file installs (source files copied from $(srcdir)):
* graphics/Makefile: glyphs, outline fonts, and the X11 helper build.
* windows/Makefile: glyphs and vector fonts.
* doc/Makefile: recurse into man/tutcells/html/latexfiles build-aware;
doc/man, doc/tutcells install with $< ; doc/html tars $(srcdir);
doc/latexfiles reads pre-built PostScript from ${MAGICSRC}/doc/psfiles.
Verified out-of-tree (mkdir _build; cd _build; ../configure): `make`
returns rc=0 (33 module libs, tclmagic.so, magicexec/magicdnull, scmos
tech files + cif_template objs, proto.magicrc), and
`make install DESTDIR=...` returns rc=0 installing 376 files
(bin/magic, tcl/tclmagic.so, sys/ glyphs+fonts+techs+dstyles), with the
source tree left completely clean.
Not exercised by the default TCL build/install and therefore not
converted here: the standalone .so/program variants of
lef/plot/router/ext2spice/ext2sim (their module libs do build), the
disabled oa module (-I. -> -I$(srcdir) still needed if enabled), the
WASM path, and doc/latexfiles PostScript *regeneration* (which still
writes into the source psfiles dir).
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-07-22 14:59:44 +02:00
|
|
|
${CP} $(srcdir)/$$i $(DESTDIR)${INSTALL_SYSDIR}; done
|
2017-04-25 14:41:48 +02:00
|
|
|
|
|
|
|
|
fonts: ${OUTLINE_FONTS}
|
|
|
|
|
for i in ${OUTLINE_FONTS}; do \
|
2020-01-28 16:40:01 +01:00
|
|
|
${RM} $(DESTDIR)${INSTALL_SYSDIR}/$$i; \
|
build: out-of-tree outlier Makefiles — full make + install
Fix the remaining non-standard Makefiles so a full out-of-tree
`../configure && make && make install` builds and installs a complete
magic TCL tree, sources read from the source tree, all outputs in the
build tree.
Shared linker/preprocessor paths (scripts/configure.in, regenerated
scripts/configure):
* --version-script=${MAGICDIR}/magic/symbol.map -> ${MAGICSRC}/... so
every shared-library link (tclmagic.so, ...) finds the source map.
* MCPP preproc.py path ${MAGICDIR}/scripts -> ${MAGICSRC}/scripts.
Programs (built via tcllibrary, PROGRAMS = magic tcltk):
* magic/Makefile: proto.magicrc, magicWasm.o and the bitmaps/.initrc/
magicps.pro install copies use $< / $(srcdir) instead of bare names.
* tcltk/Makefile: magicexec/magicdnull compile $<; the sed'd launcher
scripts (magic.tcl/.sh, ext2spice.sh, ext2sim.sh) read $<; VERSION dep
-> ${MAGICSRC}; install-tcl copies each TCL file from the build dir if
present else $(srcdir) (magic.tcl is generated, the rest are source).
Techs (scmos):
* scmos/Makefile: SC_PP template include -> $(srcdir)/extract_template;
tech-file inputs (scmos.tech.in, *.tech.in) via $(srcdir)/$< ; recurse
into cif_template with mkdir + -f ${MAGICSRC}/scmos/cif_template/Makefile;
install copies from build-or-$(srcdir).
* scmos/cif_template/Makefile: MKDIR -> ${MAGICSRC}/scripts/mkdirs;
SC_CPP gains -I$(srcdir); cpp reads $(srcdir)/cif{in,out}.c so the .gen
includes resolve; objs/ generated in the build tree.
Data-file installs (source files copied from $(srcdir)):
* graphics/Makefile: glyphs, outline fonts, and the X11 helper build.
* windows/Makefile: glyphs and vector fonts.
* doc/Makefile: recurse into man/tutcells/html/latexfiles build-aware;
doc/man, doc/tutcells install with $< ; doc/html tars $(srcdir);
doc/latexfiles reads pre-built PostScript from ${MAGICSRC}/doc/psfiles.
Verified out-of-tree (mkdir _build; cd _build; ../configure): `make`
returns rc=0 (33 module libs, tclmagic.so, magicexec/magicdnull, scmos
tech files + cif_template objs, proto.magicrc), and
`make install DESTDIR=...` returns rc=0 installing 376 files
(bin/magic, tcl/tclmagic.so, sys/ glyphs+fonts+techs+dstyles), with the
source tree left completely clean.
Not exercised by the default TCL build/install and therefore not
converted here: the standalone .so/program variants of
lef/plot/router/ext2spice/ext2sim (their module libs do build), the
disabled oa module (-I. -> -I$(srcdir) still needed if enabled), the
WASM path, and doc/latexfiles PostScript *regeneration* (which still
writes into the source psfiles dir).
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-07-22 14:59:44 +02:00
|
|
|
${CP} $(srcdir)/$$i $(DESTDIR)${INSTALL_SYSDIR}; done
|
2017-04-25 14:41:48 +02:00
|
|
|
|
|
|
|
|
include ${MAGICDIR}/rules.mak
|