# Copyright (c) 1993 - 2002 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. # # $Revision$ # VPATH = @srcdir@ srcdir = @srcdir@ SHELL = /bin/sh CC = @CC@ RANLIB = @RANLIB@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_DATA = @INSTALL_DATA@ INSTALL = @INSTALL@ PERLCONFIG = INSTALLDIRS=perl 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.3 TK_INCLUDE_PATH=/usr/include/tcl$(TCL_TK_VER) 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 TKCFLAGS = -I$(TK_INCLUDE_PATH) # # 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 = @TKLIB@/pTk PTKCFLAGS = -DPTK -I$(PTKLIB) # # Define this to use OpenGL # libGLU is needed even if GL support is disabled # the GLU tesselator replace GPC. # GLX=-lGLU -lGL -lpthread #GLX=-lGLU # # Recognized compilation time flags are : # # PROFILE ask for profile support # OM include code for internal overlap manager # GLX include code that need GL support. # GLX_PRINT_CONFIG display the detected hardware capabilities # GLX_DAMAGE redraw only modified areas # SHAPE include code for reshaping windows. DFLAGS= -DOM -DSHAPE -DGLX -DGLX_DAMAGE -DGLX_PRINT_CONFIG #DFLAGS= -DOM -DSHAPE #DFLAGS = -DTCL_MEM_DEBUG # # This set for cc under HP-UX # # #------- Nothing to be modified by users below this line (hopefully ;-) ) ---------------- # cfiles = Track.c Tabular.c Reticle.c Map.c Rectangle.c Arc.c Curve.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 \ Field.c Triangles.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 Field.h PostScript.h Draw.h Image.h Geo.h \ OverlapMan.h WidgetInfo.h Track.h Group.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=om/%.o) omgobjs = $(omcfiles:%.c=om/%.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) $(TKCFLAGS) -O -c $< -o $@ tk/%.g: %.c $(CC) $(CFLAGS) $(CPPFLAGS) $(TKCFLAGS) -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 $@ om/%.o: %.c $(CC) $(CFLAGS) $(CPPFLAGS) -O -c $< -o $@ om/%.g: %.c $(CC) $(CFLAGS) $(CPPFLAGS) -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@ -L/usr/lib") ptkzinc_debug: libptkzinc_debug$(ZINC_VER).$(ZINC_MAJOR).so Perl/Makefile_debug (cd Perl; make "LD_RUN_PATH=@X_LIBS@ -L/usr/lib") 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)) (cd Perl/debug; perl Makefile.PL $(PERLCONFIG)) Perl/Makefile_debug: (cd Perl; perl Makefile.PL ptkzinc_debug$(ZINC_VER).$(ZINC_MAJOR) $(PERLCONFIG)) (cd Perl/debug; perl Makefile.PL $(PERLCONFIG)) libptkzinc$(ZINC_VER).$(ZINC_MAJOR).so: ptk $(ptkobjs) libom.so $(CC) $(SHARED_TK_LDFLAGS) -o $@ $(ptkobjs) $(SHARED_TK_LIBS) -L. -lom $(GLX) libptkzinc_debug$(ZINC_VER).$(ZINC_MAJOR).so: ptk $(ptkgobjs) libom_debug.so $(CC) $(SHARED_TK_LDFLAGS) -o $@ $(ptkgobjs) $(SHARED_TK_LIBS) -L. -lom_debug $(GLX) tkzinc: tkzinc$(ZINC_VER).$(ZINC_MAJOR).so tkzinc$(ZINC_VER).$(ZINC_MAJOR).so: tk $(tkobjs) libom.so $(CC) $(SHARED_TK_LDFLAGS) -o $@ $(SHARED_TK_LIBS) -L. -ltk$(TCL_TK_VER) -ltcl$(TCL_TK_VER) -lom $(GLX) $(tkobjs) tkzinc_debug: tkzinc_debug$(ZINC_VER).$(ZINC_MAJOR).so tkzinc_debug$(ZINC_VER).$(ZINC_MAJOR).so: tk $(tkgobjs) libom_debug.so $(CC) $(SHARED_TK_LDFLAGS) -o $@ $(SHARED_TK_LIBS) -L. -ltk$(TCL_TK_VER) -ltcl$(TCL_TK_VER) -lom_debug $(GLX) $(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: om $(omobjs) $(CC) $(SHARED_TK_LDFLAGS) -o $@ $(omobjs) -lm libom_debug.so: om $(omgobjs) $(CC) $(SHARED_TK_LDFLAGS) -o $@ $(omgobjs) -lm tk: -mkdir tk ptk: -mkdir ptk om: -mkdir om doc: doc/refman.pdf doc/refman.html doc/refman.html: (cd doc; latex2html refman.tex; cp -f *.png refman/ ) doc/refman.pdf: doc/refman.tex (cd doc; \ rm -f refman.aux refman.ilg refman.ind refman.out; \ rm -f refman.idx refman.lof refman.log refman.lot refman.toc; \ pdflatex refman.tex; \ makeindex refman.idx; pdflatex refman.tex; \ thumbpdf refman.pdf;) install: installtk installptk installom installom: libom.so $(INSTALL_DATA) libom.so $(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)) (cd Perl/debug; 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: -rm -f core a.out tk/*.o tk/*.g ptk/*.o ptk/*.g 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.pdf 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