on v0.12.3 help sign in
Idris-dev/config.mk
48 lines 1.3 kB history raw
1ifneq (, $(findstring MSYS, $(shell uname -a)))
2 ifeq (cc,$(CC))
3 # In MSYS2, when using the mingw version of gcc, there is no cc -> gcc
4 # symlink. We can't use ?= here because CC is set implicitly to cc.
5 # Cross compiling users can set CC to their cross compiler.
6 CC =gcc
7 endif
8endif
10RANLIB ?=ranlib
12CABAL :=cabal
13# IDRIS_ENABLE_STATS should not be set in final release
14# Any flags defined here which alter the RTS API must also be added to src/IRTS/CodegenC.hs
15CFLAGS :=-O2 -Wall -DHAS_PTHREAD -DIDRIS_ENABLE_STATS $(CFLAGS)
17# CABALFLAGS :=
18CABALFLAGS += --enable-tests
19## Disable building of Effects
20#CABALFLAGS :=-f NoEffects $(CABALFLAGS)
23ifneq (, $(findstring bsd, $(MACHINE)))
24 GMP_INCLUDE_DIR :=
25else
26 GMP_INCLUDE_DIR :=-I/usr/local/include
27endif
29MACHINE := $(shell $(CC) -dumpmachine)
30ifneq (, $(findstring darwin, $(MACHINE)))
31 OS :=darwin
32else ifneq (, $(findstring cygwin, $(MACHINE)))
33 OS :=windows
34else ifneq (, $(findstring mingw, $(MACHINE)))
35 OS :=windows
36else ifneq (, $(findstring windows, $(MACHINE)))
37 OS :=windows
38else
39 OS :=unix
40endif
42ifeq ($(OS),darwin)
43 SHLIB_SUFFIX :=.dylib
44else ifeq ($(OS),windows)
45 SHLIB_SUFFIX :=.DLL
46else
47 SHLIB_SUFFIX :=.so
48endif