mirror of
https://github.com/odin-lang/Odin.git
synced 2026-06-07 19:14:19 +00:00
adding linux + unix makefile for cgltf
This commit is contained in:
20
vendor/cgltf/src/Makefile
vendored
Normal file
20
vendor/cgltf/src/Makefile
vendored
Normal file
@@ -0,0 +1,20 @@
|
||||
OS=$(shell uname)
|
||||
|
||||
ifeq ($(OS), Darwin)
|
||||
all: darwin
|
||||
else
|
||||
all: unix
|
||||
endif
|
||||
|
||||
unix:
|
||||
mkdir -p ../lib
|
||||
$(CC) -c -O2 -Os -fPIC cgltf.c
|
||||
$(AR) rcs ../lib/cgltf.a cgltf.o
|
||||
rm *.o
|
||||
|
||||
darwin:
|
||||
mkdir -p ../lib
|
||||
$(CC) -arch x86_64 -c -O2 -Os -fPIC cgltf.c -o cgltf-x86_64.o -mmacosx-version-min=10.12
|
||||
$(CC) -arch arm64 -c -O2 -Os -fPIC cgltf.c -o cgltf-arm64.o -mmacosx-version-min=10.12
|
||||
lipo -create cgltf-x86_64.o cgltf-arm64.o -output ../lib/darwin/cgltf.a
|
||||
rm *.o
|
||||
Reference in New Issue
Block a user