# # Copyright (c) 1993 - 1999 CENA, Patrick Lecoanet -- # # This code is free software; you can redistribute it and/or # modify it under the terms of the GNU Library General Public # License as published by the Free Software Foundation; either # version 2 of the License, or (at your option) any later version. # # This code is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # Library General Public License for more details. # # You should have received a copy of the GNU Library General Public # License along with this code; if not, write to the Free # Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. # # # VPATH = @srcdir@ srcdir = @srcdir@ SHELL = /bin/sh CC = @CC@ RANLIB = @RANLIB@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_DATA = @INSTALL_DATA@ INSTALL = @INSTALL@ # PERL PATHS INSTALLARCHLIB = @INSTALLARCHLIB@ INSTALLPRIVLIB = @INSTALLPRIVLIB@ INSTALLMAN1DIR = @INSTALLMAN1DIR@ INSTALLMAN3DIR = @INSTALLMAN3DIR@ PERLCONFIG = INSTALLDIRS=perl INSTALLMAN1DIR=$(INSTALLMAN1DIR) INSTALLMAN3DIR=$(INSTALLMAN3DIR) INSTALLPRIVLIB=$(INSTALLPRIVLIB) INSTALLARCHLIB=$(INSTALLARCHLIB) INSTALL_PERL = install_perl prefix = $(HOME) exec_prefix = $(prefix) bindir = $(exec_prefix)/bin/$(ARCH) libdir = $(exec_prefix)/lib/$(ARCH) incdir = $(prefix)/include mandir = $(prefix)/man/man3 LDFLAGS = -L. @LDFLAGS@ @X_LIBS@ @LOCAL_X_LIBS@ # Should be tested in configure. It doesn't work # on some systems. SHARED_LIB_CFLAGS = @sharedlib_cflags@ SHARED_TK_LDFLAGS = @sharedlib_buildflags@ TCL_TK_VER = 8.2 SHARED_TK_LIBS = @X_LIBS@ @LOCAL_X_LIBS@ @XMU@ -lXext -lX11 @X_EXTRA_LIBS@ -lm ZINC_VER = @ZINC_VER@ ZINC_MAJOR = @ZINC_MAJOR@ CFLAGS = -Wall $(SHARED_LIB_CFLAGS) CPPFLAGS = @DEFS@ @X_CFLAGS@ $(DFLAGS) -I$(srcdir) -DBUILD_LIBRARY # # Linux #PTKLIB = /usr/lib/perl5/i386-linux/5.004/Tk/pTk #SITEPERL = /usr/local/lib/site_perl # # Solaris #PTKLIB = /usr/local/lib/perl5/site_perl/5.005/sun4-solaris/Tk/pTk #SITEPERL = /usr/local/lib/perl5/site_perl # # Auto PTKLIB = @INSTALLARCHLIB@/Tk/pTk SITEPERL = @SITEPERL@ PTKCFLAGS = -DPTK -I$(PTKLIB) # # Define this to use the polygon clipper. GPC=libgpc.so #GPC= # # Define this to use the local rendering engine. ART=-lart_lgpl #ART= # # Recognized compilation time flags are : # # PERFOS compile performance measurement code # PROFILE ask for profile support # OM include code for internal overlap manager # SHM include code that need shared memory support (such as # local rendering). # SHAPE include code for reshaping windows. # GPC include code for composing polygons. # ifeq ($(strip $(GPC)),'') DFLAGS = -DOM -DSHAPE else DFLAGS= -DOM -DSHAPE -DSHM -DGPC endif #DFLAGS = -DTCL_MEM_DEBUG # # This set for cc under HP-UX # # #------- Nothing to be modified by users below this line (hopefully ;-) ) ---------------- # TODO=Mosaic.c cfiles = Track.c Tabular.c Reticle.c Map.c Rectangle.c Arc.c Curve.c \ Bezier.c Item.c PostScript.c MapInfo.c Attrs.c Draw.c Geo.c List.c \ perfos.c version.c Transfo.c Group.c Icon.c Text.c Image.c Color.c \ Window.c tkcfiles = tkZinc.c omcfiles = OverlapMan.c hfiles = MapInfo.h List.h perfos.h patchlvl.h Types.h Transfo.h \ Attrs.h Item.h PostScript.h Draw.h Image.h Geo.h \ OverlapMan.h WidgetInfo.h Track.h dfiles = Copyright projfiles = ChangeLog mkinstalldirs confiles = configure configure.in acaux.m4 config.h.in Makefile.in install-sh afiles = $(cfiles) $(tkcfiles) $(hfiles) $(tfiles) $(dfiles) $(projfiles) $(confiles) rtlfiles = $(hfiles) $(tkhfiles) $(tfiles) $(dfiles) $(confiles) $(bins) $(tklibs) tkobjs = $(cfiles:%.c=tk/%.o) $(tkcfiles:%.c=tk/%.o) tkgobjs = $(cfiles:%.c=tk/%.g) $(tkcfiles:%.c=tk/%.g) tkpgobjs = $(cfiles:%.c=tk/%.pg) $(tkcfiles:%.c=tk/%.pg) ptkobjs = $(cfiles:%.c=ptk/%.o) $(tkcfiles:%.c=ptk/%.o) ptkgobjs = $(cfiles:%.c=ptk/%.g) $(tkcfiles:%.c=ptk/%.g) omobjs = $(omcfiles:%.c=tk/%.o) omgobjs = $(omcfiles:%.c=tk/%.g) tklibs = tkzinc$(ZINC_VER).$(ZINC_MAJOR).so ptklibs = libptkzinc$(ZINC_VER).$(ZINC_MAJOR).so fontbins = $(fonts:.bdf=.pcf) .SUFFIXES: .g .bdf .pcf tk/%.o: %.c $(CC) $(CFLAGS) $(CPPFLAGS) -O -c $< -o $@ tk/%.g: %.c $(CC) $(CFLAGS) $(CPPFLAGS) -g -c $< -o $@ tk/%.pg: %.c $(CC) $(CFLAGS) $(CPPFLAGS) -pg -c $< -o $@ ptk/%.o: %.c $(CC) $(CFLAGS) $(CPPFLAGS) $(PTKCFLAGS) -O -c $< -o $@ ptk/%.g: %.c $(CC) $(CFLAGS) $(CPPFLAGS) $(PTKCFLAGS) -g -c $< -o $@ .bdf.pcf: bdftopcf $*.bdf >$*.pcf ptkzinc: libptkzinc$(ZINC_VER).$(ZINC_MAJOR).so Perl/Makefile_nodebug (cd Perl; make "LD_RUN_PATH=@X_LIBS@") ptkzinc_debug: libptkzinc_debug$(ZINC_VER).$(ZINC_MAJOR).so Perl/Makefile_debug (cd Perl; make "LD_RUN_PATH=@X_LIBS@") testptk: ptkzinc (cd Perl; make test "FULLPERL=PERL_DL_NONLAZY=0 perl") Perl/Makefile_nodebug: (cd Perl; perl Makefile.PL ptkzinc$(ZINC_VER).$(ZINC_MAJOR) $(PERLCONFIG)) Perl/Makefile_debug: (cd Perl; perl Makefile.PL ptkzinc$(ZINC_VER).$(ZINC_MAJOR)_debug $(PERLCONFIG)) libptkzinc$(ZINC_VER).$(ZINC_MAJOR).so: ptk $(ptkobjs) libom.so $(GPC) $(CC) $(SHARED_TK_LDFLAGS) -o $@ $(SHARED_TK_LIBS) -L. -lom $(GPC) $(ART) $(ptkobjs) libptkzinc_debug$(ZINC_VER).$(ZINC_MAJOR).so: ptk $(ptkgobjs) libom_debug.so $(GPC) $(CC) $(SHARED_TK_LDFLAGS) -o $@ $(SHARED_TK_LIBS) -L. -lom_debug $(GPC) $(ART) $(ptkgobjs) tkzinc: tkzinc$(ZINC_VER).$(ZINC_MAJOR).so tkzinc$(ZINC_VER).$(ZINC_MAJOR).so: tk $(tkobjs) libom.so $(GPC) $(CC) $(SHARED_TK_LDFLAGS) -o $@ $(SHARED_TK_LIBS) -L. -ltk$(TCL_TK_VER) -ltcl$(TCL_TK_VER) -lom $(GPC) $(ART) $(tkobjs) tkzinc_debug: tkzinc_debug$(ZINC_VER).$(ZINC_MAJOR).so tkzinc_debug$(ZINC_VER).$(ZINC_MAJOR).so: tk $(tkgobjs) libom_debug.so $(GPC) $(CC) $(SHARED_TK_LDFLAGS) -o $@ $(SHARED_TK_LIBS) -L. -ltk$(TCL_TK_VER) -ltcl$(TCL_TK_VER) -lom_debug $(GPC) $(ART) $(tkgobjs) tkzinc_profile: tkzinc_profile.a libom.so $(CC) -pg -o zincwish $(SHARED_TK_LIBS) -L. -ltk$(TCL_TK_VER) -ltcl$(TCL_TK_VER) -lom tkAppInit.c tkzinc_profile.a -o zincwish tkzinc_profile.a: tk $(tkpgobjs) libom_debug.so ar rv $@ $(tkpgobjs) libom.so: tk $(omobjs) $(CC) $(SHARED_TK_LDFLAGS) -o $@ $(omobjs) -lm libom_debug.so: tk $(omgobjs) $(CC) $(SHARED_TK_LDFLAGS) -o $@ $(omgobjs) -lm libgpc.so: tk gpc/gpc.c gpc/gpc.h $(CC) $(SHARED_TK_LDFLAGS) $(SHARED_LIB_CFLAGS) -o $@ gpc/gpc.c -lm tk: -mkdir tk ptk: -mkdir ptk doc: doc/refman.ps doc/refman.html doc/refman.html: (cd doc; latex2html refman.tex) doc/refman.ps: doc/refman.tex (cd doc; latex refman.tex; latex refman.tex; dvips -o refman.ps refman.dvi) ifeq ($(strip($GPC)),) install: installtk installptk installom installgpc else install: installtk installptk installom endif installom: libom.so $(INSTALL_DATA) libom.so $(libdir) installgpc: $(GPC) $(INSTALL_DATA) $(GPC) $(libdir) installtk: installdirs $(tklibs) $(INSTALL_DATA) $(tklibs) $(libdir) cd $(libdir) && rm -f libtkzinc.so for f in $(hfiles); do $(INSTALL_DATA) $$f $(incdir); done installptk: $(ptklibs) $(INSTALL_DATA) $(ptklibs) $(libdir) (cd Perl; make; make $(INSTALL_PERL)) installdirs: $(srcdir)/mkinstalldirs $(libdir) $(incdir) $(mandir) # #------------- Stuff for maintaining ZINC below ----------------------------------- # VERSION = @ZINC_VERSION@ Makefile: Makefile.in config.status $(SHELL) config.status config.status: configure $(SHELL) $(srcdir)/configure --no-create configure: configure.in cd $(srcdir); autoconf config.h.in: configure.in cd $(srcdir); autoheader; touch config.h.in dist: zinc$(VERSION).tar.gz zinc$(VERSION).tar.gz: temp/zinc$(VERSION) cd temp; tar cohf ../zinc$(VERSION).tar zinc$(VERSION) -rm -f zinc$(VERSION).tar.gz gzip -9 zinc$(VERSION).tar temp/zinc$(VERSION): $(afiles) -rm -rf temp/zinc$(VERSION) -mkdir temp mkdir temp/zinc$(VERSION) cd temp/zinc$(VERSION); for f in $(afiles); do ln -s ../../$$f .; done ctags: $(hfiles) $(cfiles) $(tkcfiles) code.doc etags $(hfiles) $(cfiles) $(tkcfiles) code.doc mostlyclean: distclean clean: distclean distclean: Perl/Makefile_nodebug -rm -f *~ *.bak *.tar *.orig *.rej core a.out tk/*.o tk/*.g ptk/*.o ptk/*.g -rm -f *.a *.so* lints tmp* -rm -rf *temp -rm -rf refman.aux refman.dvi refman.idx refman.lof refman.log refman.lot -rm -rf refman.toc refman.ps refman.ilg refman.ind (cd Perl; make clean) depend: -$(CPP) $(CPPFLAGS) -MM -I. $(cfiles) $(tkcfiles) > depend.temp cat depend.temp | sed -e 's/.o:/.g:/g' > depends cat depend.temp >> depends rm -f depend.temp cat depends | sed -e 's+\(.*\):+tk/\1:+g' > depend.temp rm -f depends mv depend.temp depends depends: touch depends include depends