]> begriffs open source - libderp/blob - configure
Split dev/use installers
[libderp] / configure
1 #!/bin/sh
2 set -eu
3
4 rm -f config.mk
5
6 cat > config.mk <<-EOF
7         VER=\`(cat VERSION)\`
8         MAJOR=\`(cut -d . -f 1 VERSION)\`
9         MINOR=\`(cut -d . -f 2 VERSION)\`
10 EOF
11
12 # mac...think different :(
13 if [ "$(uname -s)" = Darwin ]
14 then
15         cat >> config.mk <<-EOF
16                 SO = dylib
17                 SOFLAGS = -dynamiclib -install_name "libderp.\${MAJOR}.dylib" -current_version \${VER} -compatibility_version \${MAJOR}.\${MINOR}.0
18         EOF
19 else
20         cat >> config.mk <<-EOF
21                 SO = so
22                 SOFLAGS = -shared -Wl,-soname,libderp.so.\${MAJOR}.\${MINOR}
23         EOF
24 fi