| 1 | # This is the Makefile.am, which is processed by automake to produce |
|---|
| 2 | # Makefile.in, which in turn is processed at build-time by configure to build |
|---|
| 3 | # the actual Makefile. If you don't understand this, just run the configure |
|---|
| 4 | # script, or if it doesn't exist, the autogen.sh script. |
|---|
| 5 | |
|---|
| 6 | # Note that autogen.sh requires at least version 1.5 of automake for support of |
|---|
| 7 | # the *_CFLAGS variables defined below. |
|---|
| 8 | |
|---|
| 9 | AUTOMAKE_OPTIONS=1.5 |
|---|
| 10 | |
|---|
| 11 | lib_LTLIBRARIES = libfreenergy.la libgibbs.la |
|---|
| 12 | |
|---|
| 13 | libfreenergy_la_SOURCES = freenergy.c |
|---|
| 14 | libfreenergy_la_LIBADD = -lm $(BLASLAPACK_LIBS) |
|---|
| 15 | libfreenergy_la_CFLAGS = -std=c99 -DHAVE_LAPACK=$(HAVE_LAPACK) #-DDEBUG |
|---|
| 16 | libfreenergy_la_LDFLAGS = -version-info 1:0:0 |
|---|
| 17 | |
|---|
| 18 | libgibbs_la_SOURCES = geomview.c qhull.c book.c spinodal.c |
|---|
| 19 | libgibbs_la_LIBADD = -lqhull libfreenergy.la |
|---|
| 20 | libgibbs_la_CFLAGS = -std=c99 -DGEOMVIEW=\"@GEOMVIEW@\" #-DDEBUG |
|---|
| 21 | libgibbs_la_LDFLAGS = -version-info 0:0:0 |
|---|
| 22 | |
|---|
| 23 | include_HEADERS = freenergy.h gibbs.h |
|---|
| 24 | |
|---|
| 25 | if GNOMEUI_EXISTS |
|---|
| 26 | GNOMEUI_PROGS = Ternary |
|---|
| 27 | else |
|---|
| 28 | GNOMEUI_PROGS = |
|---|
| 29 | endif |
|---|
| 30 | |
|---|
| 31 | bin_PROGRAMS = ternary square $(GNOMEUI_PROGS) |
|---|
| 32 | ternary_SOURCES = ternary.c |
|---|
| 33 | ternary_CFLAGS = #-DDEBUG |
|---|
| 34 | ternary_LDADD = libgibbs.la libfreenergy.la |
|---|
| 35 | |
|---|
| 36 | square_SOURCES = square.c |
|---|
| 37 | square_CFLAGS = #-DDEBUG |
|---|
| 38 | square_LDADD = libgibbs.la libfreenergy.la |
|---|
| 39 | |
|---|
| 40 | Ternary_SOURCES = Ternary.c |
|---|
| 41 | Ternary_CFLAGS = $(GNOMEUI_CFLAGS) -DVERSION=\"@VERSION@\"\ |
|---|
| 42 | -DGLADE_DIRECTORY=\"$(pkgdatadir)\" #-DDEBUG |
|---|
| 43 | Ternary_LDADD = libgibbs.la libfreenergy.la $(GNOMEUI_LIBS) |
|---|
| 44 | Ternary_LDFLAGS = -rdynamic |
|---|
| 45 | |
|---|
| 46 | EXTRA_DIST = autogen.sh macros/autogen.sh macros/cxref-latex.m4 \ |
|---|
| 47 | images/freenergy-0.1.0.png images/freenergy-0.2.0.png \ |
|---|
| 48 | images/freenergy-0.3.0.png images/freenergy-0.4.0.png \ |
|---|
| 49 | images/freenergy-0.5.0.png ternary.bib |
|---|
| 50 | desktopdir = $(datadir)/applications |
|---|
| 51 | desktop_DATA = Ternary.desktop |
|---|
| 52 | dist_pkgdata_DATA = Ternary.glade images/icon.png |
|---|
| 53 | |
|---|
| 54 | # Everything from here down is documentation stuff. |
|---|
| 55 | if HAVE_CXREF |
|---|
| 56 | BUILT_TEXFILES = $(top_srcdir)/ternary.c.tex \ |
|---|
| 57 | $(top_srcdir)/square.c.tex \ |
|---|
| 58 | $(top_srcdir)/freenergy.h.tex \ |
|---|
| 59 | $(top_srcdir)/freenergy.c.tex \ |
|---|
| 60 | $(top_srcdir)/gibbs.h.tex \ |
|---|
| 61 | $(top_srcdir)/spinodal.c.tex \ |
|---|
| 62 | $(top_srcdir)/geomview.c.tex \ |
|---|
| 63 | $(top_srcdir)/qhull.c.tex \ |
|---|
| 64 | $(top_srcdir)/book.c.tex \ |
|---|
| 65 | config.h.tex |
|---|
| 66 | |
|---|
| 67 | CXREF_HTML_DOCS = $(BUILT_TEXFILES:.tex=.html) $(BUILT_TEXFILES:.tex=.src.html) |
|---|
| 68 | |
|---|
| 69 | # The ugly remove-cxref-remove-make-cxref is necessary to generate the .sty |
|---|
| 70 | # files for the .c.tex latex commands. |
|---|
| 71 | # $(top_builddir) is automatic in C compiling, need it here for config.h. |
|---|
| 72 | cxref-tex: @PACKAGE@.tex $(BUILT_TEXFILES:.tex=) |
|---|
| 73 | rm -f $< |
|---|
| 74 | @CXREF@ -CPP 'gcc -E -C -dD -dI' -latex -N@PACKAGE@ \ |
|---|
| 75 | $(PETSC_INCLUDE) $(ILLUMINATOR_CFLAGS) -I$(top_builddir) \ |
|---|
| 76 | $(BUILT_TEXFILES:.tex=) |
|---|
| 77 | rm -f @PACKAGE@.tex |
|---|
| 78 | $(MAKE) @PACKAGE@.tex |
|---|
| 79 | @CXREF@ -CPP 'gcc -E -C -dD -dI' -latex -N@PACKAGE@ \ |
|---|
| 80 | $(PETSC_INCLUDE) $(ILLUMINATOR_CFLAGS) -I$(top_builddir) \ |
|---|
| 81 | $(BUILT_TEXFILES:.tex=) |
|---|
| 82 | touch $@ # so @PACKAGE@.tex isn't newer |
|---|
| 83 | |
|---|
| 84 | # This only works for srcdir=buildir, because cxref breaks with separate source |
|---|
| 85 | cxref-html: @PACKAGE@.html $(BUILT_TEXFILES:.tex=) |
|---|
| 86 | # rm -rf html |
|---|
| 87 | # install -d html |
|---|
| 88 | @CXREF@ -CPP 'gcc -E -C -dD -dI' -html-src -N@PACKAGE@ \ |
|---|
| 89 | $(PETSC_INCLUDE) $(ILLUMINATOR_CFLAGS) -I$(top_builddir) \ |
|---|
| 90 | $(BUILT_TEXFILES:.tex=) |
|---|
| 91 | # mv $(CXREF_HTML_DOCS) html/ |
|---|
| 92 | # cp -p @PACKAGE@.html html/index.html |
|---|
| 93 | touch $@ # so @PACKAGE@.html isn't newer |
|---|
| 94 | |
|---|
| 95 | else # HAVE_CXREF |
|---|
| 96 | cxref-tex: @PACKAGE@.tex |
|---|
| 97 | cxref-html: @PACKAGE@.html |
|---|
| 98 | BUILT_TEXFILES = |
|---|
| 99 | CXREF_HTML_DOCS = |
|---|
| 100 | endif # HAVE_CXREF |
|---|
| 101 | |
|---|
| 102 | if HAVE_LATEX |
|---|
| 103 | @PACKAGE@.aux: cxref-tex |
|---|
| 104 | @LATEX@ @PACKAGE@ |
|---|
| 105 | |
|---|
| 106 | if HAVE_BIBTEX |
|---|
| 107 | BIBTEX_FILES = @PACKAGE@.bbl |
|---|
| 108 | @PACKAGE@.bbl: @PACKAGE@.aux @PACKAGE@.bib |
|---|
| 109 | @BIBTEX@ @PACKAGE@ |
|---|
| 110 | else # HAVE_BIBTEX |
|---|
| 111 | BIBTEX_FILES = |
|---|
| 112 | endif # HAVE_BIBTEX |
|---|
| 113 | |
|---|
| 114 | DVI_DOCS = @PACKAGE@.dvi |
|---|
| 115 | @PACKAGE@.dvi: cxref-tex @PACKAGE@.html @PACKAGE@.aux $(BIBTEX_FILES) |
|---|
| 116 | @LATEX@ @PACKAGE@ |
|---|
| 117 | @LATEX@ @PACKAGE@ |
|---|
| 118 | grep -v HAVE_LATEX_ @PACKAGE@.html > @PACKAGE@.html.new |
|---|
| 119 | mv -f @PACKAGE@.html.new @PACKAGE@.html |
|---|
| 120 | |
|---|
| 121 | if HAVE_PDFLATEX |
|---|
| 122 | PDF_DOCS = @PACKAGE@.pdf |
|---|
| 123 | @PACKAGE@.pdf: cxref-tex @PACKAGE@.html @PACKAGE@.aux $(BIBTEX_FILES) |
|---|
| 124 | @PDFLATEX@ @PACKAGE@ |
|---|
| 125 | @PDFLATEX@ @PACKAGE@ |
|---|
| 126 | grep -v HAVE_PDFLATEX @PACKAGE@.html > @PACKAGE@.html.new |
|---|
| 127 | mv -f @PACKAGE@.html.new @PACKAGE@.html |
|---|
| 128 | else # HAVE_PDFLATEX |
|---|
| 129 | PDF_DOCS = |
|---|
| 130 | endif # HAVE_PDFLATEX |
|---|
| 131 | |
|---|
| 132 | if HAVE_DVIPS |
|---|
| 133 | PS_DOCS = @PACKAGE@.ps |
|---|
| 134 | @PACKAGE@.ps: @PACKAGE@.dvi @PACKAGE@.html |
|---|
| 135 | @DVIPS@ $< -o $@ |
|---|
| 136 | grep -v HAVE_DVIPS @PACKAGE@.html > @PACKAGE@.html.new |
|---|
| 137 | mv -f @PACKAGE@.html.new @PACKAGE@.html |
|---|
| 138 | else # HAVE_DVIPS |
|---|
| 139 | PS_DOCS = |
|---|
| 140 | endif # HAVE_DVIPS |
|---|
| 141 | else # HAVE_LATEX |
|---|
| 142 | DVI_DOCS = |
|---|
| 143 | PS_DOCS = |
|---|
| 144 | endif # HAVE_LATEX |
|---|
| 145 | |
|---|
| 146 | if HAVE_HEVEA |
|---|
| 147 | HEVEA_DOCS = @PACKAGE@-tex.html |
|---|
| 148 | @PACKAGE@-tex.html: @PACKAGE@.tex cxref-tex @PACKAGE@.html cxref-html |
|---|
| 149 | hevea -I . -exec xxdate.exe -o $@ $< |
|---|
| 150 | grep -v HAVE_HEVEA @PACKAGE@.html > @PACKAGE@.html.new |
|---|
| 151 | mv -f @PACKAGE@.html.new @PACKAGE@.html |
|---|
| 152 | endif # HAVE_HEVEA |
|---|
| 153 | |
|---|
| 154 | if HAVE_LATEX2HTML |
|---|
| 155 | LATEX2HTML_DOCS = @PACKAGE@-html-@VERSION@.tar.gz |
|---|
| 156 | @PACKAGE@-html-@VERSION@.tar.gz: cxref-tex cxref-html |
|---|
| 157 | rm -rf @PACKAGE@-html-@VERSION@ |
|---|
| 158 | mkdir @PACKAGE@-html-@VERSION@ |
|---|
| 159 | @LATEX2HTML@ -dir @PACKAGE@-html-@VERSION@ @PACKAGE@ |
|---|
| 160 | tar cf @PACKAGE@-html-@VERSION@.tar @PACKAGE@-html-@VERSION@ |
|---|
| 161 | gzip --best @PACKAGE@-html-@VERSION@.tar |
|---|
| 162 | grep -v HAVE_LATEX2HTML @PACKAGE@.html > @PACKAGE@.html.new |
|---|
| 163 | mv -f @PACKAGE@.html.new @PACKAGE@.html |
|---|
| 164 | else # HAVE_LATEX2HTML |
|---|
| 165 | LATEX2HTML_DOCS = |
|---|
| 166 | endif # HAVE_LATEX2HTML |
|---|
| 167 | |
|---|
| 168 | # Build all the documentation, and put everything in @PACKAGE@-doc-@VERSION@ |
|---|
| 169 | stamp-doc: cxref-html $(PDF_DOCS) $(DVI_DOCS) $(PS_DOCS) $(HEVEA_DOCS) \ |
|---|
| 170 | $(LATEX2HTML_DOCS) |
|---|
| 171 | rm -rf @PACKAGE@-doc-@VERSION@ |
|---|
| 172 | if HAVE_LATEX2HTML |
|---|
| 173 | mv @PACKAGE@-html-@VERSION@ @PACKAGE@-doc-@VERSION@ |
|---|
| 174 | else # HAVE_LATEX2HTML |
|---|
| 175 | mkdir @PACKAGE@-doc-@VERSION@ |
|---|
| 176 | endif # HAVE_LATEX2HTML |
|---|
| 177 | cp -f $^ @PACKAGE@-doc-@VERSION@/ |
|---|
| 178 | if HAVE_CXREF |
|---|
| 179 | rm -f @PACKAGE@-doc-@VERSION@/index.html @PACKAGE@-doc-@VERSION@/cxref-html |
|---|
| 180 | cp -p $(HEVEA_DOCS) $(LATEX2HTML_DOCS) $(CXREF_HTML_DOCS) @PACKAGE@-doc-@VERSION@/ |
|---|
| 181 | rm -f @PACKAGE@-doc-@VERSION@/index.html |
|---|
| 182 | endif # HAVE_CXREF |
|---|
| 183 | cp -p @PACKAGE@.html @PACKAGE@-doc-@VERSION@/index.html |
|---|
| 184 | touch $@ |
|---|
| 185 | |
|---|
| 186 | pdf_DATA = $(PDF_DOCS) |
|---|
| 187 | dvi_DATA = $(DVI_DOCS) |
|---|
| 188 | ps_DATA = $(PS_DOCS) |
|---|
| 189 | html_DATA = $(HEVEA_DOCS) $(CXREF_HTML_DOCS) @PACKAGE@.html |
|---|
| 190 | doc_DATA = $(LATEX2HTML_DOCS) |
|---|
| 191 | |
|---|
| 192 | CLEANFILES = *~ *.aux *.log *.bbl *.blg *.toc *.sty *.dvi *.pdf *.ps *.ps.gz \ |
|---|
| 193 | *.tar.gz *.css $(BUILT_TEXFILES) $(CXREF_HTML_DOCS) cxref-tex cxref-html \ |
|---|
| 194 | @PACKAGE@-tex.html html @PACKAGE@-doc-@VERSION@ stamp-doc |
|---|
| 195 | |
|---|
| 196 | clean-local: |
|---|
| 197 | rm -rf html @PACKAGE@-doc-@VERSION@ |
|---|