on c7efd0a help sign in
Idris-dev/config.mk
47 lines 1.0 kB history raw
1CC ?=cc
2AR ?=ar
3RANLIB ?=ranlib
5CABAL :=cabal
6# IDRIS_ENABLE_STATS should not be set in final release
7# Any flags defined here which alter the RTS API must also be added to src/IRTS/CodegenC.hs
8CFLAGS :=-O2 -Wall -DHAS_PTHREAD -DIDRIS_ENABLE_STATS $(CFLAGS)
10#CABALFLAGS :=
11## Disable building of Effects
12#CABALFLAGS :=-f NoEffects
14ifneq (, $(findstring bsd, $(MACHINE)))
15 GMP_INCLUDE_DIR :=
16else
17 GMP_INCLUDE_DIR :=-I/usr/local/include
18endif
20MACHINE := $(shell $(CC) -dumpmachine)
21ifneq (, $(findstring darwin, $(MACHINE)))
22 OS :=darwin
23else
24ifneq (, $(findstring cygwin, $(MACHINE)))
25 OS :=windows
26else
27ifneq (, $(findstring mingw, $(MACHINE)))
28 OS :=windows
29else
30ifneq (, $(findstring windows, $(MACHINE)))
31 OS :=windows
32else
33 OS :=unix
34endif
35endif
36endif
37endif
39ifeq ($(OS),darwin)
40 SHLIB_SUFFIX :=.dylib
41else
42ifeq ($(OS),windows)
43 SHLIB_SUFFIX :=.DLL
44else
45 SHLIB_SUFFIX :=.so
46endif
47endif