Skip to content

Commit

Permalink
fixed bugs in macos building
Browse files Browse the repository at this point in the history
  • Loading branch information
ColleagueRiley committed Oct 22, 2023
1 parent f1a47d7 commit 5e67b41
Show file tree
Hide file tree
Showing 3 changed files with 3,086 additions and 10 deletions.
2 changes: 0 additions & 2 deletions .github/workflows/macos.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,5 @@ jobs:

steps:
- uses: actions/checkout@v3
- name: silicon-binaries
run: git clone https://github.com/ColleagueRiley/Silicon -b binaries && cp Silicon/ARM/*.o example/ext/Silicon/
- name: make
run: cd example && make
9 changes: 1 addition & 8 deletions example/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -11,24 +11,17 @@ ifeq ($(detected_OS),Windows)
LIBS := -lopengl32 -lshell32 -lgdi32 -lm
endif
ifeq ($(detected_OS),Darwin) # Mac OS X
LIBS := -I./ext/Silicon/ ./ext/Silicon/*.o -lm -framework Foundation -framework AppKit -framework OpenGL -framework CoreVideo -w
LIBS := -I./ext/Silicon/ -lm -framework Foundation -framework AppKit -framework OpenGL -framework CoreVideo -w
endif
ifeq ($(detected_OS),Linux)
LIBS := -I./include -lX11 -lGLX -lm -lGL
endif

all:
@if [ $(shell uname) = Darwin ]; then\
make ext/Silicon/mac.o;\
fi

make gl
make gl3
make rlgl

ext/Silicon/mac.o:
cd ext/Silicon/ && gcc -c *.m

gl:
gcc main.c $(LIBS) -I./ext -I../ -D RFONT_RENDER_LEGACY -Wall -o gl
rlgl:
Expand Down
Loading

0 comments on commit 5e67b41

Please sign in to comment.