Skip to content

Commit

Permalink
build: add apisupport
Browse files Browse the repository at this point in the history
  • Loading branch information
gperciva committed Apr 4, 2024
1 parent 6a1e42c commit cc4b53b
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
/libtool
/stamp-h1
# In-tree build, only top-level
/apisupport-config.h
/cpusupport-config.h
# In-tree build, all directories
.dirstamp
Expand Down
10 changes: 8 additions & 2 deletions Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,7 @@ AM_CPPFLAGS= -I$(srcdir)/lib \
-I$(srcdir)/libcperciva/crypto \
-I$(srcdir)/libcperciva/util \
-DCPUSUPPORT_CONFIG_FILE=\"cpusupport-config.h\" \
-DAPISUPPORT_CONFIG_FILE=\"apisupport-config.h\" \
-D_POSIX_C_SOURCE=200809L \
-D_XOPEN_SOURCE=700 \
${CFLAGS_POSIX}
Expand All @@ -105,10 +106,15 @@ scrypt_LDADD= libcperciva_aesni.la libcperciva_rdrand.la \
${LDADD_POSIX}
scrypt_man_MANS= scrypt.1

# apisupport needs to access post-configure info: lib-platform/platform.h,
# config.h, and -DHAVE_CONFIG_H.
apisupport-config.h:
( 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
cpusupport-config.h:
( 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
BUILT_SOURCES= cpusupport-config.h
CLEANFILES= cpusupport-config.h cpusupport-config.h.tmp
BUILT_SOURCES= apisupport-config.h cpusupport-config.h
CLEANFILES= apisupport-config.h apisupport-config.h.tmp \
cpusupport-config.h cpusupport-config.h.tmp

# Libraries from libcperciva code.
noinst_LTLIBRARIES= libcperciva_aesni.la
Expand Down

0 comments on commit cc4b53b

Please sign in to comment.