feat(hectic C): json api
This commit is contained in:
@@ -10,16 +10,29 @@ stdenv.mkDerivation {
|
||||
|
||||
buildPhase = ''
|
||||
mkdir -p target
|
||||
|
||||
echo "# Build library"
|
||||
${gcc}/bin/cc -Wall -Wextra -g \
|
||||
-pedantic -fsanitize=address hmpl.c \
|
||||
-std=c99 \
|
||||
-pedantic -fsanitize=address -c hmpl.c \
|
||||
-lchectic -lcjson \
|
||||
-o target/hmpl.o
|
||||
${gcc}/bin/ar rcs target/libhmpl.a target/hmpl.o
|
||||
|
||||
echo "# Build app"
|
||||
${gcc}/bin/cc -Wall -Wextra -g \
|
||||
-pedantic -fsanitize=address main.c \
|
||||
-Ltarget -lhmpl \
|
||||
-lchectic -lcjson -o target/hmpl
|
||||
'';
|
||||
|
||||
checkPhase = '' '';
|
||||
|
||||
installPhase = ''
|
||||
mkdir -p $out/bin
|
||||
mkdir -p $out/bin $out/lib $out/include
|
||||
cp target/hmpl $out/bin/hmpl
|
||||
cp target/libhmpl.a $out/lib/
|
||||
cp hmpl.h $out/include/hmpl.h
|
||||
'';
|
||||
|
||||
meta = {
|
||||
|
||||
Reference in New Issue
Block a user