aboutsummaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorDuncan Wilkie <antigravityd@gmail.com>2023-11-18 06:11:09 -0600
committerDuncan Wilkie <antigravityd@gmail.com>2023-11-18 06:11:09 -0600
commit11da511c784eca003deb90c23570f0873954e0de (patch)
treee14fdd3d5d6345956d67e79ae771d0633d28362b /Makefile
Initial commit.
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile40
1 files changed, 40 insertions, 0 deletions
diff --git a/Makefile b/Makefile
new file mode 100644
index 0000000..8696ae8
--- /dev/null
+++ b/Makefile
@@ -0,0 +1,40 @@
+REALDIR := $(shell dirname $(realpath $(firstword $(MAKEFILE_LIST))))
+
+CFLAGS = -Wall -Wextra -Wpedantic -lm -O2 -no-pie
+# DEBUGFLAGS = -Wall -Wextra -Wpedantic -lm -O0 -no-pie -DDEBUG -gdwarf-4 -ggdb
+INCLUDE = -I./ic-reals-6.3 -I./gmp-6.3.0/ -I./gmp-6.3.0/mpn/
+
+CC = gcc
+
+VPATH = ic-reals-6.3:gmp-6.3.0/bin/lib:doc
+
+edc: edc.c -lgmp -lreal
+ $(CC) $(CFLAGS) $(INCLUDE) $^ -o $@
+
+
+libs:
+ cd gmp-6.3.0; ./configure --prefix=$(REALDIR)/gmp-6.3.0/bin; $(MAKE) && $(MAKE) check && $(MAKE) install
+ cd ic-reals-6.3; $(MAKE)
+
+# real.adebug:
+# cd ic-reals-6.3; $(MAKE) debug
+
+
+
+# debug: real.adeubg, libgmp.a
+# $(CC) edc.c ./ic-reals-6.3/real.a -o edc $(INCLUDE) $(DEBUGFLAGS)
+
+clean:
+ cd ic-reals-6.3; $(MAKE) clean
+ cd gmp-6.3.0; $(MAKE) clean
+ cd doc; rm -f edc.1
+ rm -f edc
+
+
+
+doc: edc.1
+
+edc.1: edc_src.1
+ tbl $< | neqn $< > doc/$@
+
+.PHONY: doc clean