Honour CFLAGS, support for non-gcc compilers
[mplib] / src / texk / web2c / mpdir / Makefile.am
1 # Copyright 2008 Taco Hoekwater.
2 #
3 # This program is free software: you can redistribute it and/or modify
4 # it under the terms of the GNU General Public License as published by
5 # the Free Software Foundation, either version 2 of the License, or
6 # (at your option) any later version.
7 #
8 # This program is distributed in the hope that it will be useful,
9 # but WITHOUT ANY WARRANTY; without even the implied warranty of
10 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
11 # GNU General Public License for more details.
12 #
13 # You should have received a copy of the GNU General Public License
14 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
15
16 AUTOMAKE_OPTIONS = foreign
17
18 KPSEBUILDDIR = ../../../texk/kpathsea/.libs
19 KPSESRCDIR = ../../../../src/texk/kpathsea
20 KPSELIB=$(KPSEBUILDDIR)/libkpathsea.a
21 AM_CFLAGS=-I. -I../.. -I$(KPSESRCDIR)/.. -I$(KPSESRCDIR)
22
23 bin_PROGRAMS = mpost
24
25 mpost_SOURCES = mpost.c mpxout.c
26 mpost_DEPENDENCIES = libmplib.a
27 mpost_LDADD = libmplib.a $(KPSELIB) -lm
28
29 noinst_LIBRARIES = libmplib.a
30 libmplib_a_SOURCES = avl.c mp.c psout.c tfmin.c memio.c
31
32 include_HEADERS = mplib.h
33
34 CTANGLE=ctangle
35
36 mp.c: psout.c
37
38 mpost.c: mpxout.c
39
40 .w.c:
41         $(CTANGLE) $< $@
42
43 clean::
44         $(RM) mp.c psout.c tfmin.c memio.c mplib.h mppsout.h mpmp.h mpxout.c mpxout.h *.o libmplib.a mpost.c mpost
45
46 distclean:: clean
47         $(RM) Makefile config.h config.status config.log libtool