aboutsummaryrefslogtreecommitdiff
path: root/examples
diff options
context:
space:
mode:
Diffstat (limited to 'examples')
-rw-r--r--examples/commands/commands.tm2
-rw-r--r--examples/game/raylib.tm2
-rw-r--r--examples/http/http.tm2
-rw-r--r--examples/tomo-install/tomo-install.tm12
4 files changed, 13 insertions, 5 deletions
diff --git a/examples/commands/commands.tm b/examples/commands/commands.tm
index be18b776..70a2303b 100644
--- a/examples/commands/commands.tm
+++ b/examples/commands/commands.tm
@@ -1,7 +1,7 @@
# Functions for running system commands
use ./commands.c
-use libunistring.so
+use -lunistring
extern run_command:func(exe:Text, args:[Text], env:{Text,Text}, input:[Byte]?, output:&[Byte]?, error:&[Byte]? -> Int32)
extern command_by_line:func(exe:Text, args:[Text], env:{Text,Text} -> func(->Text?)?)
diff --git a/examples/game/raylib.tm b/examples/game/raylib.tm
index faa6f227..fc0affb9 100644
--- a/examples/game/raylib.tm
+++ b/examples/game/raylib.tm
@@ -1,5 +1,5 @@
# Raylib wrapper for some functions and structs
-use libraylib.so
+use -lraylib
use <raylib.h>
use <raymath.h>
diff --git a/examples/http/http.tm b/examples/http/http.tm
index 2555986f..12203faf 100644
--- a/examples/http/http.tm
+++ b/examples/http/http.tm
@@ -1,6 +1,6 @@
# A simple HTTP library built using CURL
-use libcurl.so
+use -lcurl
use <curl/curl.h>
struct HTTPResponse(code:Int, body:Text)
diff --git a/examples/tomo-install/tomo-install.tm b/examples/tomo-install/tomo-install.tm
index 0205c380..0a6c608d 100644
--- a/examples/tomo-install/tomo-install.tm
+++ b/examples/tomo-install/tomo-install.tm
@@ -61,14 +61,22 @@ func main(paths:[Path]):
curl @curl_flags @url | tar xz -C ~/.local/share/tomo/installed --strip-components=1 --one-top-level=@hash
echo @original_url > ~/.local/share/tomo/installed/@hash/source.url
tomo -L ~/.local/share/tomo/installed/@hash
- ln -f -s ../installed/@hash/lib@hash.so ~/.local/share/tomo/lib/lib@hash.so
+ if [ "`uname -s`" = "Darwin" ]; then
+ ln -f -s ../installed/@hash/lib@hash.dylib ~/.local/share/tomo/lib/lib@hash.dylib
+ else
+ ln -f -s ../installed/@hash/lib@hash.so ~/.local/share/tomo/lib/lib@hash.so
+ fi
`:get_output()!)
if alias:
say($Shell(
set -exuo pipefail
ln -f -s @hash ~/.local/share/tomo/installed/@alias
- ln -f -s lib@hash.so ~/.local/share/tomo/lib/lib@alias.so
+ if [ "`uname -s`" = "Darwin" ]; then
+ ln -f -s lib@hash.dylib ~/.local/share/tomo/lib/lib@alias.dylib
+ else
+ ln -f -s lib@hash.so ~/.local/share/tomo/lib/lib@alias.so
+ fi
):get_output()!)
say("$\[1]Installed $url!$\[]")