mirror of
https://github.com/Ed94/Odin.git
synced 2026-06-17 19:32:23 -07:00
b539bb2693
missing darwin folder Co-authored-by: Laytan <laytanlaats@hotmail.com>
21 lines
473 B
Makefile
21 lines
473 B
Makefile
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/darwin
|
|
$(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
|