Skip to content

Commit

Permalink
save
Browse files Browse the repository at this point in the history
  • Loading branch information
AskAlexSharov committed Dec 21, 2024
1 parent 7cade6f commit 93df9dc
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 6 deletions.
6 changes: 3 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,6 @@ cp:
cp mdbxdist/mdbx.h mdbx/
cp mdbxdist/mdbx.c mdbx/
#add 1 line to mdbx.h about build flags which we have in `mdbx.go`
echo "$(echo '#ifndef MDBX_BUILD_FLAGS'; cat mdbx/mdbx.h)" > mdbx/mdbx.h
echo "$(echo '#define MDBX_BUILD_FLAGS "-std=gnu11 -fvisibility=hidden -ffast-math"'; cat mdbx/mdbx.h)" > mdbx/mdbx.h
echo "$(echo '#endif'; cat mdbx/mdbx.h)" > mdbx/mdbx.h
sed -i "" '1{h;s/.*/#endif/;G;}' mdbx/mdbx.h
sed -i "" '1{h;s/.*/#define MDBX_BUILD_FLAGS "-std=gnu11 -fvisibility=hidden -ffast-math"/;G;}' mdbx/mdbx.h
sed -i "" '1{h;s/.*/#ifndef MDBX_BUILD_FLAGS/;G;}' mdbx/mdbx.h
5 changes: 2 additions & 3 deletions mdbx/mdbx.h
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
#ifndef MDBX_BUILD_FLAGS
#define MDBX_BUILD_FLAGS "-std=gnu11 -fvisibility=hidden -ffast-math"
#endif

#define MDBX_BUILD_FLAGS "-std=gnu11 -fvisibility=hidden -ffast-math"
#ifndef MDBX_BUILD_FLAGS
/**
_libmdbx_ (aka MDBX) is an extremely fast, compact, powerful, embeddable,
Expand Down

0 comments on commit 93df9dc

Please sign in to comment.