on master help sign in
Refactor the makefile so that all the pertinent variables are in config.mk
3bfe418Jason Dagit
Makefile+7−5
@@ -1,15 +1,17 @@
1+include config.mk
2+
1install: .PHONY
3install: .PHONY
2− cabal install
4+ $(CABAL) install
3
5
4pinstall: .PHONY
6pinstall: .PHONY
5− cabal configure --enable-executable-profiling
7+ $(CABAL) configure --enable-executable-profiling
6− cabal install --enable-executable-profiling
8+ $(CABAL) install --enable-executable-profiling
7
9
8build: .PHONY
10build: .PHONY
9− cabal build
11+ $(CABAL) build
10
12
11configure: .PHONY
13configure: .PHONY
12− cabal configure
14+ $(CABAL) configure
13
15
14test : .PHONY
16test : .PHONY
15 make -C test
17 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+
1OBJS = idris_rts.o idris_gc.o idris_gmp.o idris_stdfgn.o
3OBJS = idris_rts.o idris_gc.o idris_gmp.o idris_stdfgn.o
2HDRS = idris_rts.h idris_gc.h idris_gmp.h idris_stdfgn.h
4HDRS = idris_rts.h idris_gc.h idris_gmp.h idris_stdfgn.h
3CFLAGS = -O2 -Wall -Werror
5CFLAGS = -O2 -Wall -Werror
6+ifneq ($(GMP_INCLUDE_DIR),)
7+ CFLAGS += -isystem $(GMP_INCLUDE_DIR)
8+endif
4
9
5LIBTARGET = libidris_rts.a
10LIBTARGET = libidris_rts.a
6
11