| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879 | include ../src/Makefile.HostCC	= gccAR	= ar rcsCFLAGS	= -Wall -fPIC -O2 -std=gnu99 -fgnu89-inline -U_FORTIFY_SOURCE \	  -fno-omit-frame-pointer \	  -fno-stack-protector -fno-builtinARFLAGS	=include ../src/host/$(PAL_HOST)/Makefile.amCFLAGS += -I. -I../include -I../src# Include host_endian.h from either the host-specific directory,# or directly under the target directory.ifeq ($(target),)CFLAGS += -I../src/host/$(PAL_HOST)elseCFLAGS += -I$(target)endifsubdirs = string stdlib network graphene util cryptoheaders = api.h pal_crypto.h# Choose Crypto provider among (mbedtls|wolfssl)CRYPTO_PROVIDER ?= mbedtls# Select which crypto adpater you want to use here. This has to match# the #define in pal_crypto.h.## Unfortunately, we cannot use just one .c file for the adapter. The LibOS# shim links against the crypto library, but it doesn't use Diffie-Hellman.# If the Diffie-Hellman stubs are in the same .o file as the SHA1 stubs,# this pulls Diffie-Hellman code into LibOS shim, resulting in unsatisfied# symbols.ifeq ($(CRYPTO_PROVIDER),mbedtls)subdirs += crypto/mbedtlsheaders += $(wildcard crypto/mbedtls/mbedtls/*.h)endififeq ($(CRYPTO_PROVIDER),wolfssl)subdirs += crypto/wolfsslheaders += $(wildcard crypto/wolfssl/*.h)endifobjs	= $(foreach dir,$(subdirs),$(patsubst %.c,%.o,$(wildcard $(dir)/*.c)))ifeq ($(CRYPTO_PROVIDER),mbedtls)CFLAGS += -DCRYPTO_USE_MBEDTLSobjs += crypto/adapters/mbedtls_adapter.oobjs += crypto/adapters/mbedtls_dh.oendififeq ($(CRYPTO_PROVIDER),wolfssl)CFLAGS += -DCRYPTO_USE_WOLFSSLobjs += crypto/adapters/wolfssl_adapter.oobjs += crypto/adapters/wolfssl_dh.oendif.PHONY: allall: $(target)graphene-lib.aifeq ($(DEBUG),1)CC += -gCFLAGS += -DDEBUGendif$(target)graphene-lib.a: $(addprefix $(target),$(objs))	@echo [ $(notdir $@) ]	@mkdir -p $(dir $@)	@$(AR) $(ARFLAGS) $@ $^$(target)%.o: %.c $(headers)	@echo [ $(notdir $@) ]	@mkdir -p $(dir $@)	@$(CC) $(CFLAGS) -c $< -o $@.PHONY: cleanclean:	rm -f $(objs) graphene-lib.a
 |