diff options
author | Andrew Turner <andrew@FreeBSD.org> | 2025-01-10 10:34:52 +0000 |
---|---|---|
committer | Andrew Turner <andrew@FreeBSD.org> | 2025-01-10 10:39:34 +0000 |
commit | 9d1de25930735261c16ed874a933b4c1f1d9041e (patch) | |
tree | b0cac1c933cc1ecb885c7e757b89ffbf13f1f012 /Makefile | |
parent | edc5c0de794f521eb620d2b6cbaee2434442a8f3 (diff) |
Diffstat (limited to 'Makefile')
-rw-r--r-- | Makefile | 16 |
1 files changed, 12 insertions, 4 deletions
@@ -1,6 +1,6 @@ # Makefile - requires GNU make # -# Copyright (c) 2018-2022, Arm Limited. +# Copyright (c) 2018-2024, Arm Limited. # SPDX-License-Identifier: MIT OR Apache-2.0 WITH LLVM-exception srcdir = . @@ -11,7 +11,6 @@ includedir = $(prefix)/include # Configure these in config.mk, do not make changes in this file. SUBS = math string networking -PLSUBS = math HOST_CC = cc HOST_CFLAGS = -std=c99 -O2 HOST_LDFLAGS = @@ -21,12 +20,22 @@ CPPFLAGS = CFLAGS = -std=c99 -O2 CFLAGS_SHARED = -fPIC CFLAGS_ALL = -Ibuild/include $(CPPFLAGS) $(CFLAGS) -CFLAGS_PL = -Ibuild/pl/include $(CPPFLAGS) $(CFLAGS) -DPL LDFLAGS = LDLIBS = AR = $(CROSS_COMPILE)ar RANLIB = $(CROSS_COMPILE)ranlib INSTALL = install +# Detect OS. +# Assume Unix environment: Linux, Darwin, or Msys. +OS := $(shell uname -s) +OS := $(patsubst MSYS%,Msys,$(OS)) +# Following math dependencies can be adjusted in config file +# if necessary, e.g. for Msys. +libm-libs = -lm +libc-libs = -lc +mpfr-libs = -lmpfr +gmp-libs = -lgmp +mpc-libs = -lmpc all: @@ -53,7 +62,6 @@ $(DIRS): mkdir -p $@ $(filter %.os,$(ALL_FILES)): CFLAGS_ALL += $(CFLAGS_SHARED) -$(filter %.os,$(ALL_FILES)): CFLAGS_PL += $(CFLAGS_SHARED) build/%.o: $(srcdir)/%.S $(CC) $(CFLAGS_ALL) -c -o $@ $< |