Make.lite: Proper detection Darwin/x86_64

- Use uname -m for Darwin/i386 platform
  (uname -p returns i386 on Mac OS)
- Darwin does have sys/param.h; allow correct flac_min/flac_max macro
  expansion

Signed-off-by: Erik de Castro Lopo <erikd@mega-nerd.com>
This commit is contained in:
Thomas Zander 2015-10-29 14:18:56 +01:00 committed by Erik de Castro Lopo
parent 20d721e66b
commit c9128ad6a1
1 changed files with 7 additions and 1 deletions

View File

@ -63,6 +63,12 @@ endif
ifeq ($(PROC),powerpc)
PROC := ppc
endif
# x64_64 Mac OS outputs 'i386' in uname -p; use uname -m instead
ifeq ($(PROC),i386)
ifeq ($(OS),Darwin)
PROC := $(shell uname -m)
endif
endif
ifeq ($(OS),Linux)
PROC := $(shell uname -m)
@ -93,7 +99,7 @@ VERSION=\"1.3.1\"
CONFIG_CFLAGS=$(CUSTOM_CFLAGS) -DHAVE_STDINT_H -DHAVE_INTTYPES_H -DHAVE_CXX_VARARRAYS -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64
ifeq ($(OS),Darwin)
CONFIG_CFLAGS += -DFLAC__SYS_DARWIN -arch $(PROC)
CONFIG_CFLAGS += -DFLAC__SYS_DARWIN -DHAVE_SYS_PARAM_H -arch $(PROC)
else
CONFIG_CFLAGS += -DHAVE_SOCKLEN_T
endif