root/trunk/matml/src/ternary/Makefile.am

Revision 511, 6.3 kB (checked in by powell, 2 years ago)

Actually added Ternary.desktop with (mostly) configurable directory.

Line 
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
9AUTOMAKE_OPTIONS=1.5
10
11lib_LTLIBRARIES = libfreenergy.la libgibbs.la
12
13libfreenergy_la_SOURCES = freenergy.c
14libfreenergy_la_LIBADD  = -lm $(BLASLAPACK_LIBS)
15libfreenergy_la_CFLAGS  = -std=c99 -DHAVE_LAPACK=$(HAVE_LAPACK) #-DDEBUG
16libfreenergy_la_LDFLAGS = -version-info 1:0:0
17
18libgibbs_la_SOURCES = geomview.c qhull.c book.c spinodal.c
19libgibbs_la_LIBADD  = -lqhull libfreenergy.la
20libgibbs_la_CFLAGS  = -std=c99 -DGEOMVIEW=\"@GEOMVIEW@\" #-DDEBUG
21libgibbs_la_LDFLAGS = -version-info 0:0:0
22
23include_HEADERS = freenergy.h gibbs.h
24
25if GNOMEUI_EXISTS
26GNOMEUI_PROGS = Ternary
27else
28GNOMEUI_PROGS =
29endif
30
31bin_PROGRAMS    = ternary square $(GNOMEUI_PROGS)
32ternary_SOURCES = ternary.c
33ternary_CFLAGS  = #-DDEBUG
34ternary_LDADD   = libgibbs.la libfreenergy.la
35
36square_SOURCES = square.c
37square_CFLAGS  = #-DDEBUG
38square_LDADD   = libgibbs.la libfreenergy.la
39
40Ternary_SOURCES = Ternary.c
41Ternary_CFLAGS  = $(GNOMEUI_CFLAGS) -DVERSION=\"@VERSION@\"\
42                  -DGLADE_DIRECTORY=\"$(pkgdatadir)\" #-DDEBUG
43Ternary_LDADD   = libgibbs.la libfreenergy.la $(GNOMEUI_LIBS)
44Ternary_LDFLAGS = -rdynamic
45
46EXTRA_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
50desktopdir   = $(datadir)/applications
51desktop_DATA = Ternary.desktop
52dist_pkgdata_DATA = Ternary.glade images/icon.png
53
54# Everything from here down is documentation stuff.
55if HAVE_CXREF
56BUILT_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
67CXREF_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.
72cxref-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
85cxref-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
95else # HAVE_CXREF
96cxref-tex: @PACKAGE@.tex
97cxref-html: @PACKAGE@.html
98BUILT_TEXFILES =
99CXREF_HTML_DOCS =
100endif # HAVE_CXREF
101
102if HAVE_LATEX
103@PACKAGE@.aux: cxref-tex
104        @LATEX@ @PACKAGE@
105
106if HAVE_BIBTEX
107BIBTEX_FILES = @PACKAGE@.bbl
108@PACKAGE@.bbl: @PACKAGE@.aux @PACKAGE@.bib
109        @BIBTEX@ @PACKAGE@
110else # HAVE_BIBTEX
111BIBTEX_FILES =
112endif # HAVE_BIBTEX
113
114DVI_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
121if HAVE_PDFLATEX
122PDF_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
128else # HAVE_PDFLATEX
129PDF_DOCS =
130endif # HAVE_PDFLATEX
131
132if HAVE_DVIPS
133PS_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
138else # HAVE_DVIPS
139PS_DOCS =
140endif # HAVE_DVIPS
141else # HAVE_LATEX
142DVI_DOCS =
143PS_DOCS =
144endif # HAVE_LATEX
145
146if HAVE_HEVEA
147HEVEA_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
152endif # HAVE_HEVEA
153
154if HAVE_LATEX2HTML
155LATEX2HTML_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
164else # HAVE_LATEX2HTML
165LATEX2HTML_DOCS =
166endif # HAVE_LATEX2HTML
167
168# Build all the documentation, and put everything in @PACKAGE@-doc-@VERSION@
169stamp-doc: cxref-html $(PDF_DOCS) $(DVI_DOCS) $(PS_DOCS) $(HEVEA_DOCS) \
170           $(LATEX2HTML_DOCS)
171        rm -rf @PACKAGE@-doc-@VERSION@
172if HAVE_LATEX2HTML
173        mv @PACKAGE@-html-@VERSION@ @PACKAGE@-doc-@VERSION@
174else # HAVE_LATEX2HTML
175        mkdir @PACKAGE@-doc-@VERSION@
176endif # HAVE_LATEX2HTML
177        cp -f $^ @PACKAGE@-doc-@VERSION@/
178if 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
182endif # HAVE_CXREF
183        cp -p @PACKAGE@.html @PACKAGE@-doc-@VERSION@/index.html
184        touch $@
185
186pdf_DATA = $(PDF_DOCS)
187dvi_DATA = $(DVI_DOCS)
188ps_DATA = $(PS_DOCS)
189html_DATA = $(HEVEA_DOCS) $(CXREF_HTML_DOCS) @PACKAGE@.html
190doc_DATA = $(LATEX2HTML_DOCS)
191
192CLEANFILES = *~ *.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
196clean-local:
197        rm -rf html @PACKAGE@-doc-@VERSION@
Note: See TracBrowser for help on using the browser.