on ff7ea9d help sign in
Idris-dev/config.mk
46 lines 1.2 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 :=
18## Disable building of Effects
19#CABALFLAGS :=-f NoEffects
21ifneq (, $(findstring bsd, $(MACHINE)))
22 GMP_INCLUDE_DIR :=
23else
24 GMP_INCLUDE_DIR :=-I/usr/local/include
25endif
27MACHINE := $(shell $(CC) -dumpmachine)
28ifneq (, $(findstring darwin, $(MACHINE)))
29 OS :=darwin
30else ifneq (, $(findstring cygwin, $(MACHINE)))
31 OS :=windows
32else ifneq (, $(findstring mingw, $(MACHINE)))
33 OS :=windows
34else ifneq (, $(findstring windows, $(MACHINE)))
35 OS :=windows
36else
37 OS :=unix
38endif
40ifeq ($(OS),darwin)
41 SHLIB_SUFFIX :=.dylib
42else ifeq ($(OS),windows)
43 SHLIB_SUFFIX :=.DLL
44else
45 SHLIB_SUFFIX :=.so
46endif