Revision ca1f0d272a8cd9c3012f63ba9069d20af9a1d0d4 authored by Pierre-Yves Strub on 14 October 2020, 07:08:46 UTC, committed by Pierre-Yves Strub on 14 October 2020, 07:08:46 UTC
1 parent b34c174
Raw File
Makefile.system
# -*- Makefile -*-

# --------------------------------------------------------------------
OCAML    := $(shell ocamlbuild -which ocamlc 2>/dev/null || echo false)
CC       := gcc
TAR      := tar
MACHINE  := $(shell $(OCAML) -ccopt -dumpmachine dummy.c 2>/dev/null)
UNAME    := $(shell uname -s)
EXE      :=

ifneq (,$(findstring CYGWIN,$(UNAME)))
  CC := $(MACHINE)-gcc
endif

ifneq (,$(findstring Darwin,$(UNAME)))
  TAR := gtar
endif

ifneq (,$(findstring mingw,$(MACHINE)))
EXE := .exe
endif

ifneq (,$(findstring cygwin,$(MACHINE)))
EXE := .exe
endif
back to top