diff --git a/Makefile b/Makefile index 8ac6077..7b4b348 100755 --- a/Makefile +++ b/Makefile @@ -54,6 +54,16 @@ RTLIBS = OPTIONS_USER = endif +ifeq ($(UNAME), Darwin) +OPENSSL_PREFIX := $(shell brew --prefix openssl) +INCLUDE_SYS = -I bisonflex -I common/include -I spartanup/include -I versal/include -I versal_2ve_2vm/include -I zynq/include -I zynqmp/include -I utils/include -I lms-hash-sigs -I win_include +LIBS = -L $(OPENSSL_PREFIX)/lib -lssl -lcrypto +RTLIBS = +OPTIONS_USER = +INCLUDE_USER ?= -I $(OPENSSL_PREFIX)/include +endif + + INCLUDE = $(INCLUDE_USER) $(INCLUDE_SYS) OPTIONS = $(OPTIONS_USER) -lpthread @@ -83,7 +93,7 @@ ${OBJDIR}/%.${OBJ} : */src/%.c ${EXEC}: $(OBJECTS) echo Building executable file: $@... - cd ${LMS_HASH_DIR} && $(MAKE) ${LMS_LIB} + cd ${LMS_HASH_DIR} && $(MAKE) ${LMS_LIB} CFLAGS="$(INCLUDE)" ${CXX} $(CXXFLAGS) $(LDFLAGS) $(OPTIONS_USER) -o $@ $(OBJECTS) ${LMS_HASH_DIR}/${LMS_LIB} $(OPTIONS)$(LIBS) execs: ${EXEC} diff --git a/utils/src/cdo-alloc.c b/utils/src/cdo-alloc.c index 3d2cdc8..05a9603 100755 --- a/utils/src/cdo-alloc.c +++ b/utils/src/cdo-alloc.c @@ -18,7 +18,9 @@ #include #include #include +#ifndef __APPLE__ #include +#endif #include #include "cdo-alloc.h" diff --git a/utils/src/cdo-npi.c b/utils/src/cdo-npi.c index d357724..654c79e 100755 --- a/utils/src/cdo-npi.c +++ b/utils/src/cdo-npi.c @@ -18,7 +18,9 @@ #include #include #include +#ifndef __APPLE__ #include +#endif #include #include #include