(FEA) Now you can compile Compound into a .so file!

This commit is contained in:
William
2024-06-06 02:56:57 +08:00
parent 54042cf2cf
commit 66c1d57188
3 changed files with 15 additions and 0 deletions

1
.gitignore vendored
View File

@@ -20,3 +20,4 @@ compile
.vscode/ .vscode/
todo todo
vsc* vsc*
libcompound.so

View File

@@ -2,6 +2,16 @@ cmake_minimum_required (VERSION 3.5)
project (Compound) project (Compound)
set(SHARED_SOURCE
Status/src/status.c
Utils/src/utils.c
Var/src/var.c
catlog.c)
set(LIBCOMPOUND_SOURCE ${SHARED_SOURCE})
add_library(compound SHARED ${LIBCOMPOUND_SOURCE})
add_compile_options(-g -std=c99 -Wall -Wextra -Wformat) add_compile_options(-g -std=c99 -Wall -Wextra -Wformat)
LINK_LIBRARIES(m) LINK_LIBRARIES(m)

View File

@@ -36,4 +36,8 @@ done
cp -v "common.h" "const.h" "platform.h"\ cp -v "common.h" "const.h" "platform.h"\
"name.h" "namescope.h" "type.h" "catlog.h"\ "name.h" "namescope.h" "type.h" "catlog.h"\
"attr.h" "registry.h" "class.h" "$DST" "attr.h" "registry.h" "class.h" "$DST"
echo "Installing libcompound:"
cp -v "libcompound.so" "/usr/lib"
printf "\nDone\n" printf "\nDone\n"