Skip to content

Commit

Permalink
Conditionally change CFLAGS/LDFLAGS in two places
Browse files Browse the repository at this point in the history
  • Loading branch information
iamnotacake committed Oct 19, 2023
1 parent acd6140 commit 5b26048
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,14 @@ pkgconfigdir ?= $(libdir)/pkgconfig
CFLAGS += -I$(INC_PATH) -I$(SRC_PATH) -I$(SRC_PATH)/wrappers/themis/
LDFLAGS += -L$(BIN_PATH)

ifneq ($(ENGINE),boringssl)
# Not all platforms include /usr/local in default search path
CFLAGS += -I/usr/local/include
LDFLAGS += -L/usr/local/lib
# Build shared libraries
CFLAGS += -fPIC
endif

########################################################################
#
# Pretty-printing utilities
Expand Down Expand Up @@ -143,14 +151,14 @@ CRYPTO_ENGINE = $(SRC_PATH)/soter/$(CRYPTO_ENGINE_PATH)
CFLAGS += -D$(CRYPTO_ENGINE_DEF) -DCRYPTO_ENGINE_PATH=$(CRYPTO_ENGINE_PATH)
CFLAGS += $(CRYPTO_ENGINE_CFLAGS)


ifeq ($(ENGINE),boringssl)
# Basic compiler flags (lower priority than vendored boringssl)
# Not all platforms include /usr/local in default search path
CFLAGS += -I/usr/local/include
LDFLAGS += -L/usr/local/lib
# Build shared libraries
CFLAGS += -fPIC

endif

# If we're building for macOS and there's Homebrew installed then prefer
# Homebrew's OpenSSL instead of the system one by default.
Expand Down

0 comments on commit 5b26048

Please sign in to comment.