summaryrefslogtreecommitdiff
path: root/gdtoa/Makefile.am
diff options
context:
space:
mode:
Diffstat (limited to 'gdtoa/Makefile.am')
-rw-r--r--gdtoa/Makefile.am21
1 files changed, 14 insertions, 7 deletions
diff --git a/gdtoa/Makefile.am b/gdtoa/Makefile.am
index 4f4f11b7..1ff9dea3 100644
--- a/gdtoa/Makefile.am
+++ b/gdtoa/Makefile.am
@@ -1,5 +1,6 @@
lib_LTLIBRARIES = libgdtoa.la
+libgdtoa_la_CPPFLAGS = -I$(includedir)
libgdtoa_la_SOURCES = \
dmisc.c dtoa.c g_Qfmt.c g__fmt.c g_ddfmt.c g_dfmt.c g_ffmt.c \
g_xLfmt.c g_xfmt.c gdtoa.c gethex.c gmisc.c hd_init.c hexnan.c \
@@ -8,19 +9,25 @@ libgdtoa_la_SOURCES = \
strtopd.c strtopdd.c strtopf.c strtopx.c strtopxL.c strtorQ.c \
strtord.c strtordd.c strtorf.c strtorx.c strtorxL.c sum.c ulp.c
+EXTRA_libgdtoa_la_SOURCES = arithchk.c qnan.c
+
$(libgdtoa_la_SOURCES): arith.h gd_qnan.h
arith.h: arithchk.c
- $(CC) $(CFLAGS) -o arithchk arithchk.c || \
- $(CC) -DNO_LONG_LONG $(CFLAGS) -o arithchk arithchk.c
- ./arithchk > arith.h
+ mkdir -p $(includedir)
+ $(CC) $(CFLAGS) -o $(prefix)/arithchk $< || \
+ $(CC) -DNO_LONG_LONG $(CFLAGS) -o $(prefix)/arithchk $<
+ $(prefix)/arithchk > $(includedir)/$@
+ rm -f $(prefix)/arithchk
-gd_qnan.h: arith.h qnan.c
- $(CC) $(CFLAGS) -o qnan qnan.c
- ./qnan >gd_qnan.h
+gd_qnan.h: qnan.c arith.h
+ $(CC) $(CFLAGS) -o $(prefix)/qnan -I$(includedir) $<
+ $(prefix)/qnan > $(includedir)/$@
+ rm -f $(prefix)/qnan
libgdtoa_la_LDFLAGS = -release 1.0
-pkginclude_HEADERS = gdtoa.h
+pkginclude_HEADERS = gdtoa.h gdtoaimp.h
CLEANFILES = arithchk qnan
+DISTCLEANFILES = arithchk arith.h qnan qnan.h