Skip to content

Commit

Permalink
fix: use clang instead of gcc on BSD
Browse files Browse the repository at this point in the history
  • Loading branch information
iWas-Coder committed Apr 13, 2024
1 parent bc912ea commit d5350b1
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 4 deletions.
5 changes: 5 additions & 0 deletions GNUmakefile
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,10 @@ ifeq ($(shell uname), Darwin)
CC = clang
MACOS_SPECIFIC_CFLAGS_OPTS = -x objective-c
MACOS_SPECIFIC_LDFLAGS_OPTS = -framework Cocoa -framework Carbon -framework CoreVideo -framework OpenGL -framework IOKit
else ifeq ($(shell uname), FreeBSD)
CC = clang
else ifeq ($(shell uname), OpenBSD)
CC = clang
endif
AR = ar -rc
ifdef Q_RSC
Expand Down Expand Up @@ -117,6 +121,7 @@ endif
define RAYLIB_CPPFLAGS
$(DISABLE_ASSERTS_OPTS) \
-D PLATFORM_DESKTOP \
-isystem /usr/local/$(HDR_DIR) \
-isystem /usr/X11R6/$(HDR_DIR) \
-isystem $(RAYLIB_SRC_DIR) \
-isystem $(RAYLIB_SRC_DIR)/external/glfw/$(HDR_DIR)
Expand Down
12 changes: 8 additions & 4 deletions README.org
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,7 @@ You should have received a copy of the GNU General Public License along with Spa
- [[#freebsd][FreeBSD]]
- [[#openbsd][OpenBSD]]
- [[#macos][macOS]]
- [[#compilation--linkage][Compilation & Linkage]]

* Project's Roadmap

Expand Down Expand Up @@ -156,7 +157,7 @@ git clone --recurse-submodules https://github.com/iWas-Coder/sparky
These are the packages needed to be able to build /Sparky/ from source, they are divided by distribution/package manager. Also, a command for each one is added to make the installation of these development dependencies as easy and straightforward as possible.

- ~make~
- ~gcc~
- ~gcc~ / ~clang~
- ~rust~
- ~jq~
- ~libX11~
Expand Down Expand Up @@ -192,18 +193,21 @@ sudo emerge -va make gcc rust-bin jq libX11 libXcursor libXrandr libXinerama lib
*** FreeBSD

#+begin_src sh
sudo pkg install gmake gcc rust jq libX11 libXcursor libXrandr libXinerama libXi
sudo pkg install gmake rust jq libX11 libXcursor libXrandr libXinerama libXi
#+end_src

*** OpenBSD

#+begin_src sh
sudo pkg_add gmake gcc rust jq
sudo ln -s /usr/local/bin/x86_64-unknown-openbsd*-gcc-* /usr/local/bin/gcc
sudo pkg_add gmake rust jq
#+end_src

*** macOS

#+begin_src sh
brew install rust jq
#+end_src

** Compilation & Linkage

(...)

0 comments on commit d5350b1

Please sign in to comment.