1
0
mirror of https://github.com/libssh2/libssh2.git synced 2025-07-31 00:03:08 +03:00

build: unify source lists

- introduce `src/crypto.c` as an umbrella source that does nothing else
  than include the selected crypto backend source. Moving this job from
  the built-tool to the C preprocessor.

- this allows dropping the various techniques to pick the correct crypto
  backend sources in autotools, CMake and other build method. Including
  the per-backend `Makefile.<crypto-backend>.inc` makefiles.

- copy a trick from curl and instead of maintaining duplicate source
  lists for CMake, convert the GNU Makefile kept for autotools
  automatically. Do this in `docs`, `examples` and `src`.

  Ref: dfabe8bca2/CMakeLists.txt (L1399-L1413)

  Also fixes missing `libssh2_setup.h` from `src/CMakeFiles.txt` after
  59666e03f0.

- move `Makefile.inc` from root to `src`.

- reformat `src/Makefile.inc` to list each source in separate lines,
  re-align the continuation character and sort the lists alphabetically.

- update `docs/HACKING-CRYPTO` accordingly.

- autotools: update the way we add crypto-backends to `LIBS`.

- delete old CSV headers, indent, and merge two lines in
  `docs/Makefile.am` and `src/Makefile.am`.

- add `libssh2.pc` to `.gitignore`, while there.

Closes #941
This commit is contained in:
Viktor Szakats
2023-04-10 09:20:13 +00:00
parent e1e78e3670
commit 4f0f4bff5a
24 changed files with 124 additions and 327 deletions

View File

@ -78,7 +78,7 @@ fi
# Get source list.
cat ../Makefile.inc ../Makefile.os400qc3.inc |
cat Makefile.inc |
sed -e ':begin' \
-e '/\\$/{' \
-e 's/\\$/ /' \
@ -98,7 +98,7 @@ cat ../Makefile.inc ../Makefile.os400qc3.inc |
INCLUDES="'`pwd`'"
for SRC in "${TOPDIR}/os400/os400sys.c" "${TOPDIR}/os400/ccsid.c" \
${CSOURCES} ${CRYPTO_CSOURCES} macros.c
${CSOURCES} macros.c
do MODULE=`db2_name "${SRC}"`
make_module "${MODULE}" "${SRC}"
done