diff options
author | Adrian Thurston <thurston@colm.net> | 2021-11-27 21:17:26 +0000 |
---|---|---|
committer | Adrian Thurston <thurston@colm.net> | 2021-11-27 21:17:26 +0000 |
commit | fc61ecb3a22b89864916ec538eaf04840e7dd6b5 (patch) | |
tree | aa12da3d527d2533fbb819cd56f28ffd2a854b6a /src | |
parent | 0fc29d2aabb4878697d9f8221c3a5ec60fba9df2 (diff) | |
download | colm-fc61ecb3a22b89864916ec538eaf04840e7dd6b5.tar.gz |
fix: check enable_static and enable_shared and link libcolm appropriately
If --disable-static or --disable-shared is used, then pass this info to
compilation of main.cc and link with libcolm appropriately. Default to a static
as has been done for some time. refs adrian-thurston/ragel#70.
Diffstat (limited to 'src')
-rw-r--r-- | src/main.cc | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/main.cc b/src/main.cc index 301fae91..8ca395f0 100644 --- a/src/main.cc +++ b/src/main.cc @@ -485,7 +485,14 @@ void compileOutput( const char *argv0, const bool inSource, char *srcLocation ) " -I%s/../aapl" " -I%s/include" " -L%s" +#if defined(LINK_STATIC) " %s/libcolm.a", +#elif defined(LINK_SHARED) + " %s/libcolm.so", +#else +# error "must enabled at least one of shared or static libs" +#endif + binaryFn, intermedFn, srcLocation, srcLocation, location, location ); } |