From b40050599caa848bed0453c296c191837b16c9a9 Mon Sep 17 00:00:00 2001 From: ellson Date: Thu, 28 Jul 2005 22:00:01 +0000 Subject: [PATCH] add a dot_static target to cmd/dot/Makefile.am mess around with builtins.c so that it works... --- cmd/dot/Makefile.am | 16 +++++++++++++++- dot.demo/Makefile | 25 +++++-------------------- lib/gvc/Makefile.am | 4 ++-- tclpkg/gv/Makefile.am | 23 ++++++++++++----------- tclpkg/tcldot/Makefile.am | 4 +++- 5 files changed, 37 insertions(+), 35 deletions(-) diff --git a/cmd/dot/Makefile.am b/cmd/dot/Makefile.am index de09e2100..d8a811cb0 100644 --- a/cmd/dot/Makefile.am +++ b/cmd/dot/Makefile.am @@ -17,7 +17,7 @@ bin_PROGRAMS = dot man_MANS = dot.1 pdf_DATA = dot.pdf -dot_SOURCES = dot.c +dot_SOURCES = dot.c $(top_srcdir)/lib/gvc/builtins.c dot_LDADD = $(top_builddir)/lib/gvc/libgvc.la install-data-hook: @@ -38,6 +38,20 @@ uninstall-hook: dot.pdf: $(top_srcdir)/cmd/dot/dot.1 groff -Tps -man $(top_srcdir)/cmd/dot/dot.1 | ps2pdf - - >$@ +dot_static: dot.o + $(CC) dot.o builtins.o \ + $(top_builddir)/lib/plugin/.libs/libgvplugin_dot_layout.a \ + $(top_builddir)/lib/plugin/.libs/libgvplugin_neato_layout.a \ + $(top_builddir)/lib/plugin/.libs/libgvplugin_usershape_gd.a \ + $(top_builddir)/lib/gvc/.libs/libgvc.a \ + $(top_builddir)/lib/gd/.libs/libgvgd.a \ + $(top_builddir)/lib/pack/.libs/libpack.a \ + $(top_builddir)/lib/pathplan/.libs/libpathplan.a \ + $(top_builddir)/lib/graph/.libs/libgraph.a \ + $(top_builddir)/lib/cdt/.libs/libcdt.a \ + -lfreetype -lfontconfig -lexpat -lpng -ljpeg -lltdl \ + -o dot_static + EXTRA_DIST = Makefile.old dot.1 dot.pdf DISTCLEANFILES = dot.pdf diff --git a/dot.demo/Makefile b/dot.demo/Makefile index f6e289ce5..bbf99c7c4 100644 --- a/dot.demo/Makefile +++ b/dot.demo/Makefile @@ -1,28 +1,13 @@ -COMPILE=libtool --tag=CC --mode=compile ${CC} -c -LINK=libtool --tag=CC --mode=link ${CC} - -CFLAGS=`pkg-config libgvc --cflags` -Wall -g -O0 +CFLAGS=`pkg-config libgvc --cflags` -Wall -g -O2 LDFLAGS=`pkg-config libgvc --libs` all: dot demo simple -dot: dot.lo - ${LINK} ${LDFLAGS} -o $@ dot.lo - -dot.lo: dot.c - ${COMPILE} ${CFLAGS} -o $@ dot.c - -demo: demo.lo - ${LINK} ${LDFLAGS} -o $@ demo.lo - -demo.lo: demo.c - ${COMPILE} ${CFLAGS} -o $@ demo.c +dot: dot.o builtins.o -simple: simple.lo - ${LINK} ${LDFLAGS} -o $@ simple.lo +demo: demo.o builtins.o -simple.lo: simple.c - ${COMPILE} ${CFLAGS} -o $@ simple.c +simple: simple.o builtins.o clean: - rm -rf .libs dot demo simple *.o *.lo + rm -rf *.o dot demo simple *.png diff --git a/lib/gvc/Makefile.am b/lib/gvc/Makefile.am index dd5e7d476..c01b52c8a 100644 --- a/lib/gvc/Makefile.am +++ b/lib/gvc/Makefile.am @@ -18,7 +18,7 @@ pkginclude_HEADERS = gvc.h gvcint.h gvplugin.h gvcproc.h gvplugin_render.h \ pkglib_LTLIBRARIES = libgvc.la pkgconfig_DATA = libgvc.pc -libgvc_la_SOURCES = builtins.c gvrender.c gvlayout.c gvtextlayout.c gvdevice.c \ +libgvc_la_SOURCES = gvrender.c gvlayout.c gvtextlayout.c gvdevice.c \ gvcontext.c gvjobs.c gvevent.c gvplugin.c gvconfig.c gvusershape.c \ gvc.c @@ -31,4 +31,4 @@ libgvc_la_LIBADD = \ $(top_builddir)/lib/plugin/libgvplugin_usershape_gd.la \ @GD_LIBS@ @EXPAT_LIBS@ @Z_LIBS@ @LIBGEN_LIBS@ -EXTRA_DIST = Makefile.old +EXTRA_DIST = Makefile.old builtins.c diff --git a/tclpkg/gv/Makefile.am b/tclpkg/gv/Makefile.am index 62898ee18..1152b9cc9 100644 --- a/tclpkg/gv/Makefile.am +++ b/tclpkg/gv/Makefile.am @@ -10,64 +10,65 @@ AM_CPPFLAGS = \ LIBS = @LIBS@ -lc -BASELIBS = $(top_builddir)/lib/gvc/libgvc.la +BASESOURCES = gv.cpp $(top_srcdir)/lib/gvc/builtins.c +BASELIBS = $(top_builddir)/lib/gvc/libgvc.la #CSHARP_hdr = gv.cs gvPINVOKE.cs SWIGTYPE_p_Agraph_t.cs SWIGTYPE_p_Agnode_t.cs SWIGTYPE_p_Agedge_t.cs -#libgv_csharp_la_SOURCES = gv.cpp gv_csharp.cpp +#libgv_csharp_la_SOURCES = $(BASESOURCES) gv_csharp.cpp #libgv_csharp_la_LIBADD = $(BASELIBS) @CSHARP_LIBS@ #gv_csharp.cpp $(CSHARP_hdr): gv.i # $(SWIG) -c++ -csharp -namespace gv -o gv_csharp.cpp gv.i #GUILE_hdr = -#libgv_guile_la_SOURCES = gv.cpp gv.gv_guile.cpp +#libgv_guile_la_SOURCES = $(BASESOURCES) gv.gv_guile.cpp #libgv_guile_la_LIBADD = $(BASELIBS) @GUILE_LIBS@ #gv_guile.cpp $(GUILE_hdr): gv.i # $(SWIG) -c++ -guile -o gv_guile.cpp gv.i #IO_hdr = -#libgv_io_la_SOURCES = gv.cpp gv_io.cpp +#libgv_io_la_SOURCES = $(BASESOURCES) gv_io.cpp #libgv_io_la_LIBADD = $(BASELIBS) @IO_LIBS@ #gv_io.cpp $(IO_hdr): gv.i # $(SWIG) -c++ -io -o gv_io.cpp gv.i JAVA_hdr = gv.java gvJNI.java SWIGTYPE_p_Agraph_t.java SWIGTYPE_p_Agnode_t.java SWIGTYPE_p_Agedge_t.java -libgv_java_la_SOURCES = gv.cpp gv_java.cpp +libgv_java_la_SOURCES = $(BASESOURCES) gv_java.cpp libgv_java_la_LIBADD = $(BASELIBS) @JAVA_LIBS@ gv_java.cpp $(JAVA_hdr): gv.i $(SWIG) -c++ -java -o gv_java.cpp gv.i #OCAML_hdr = gv.ml gv.mli -#libgv_ocaml_la_SOURCES = gv.cpp gv_ocaml.cpp +#libgv_ocaml_la_SOURCES = $(BASESOURCES) gv_ocaml.cpp #libgv_ocaml_la_LIBADD = $(BASELIBS) @IO_LIBS@ #gv_ocaml.cpp $(OCAML_hdr): gv.i # $(SWIG) -c++ -ocaml -o gv_ocaml.cpp gv.i PERL_hdr = gv.pm -libgv_perl_la_SOURCES = gv.cpp gv_perl.cpp +libgv_perl_la_SOURCES = $(BASESOURCES) gv_perl.cpp libgv_perl_la_LIBADD = $(BASELIBS) @PERL_LIBS@ gv_perl.cpp $(PERL_hdr): gv.i $(SWIG) -c++ -perl -o gv_perl.cpp gv.i PHP_hdr = gv.php php_gv.h -libgv_php_la_SOURCES = gv.cpp gv_php.cpp +libgv_php_la_SOURCES = $(BASESOURCES) gv_php.cpp libgv_php_la_LIBADD = $(BASELIBS) @PHP_LIBS@ gv_php.cpp $(PHP_hdr): gv.i $(SWIG) -c++ -php -o gv_php.cpp gv.i PYTHON_hdr = gv.py -libgv_python_la_SOURCES = gv.cpp gv_python.cpp +libgv_python_la_SOURCES = $(BASESOURCES) gv_python.cpp libgv_python_la_LIBADD = $(BASELIBS) @PYTHON_LIBS@ gv_python.cpp $(PYTHON_hdr): gv.i $(SWIG) -c++ -python -o gv_python.cpp gv.i RUBY_hdr = -libgv_ruby_la_SOURCES = gv.cpp gv_ruby.cpp +libgv_ruby_la_SOURCES = $(BASESOURCES) gv_ruby.cpp libgv_ruby_la_LIBADD = $(BASELIBS) @RUBY_LIBS@ gv_ruby.cpp $(RUBY_hdr): gv.i $(SWIG) -c++ -ruby -o gv_ruby.cpp gv.i TCL_hdr = -libgv_tcl_la_SOURCES = gv.cpp gv_tcl.cpp +libgv_tcl_la_SOURCES = $(BASESOURCES) gv_tcl.cpp libgv_tcl_la_LIBADD = $(top_builddir)/tclpkg/tclstubs/libtclstubs.la $(BASELIBS) @TCL_LIBS@ gv_tcl.cpp $(TCL_hdr): gv.i $(SWIG) -c++ -tcl -namespace -o gv_tcl.cpp gv.i diff --git a/tclpkg/tcldot/Makefile.am b/tclpkg/tcldot/Makefile.am index ac3bd5c4d..dcd8938eb 100644 --- a/tclpkg/tcldot/Makefile.am +++ b/tclpkg/tcldot/Makefile.am @@ -30,7 +30,9 @@ pdf_DATA = $(pdf) html_DATA = $(html) endif -libtcldot_la_SOURCES = tcldot.c tkgen.c $(top_srcdir)/tclpkg/gdtclft/gdtclft.c +libtcldot_la_SOURCES = tcldot.c tkgen.c \ + $(top_srcdir)/tclpkg/gdtclft/gdtclft.c + $(top_srcdir)/lib/gvc/builtins.c libtcldot_la_LIBADD = \ $(top_builddir)/tclpkg/tclhandle/libtclhandle.la \ $(top_builddir)/tclpkg/tclstubs/libtclstubs.la \ -- 2.40.0