on master help sign in
Refactor the makefile so that all the pertinent variables are in config.mk
commit3bfe41870a2f3abda3b43a2971c9f53b09b2bb27 authorJason Dagit <dagit@galois.com> dateMon 29 Oct 2012, 11:56 (14 years ago) parent671d39a
3 files changed+15−5
Makefile+7−5 config.mk+3 rts/Makefile+5
Makefile+7−5
@@ -1,15 +1,17 @@
1+include config.mk
2+
13install: .PHONY
2− cabal install
4+ $(CABAL) install
35
46pinstall: .PHONY
5− cabal configure --enable-executable-profiling
6− cabal install --enable-executable-profiling
7+ $(CABAL) configure --enable-executable-profiling
8+ $(CABAL) install --enable-executable-profiling
79
810build: .PHONY
9− cabal build
11+ $(CABAL) build
1012
1113configure: .PHONY
12− cabal configure
14+ $(CABAL) configure
1315
1416test : .PHONY
1517 make -C test
config.mknew file+3
@@ -0,0 +1,3 @@
1+GMP_INCLUDE_DIR :=
2+CC :=gcc
3+CABAL :=cabal
rts/Makefile+5
@@ -1,6 +1,11 @@
1+include ../config.mk
2+
13OBJS = idris_rts.o idris_gc.o idris_gmp.o idris_stdfgn.o
24HDRS = idris_rts.h idris_gc.h idris_gmp.h idris_stdfgn.h
35CFLAGS = -O2 -Wall -Werror
6+ifneq ($(GMP_INCLUDE_DIR),)
7+ CFLAGS += -isystem $(GMP_INCLUDE_DIR)
8+endif
49
510LIBTARGET = libidris_rts.a
611