File: compile_shared.sh

package info (click to toggle)
easyloggingpp 9.97.0%2Bdfsg-1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, bullseye
  • size: 2,840 kB
  • sloc: cpp: 11,415; python: 2,336; sh: 337; makefile: 29
file content (14 lines) | stat: -rwxr-xr-x 596 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
#!/bin/sh
rm -rf libmyLib.so lib/libmyLib.so lib/mylib.o lib/myLib.a myLib.a myapp logs ## Clean

compiler=g++
standard=c++0x ## If this does not work try c++11 (depends on your compiler)
macros="-DELPP_THREAD_SAFE -DELPP_FEATURE_CRASH_LOG"  ## Macros for library

cd lib/
$compiler mylib.cpp ../../../../src/easylogging++.cc --std=$standard -pipe -fPIC -g -O0 $macros  -Iinclude  -c
$compiler -fPIC -g  -shared -o libmyLib.so mylib.o easylogging++.o

cp libmyLib.so ..
cd ..
$compiler -g -std=$standard -fPIC -pipe  -L lib myapp.cpp ../../../src/easylogging++.cc -Ilib/include -lmyLib  -o myapp