Skip to content

Commit cc4b53b

Browse files
committed
build: add apisupport
1 parent 6a1e42c commit cc4b53b

2 files changed

Lines changed: 9 additions & 2 deletions

File tree

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@
2727
/libtool
2828
/stamp-h1
2929
# In-tree build, only top-level
30+
/apisupport-config.h
3031
/cpusupport-config.h
3132
# In-tree build, all directories
3233
.dirstamp

Makefile.am

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,7 @@ AM_CPPFLAGS= -I$(srcdir)/lib \
9393
-I$(srcdir)/libcperciva/crypto \
9494
-I$(srcdir)/libcperciva/util \
9595
-DCPUSUPPORT_CONFIG_FILE=\"cpusupport-config.h\" \
96+
-DAPISUPPORT_CONFIG_FILE=\"apisupport-config.h\" \
9697
-D_POSIX_C_SOURCE=200809L \
9798
-D_XOPEN_SOURCE=700 \
9899
${CFLAGS_POSIX}
@@ -105,10 +106,15 @@ scrypt_LDADD= libcperciva_aesni.la libcperciva_rdrand.la \
105106
${LDADD_POSIX}
106107
scrypt_man_MANS= scrypt.1
107108

109+
# apisupport needs to access post-configure info: lib-platform/platform.h,
110+
# config.h, and -DHAVE_CONFIG_H.
111+
apisupport-config.h:
112+
( export CC="${CC}"; export CFLAGS="-I${top_srcdir}/lib-platform -I${builddir} ${DEFS} ${CFLAGS}"; command -p sh $(srcdir)/libcperciva/apisupport/Build/apisupport.sh "$$PATH") > apisupport-config.h.tmp && command -p mv apisupport-config.h.tmp apisupport-config.h
108113
cpusupport-config.h:
109114
( export CC="${CC}"; export CFLAGS="${CFLAGS}"; command -p sh $(srcdir)/libcperciva/cpusupport/Build/cpusupport.sh "$$PATH") > cpusupport-config.h.tmp && command -p mv cpusupport-config.h.tmp cpusupport-config.h
110-
BUILT_SOURCES= cpusupport-config.h
111-
CLEANFILES= cpusupport-config.h cpusupport-config.h.tmp
115+
BUILT_SOURCES= apisupport-config.h cpusupport-config.h
116+
CLEANFILES= apisupport-config.h apisupport-config.h.tmp \
117+
cpusupport-config.h cpusupport-config.h.tmp
112118

113119
# Libraries from libcperciva code.
114120
noinst_LTLIBRARIES= libcperciva_aesni.la

0 commit comments

Comments
 (0)