mirror of
https://github.com/Rockbox/rockbox.git
synced 2025-11-09 13:12:37 -05:00
On macOS we pass the full path to the compiler. On recent versions this causes the compiler to not find its SDK path, this needs to get passed via the isysroot option. Change-Id: Iea2820e1755cc80e12691119dfa31d70938ea511
45 lines
1.3 KiB
Makefile
45 lines
1.3 KiB
Makefile
# __________ __ ___.
|
|
# Open \______ \ ____ ____ | | _\_ |__ _______ ___
|
|
# Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
|
|
# Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
|
|
# Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
|
|
# \/ \/ \/ \/ \/
|
|
|
|
BUILD_DIR := build
|
|
TARGET_DIR := .
|
|
DEFINES =
|
|
CC ?= gcc
|
|
ifndef V
|
|
SILENT := @
|
|
endif
|
|
|
|
CFLAGS := -O3 -g -std=c99 -Wall $(DEFINES) -Isrc/headers
|
|
LDFLAGS :=
|
|
|
|
ifneq ($(ISYSROOT),)
|
|
CFLAGS += -isysroot $(ISYSROOT)
|
|
endif
|
|
|
|
SOURCES := \
|
|
src/ciphers/aes/aes.c src/ciphers/aes/aes_tab.c \
|
|
src/misc/crypt/crypt_argchk.c src/misc/crypt/crypt_register_cipher.c src/misc/crypt/crypt_cipher_is_valid.c src/misc/crypt/crypt_cipher_descriptor.c \
|
|
src/misc/zeromem.c src/misc/compare_testvector.c \
|
|
src/modes/cbc/cbc_start.c src/modes/cbc/cbc_decrypt.c src/modes/cbc/cbc_encrypt.c \
|
|
src/hashes/sha1.c
|
|
|
|
|
|
OBJS := $(addprefix $(BUILD_DIR)/,$(patsubst %.c,%.o,$(SOURCES)))
|
|
|
|
LIB := librbtomcrypt.a
|
|
|
|
$(LIB): $(OBJS)
|
|
$(info AR $(notdir $@))
|
|
$(SILENT)$(CROSS)$(AR) rcs $(TARGET_DIR)/$@ $^
|
|
|
|
$(BUILD_DIR)/%.o: %.c
|
|
$(info CC $(notdir $@))
|
|
$(SILENT)mkdir -p $(dir $@)
|
|
$(SILENT)$(CROSS)$(CC) $(CFLAGS) -c -o $@ $<
|
|
|
|
clean:
|
|
rm -fr $(BUILDDIR) $(LIB)
|