install prefix

This commit is contained in:
Venelin
2024-02-29 12:02:42 +02:00
parent c7f91096a8
commit 60ed428b06
2 changed files with 12 additions and 5 deletions
+8 -5
View File
@@ -1,20 +1,23 @@
#!/bin/sh #!/bin/sh
set -e set -e
# Install location
PREFIX=/usr/local
# Compile lib # Compile lib
options="-std=c++17 -Ofast -flto -march=native -DNDEBUG -Wall -Wextra -Wno-parentheses -Wno-unused-result -s -pipe" options="-std=c++17 -Ofast -flto -march=native -DNDEBUG -Wall -Wextra -Wno-parentheses -Wno-unused-result -s -pipe"
g++ -c $options commands.cpp childProcess.cpp g++ -c $options commands.cpp childProcess.cpp
# Create lib # Create lib
ar r libcppipe.a commands.o childProcess.o ar r libcppipe.a commands.o childProcess.o
mv libcppipe.a /usr/local/lib mv libcppipe.a ${PREFIX}/lib
rm commands.o childProcess.o rm commands.o childProcess.o
# Compile cppipe # Compile cppipe
g++ -o cppipe $options cppipe.cpp -lcppipe g++ -o cppipe $options cppipe.cpp -lcppipe
chmod 755 cppipe chmod 755 cppipe
mv cppipe /usr/local/bin mv cppipe ${PREFIX}/bin
# Add headers # Install headers
mkdir -p /usr/local/include/cppipe mkdir -p ${PREFIX}/include/cppipe
cp basicTypes.h commands.hpp childProcess.hpp /usr/local/include/cppipe cp basicTypes.h commands.hpp childProcess.hpp ${PREFIX}/include/cppipe
+4
View File
@@ -1,6 +1,10 @@
man
? ?
-Wno-unused-result in install.sh -Wno-unused-result in install.sh
split
Check all return codes and report errors Check all return codes and report errors
close files on destruction close files on destruction
make portable make portable
shaded obj shaded obj
uninstall