mirror of
https://github.com/idris-lang/Idris2.git
synced 2024-12-29 14:44:03 +03:00
b2ce91fec4
The latest Github Actions windows image contains msys2 so use that. Also use gcc that comes with the image to save downloading clang. Skip Racket as it's slow enough already.
46 lines
886 B
Makefile
46 lines
886 B
Makefile
##### Options which a user might set before building go here #####
|
|
|
|
PREFIX ?= $(HOME)/.idris2
|
|
|
|
CC ?= clang
|
|
|
|
##################################################################
|
|
|
|
RANLIB ?= ranlib
|
|
AR ?= ar
|
|
|
|
CFLAGS := -Wall $(CFLAGS)
|
|
LDFLAGS := $(LDFLAGS)
|
|
|
|
MACHINE := $(shell $(CC) -dumpmachine)
|
|
ifneq (,$(findstring cygwin, $(MACHINE)))
|
|
OS := windows
|
|
SHLIB_SUFFIX := .dll
|
|
else ifneq (,$(findstring mingw, $(MACHINE)))
|
|
OS := windows
|
|
SHLIB_SUFFIX := .dll
|
|
else ifneq (,$(findstring windows, $(MACHINE)))
|
|
OS := windows
|
|
SHLIB_SUFFIX := .dll
|
|
else ifneq (,$(findstring darwin, $(MACHINE)))
|
|
OS := darwin
|
|
SHLIB_SUFFIX := .dylib
|
|
CFLAGS += -fPIC
|
|
else ifneq (, $(findstring bsd, $(MACHINE)))
|
|
OS := bsd
|
|
SHLIB_SUFFIX := .so
|
|
CFLAGS += -fPIC
|
|
else
|
|
OS := linux
|
|
SHLIB_SUFFIX := .so
|
|
CFLAGS += -fPIC
|
|
endif
|
|
|
|
export OS
|
|
|
|
ifeq ($(OS),bsd)
|
|
MAKE := gmake
|
|
else
|
|
MAKE := make
|
|
endif
|