Skip to content

Commit

Permalink
Completed migrated to CMake for installation.
Browse files Browse the repository at this point in the history
  • Loading branch information
tfpf committed Sep 23, 2023
1 parent 356fa95 commit 2f23c2a
Show file tree
Hide file tree
Showing 7 changed files with 16 additions and 49 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/functest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,4 @@ jobs:
steps:
- uses: actions/checkout@v4
- run: ./install.sh
- run: make tests
- run: cd tests && make && ./tests
36 changes: 0 additions & 36 deletions Makefile

This file was deleted.

5 changes: 3 additions & 2 deletions benchmarks/Makefile
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
CXXFLAGS = -O3 -std=c++17 -Wall -Wextra
LDLIBS = -lhdrbg
CXXFLAGS = -O3 -std=c++17 -Wall -Wextra $(shell pkg-config --cflags hdrbg)
LDFLAGS = $(shell pkg-config --libs-only-L hdrbg)
LDLIBS = $(shell pkg-config --libs-only-l hdrbg)

benchmarks:
4 changes: 3 additions & 1 deletion examples/C++/Makefile
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
LDLIBS = -lhdrbg
CFLAGS = $(shell pkg-config --cflags hdrbg)
LDFLAGS = $(shell pkg-config --libs-only-L hdrbg)
LDLIBS = $(shell pkg-config --libs-only-l hdrbg)

Sources = $(wildcard *.cc)
Executables = $(Sources:.cc=)
Expand Down
4 changes: 3 additions & 1 deletion examples/C/Makefile
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
LDLIBS = -lhdrbg
CFLAGS = $(shell pkg-config --cflags hdrbg)
LDFLAGS = $(shell pkg-config --libs-only-L hdrbg)
LDLIBS = $(shell pkg-config --libs-only-l hdrbg)

Sources = $(wildcard *.c)
Executables = $(Sources:.c=)
Expand Down
9 changes: 3 additions & 6 deletions install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,6 @@ then
git clone https://github.com/tfpf/hash-drbg.git $target
cd $target
fi
os=$(uname 2>/dev/null)
printf "Detected: '$os'\n"
case $os in
(MINGW* | MSYS*) make --jobs=4 "$@" install;;
(Linux | Darwin) sudo make --jobs=4 "$@" install;;
esac
mkdir -p build && cd build
cmake ..
sudo make --jobs=4 install
5 changes: 3 additions & 2 deletions tests/Makefile
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
CFLAGS = -std=c17 -O2 -Wall -Wextra
LDLIBS = -lhdrbg
CFLAGS = -std=c17 -O2 -Wall -Wextra $(shell pkg-config --cflags hdrbg)
LDFLAGS = $(shell pkg-config --libs-only-L hdrbg)
LDLIBS = $(shell pkg-config --libs-only-l hdrbg)

tests:

0 comments on commit 2f23c2a

Please sign in to comment.