Migrated to the latest automake & libtool releases/prereleases, with all
[alexxy/gromacs.git] / share / template / Makefile.am
1 ## Process this file with automake to produce Makefile.in
2 #
3 # Don't edit - this file is generated automatically from Makefile.am
4 #
5
6 templatedir = ${datadir}/template
7
8 # we don't build this, it's meant for the user to play with.
9 # Since a Makefile is used for the installation, we call the
10 # template makefile Template.mak, and rename it to Makefile when installing.
11 # We add the DOUBLE define to CPPFLAGS, so users can do without config.h
12 LDFLAGS = -L@libdir@ @LDFLAGS@
13 LIBS = -lmd@LIBSUFFIX@ -lgmx@LIBSUFFIX@ @LIBS@ 
14 CC = @CC@
15 if DOUBLE
16 CFLAGS = @CFLAGS@ -DDOUBLE @INCLUDES@ -I@includedir@ 
17 else
18 CFLAGS = @CFLAGS@ @INCLUDES@ -I@includedir@ 
19 endif
20
21 if DOUBLE
22 template_DATA = template.c README Makefile.@host@_double
23 else
24 template_DATA = template.c README Makefile.@host@
25 endif
26 EXTRA_DIST = template.c README Template.mak
27
28 Makefile.@host@ Makefile.@host@_double: Template.mak Makefile 
29         cat $(srcdir)/Template.mak | \
30         sed 's,@LDFLAGS\@,$(LDFLAGS),' | \
31         sed 's,@LIBS\@,$(LIBS),' | \
32         sed 's,@CFLAGS\@,$(CFLAGS),' | \
33         sed 's,@CC\@,$(CC),' | \
34         sed 's,@host\@,@host@,' >$@
35
36 install-data-hook:
37 if DOUBLE
38         (cd $(DESTDIR)$(templatedir) && test ! -f Makefile && $(LN_S) Makefile.@host@_double Makefile ; exit 0)
39 else
40         (cd $(DESTDIR)$(templatedir) && test ! -f Makefile && $(LN_S) Makefile.@host@ Makefile ; exit 0)
41 endif
42 CLEANFILES = Makefile.@host@ Makefile.@host@_double *~ \\\#*
43
44
45
46