about summary refs log tree commit diff stats
path: root/premake5.lua
diff options
context:
space:
mode:
Diffstat (limited to 'premake5.lua')
-rw-r--r--premake5.lua16
1 files changed, 11 insertions, 5 deletions
diff --git a/premake5.lua b/premake5.lua
index 8b2b18c..53ee6d2 100644
--- a/premake5.lua
+++ b/premake5.lua
@@ -45,9 +45,16 @@ project("Pong")
             links {RaylibStaticLibrary, "m", "pthread"}
         elseif(BSD_OS_NAME == "freebsd") then
             links {RaylibStaticLibrary, "m", "stdthreads"}
-        elseif(BSD_OS_NAME == "openbsd") then
-            print("Openbsd doesn't work currently due to lack of c11 threads support.")
+        elseif(BSD_OS_NAME == "OpenBSD\n") then
+	    
+	    -- Work around the fact openbsd doesn't have c11 threads.
+	    includedirs {"src/openbsd"}
+	    files {"src/openbsd/*.c", "src/openbsd/*.h"}
+
+	    -- Tell compiler where libraries are.
+	    libdirs {"/usr/local/lib"}
             links {RaylibStaticLibrary, "m", "pthread"}
+
         else
             print("Couldn't figure out BSD, assuming freebsd.")
             links {RaylibStaticLibrary, "m", "stdthreads"}
@@ -66,7 +73,7 @@ project("Pong")
         execute = function()
             os.executef("mkdir -p %s/Pong", prefix)
             os.executef("cp -rv resources/ %s/Pong/", prefix)
-            os.executef("install -Dvm755 bin/*/Pong %s/Pong/pong", prefix)
+            os.executef("install -Dm755 bin/*/Pong %s/Pong/pong", prefix)
         end
     }
 
@@ -83,6 +90,5 @@ project("Pong")
             os.executef("rm -rvf %s/.flatpak-builder", _MAIN_SCRIPT_DIR)
             os.executef("rm -rvf %s/build-dir", _MAIN_SCRIPT_DIR)
             os.executef("rm -vf %s/*.flatpak", _MAIN_SCRIPT_DIR)
-
         end
-    }
\ No newline at end of file
+    }