Fix compilation under MacOSX

This commit is contained in:
Gabriele Gristina 2019-07-10 18:43:19 +02:00
commit 563050c8ba
6 changed files with 41 additions and 6 deletions

View file

@ -43,15 +43,13 @@ TARFLAGS = -C .. -rvf
# amount of shell command line parsing going on. echo "" on
# Windows yields literal "", on Linux yields an empty line
ifeq ($(shell echo ""),)
# This is probably a proper system, so we can use uname
UNAME := $(shell uname)
DELETE=rm -rf
MOVE=mv
COPY=cp
PATHSEP=/
FLASH_TOOL=client/flasher
DETECTED_OS=$(UNAME)
# This is probably a proper system, so we can use uname
DETECTED_OS=$(platform)
else
# Assume that we are running on Windows.

View file

@ -59,6 +59,8 @@ CFILES = $(filter %.c, $(mbedtls_SOURCES))
CMDOBJS = $(CFILES:%.c=%.o)
CLEAN = $(CMDOBJS)
platform = $(shell uname)
CC= gcc
CFLAGS= -O2 -Wall -Wno-unused-variable -Wno-unused-function
LDFLAGS= $(SYSLDFLAGS) $(mbedtls_LDFLAGS)
@ -66,8 +68,13 @@ LIBS= $(SYSLIBS) $(MYLIBS)
DEFAULT_INCLUDES = -I. -I..
DEFS = -DHAVE_STDINT_H
ifeq ($(platform),Darwin)
AR= /usr/bin/ar rcs
RANLIB= /usr/bin/ranlib
else
AR= ar rcs
RANLIB= ranlib
endif
RM= rm -f
TST= echo