From fd090c6672ee85df16679e2e7c5ccc1908d6bbbf Mon Sep 17 00:00:00 2001 From: Gabriel Pariat Date: Sat, 27 Jan 2024 14:00:02 -0500 Subject: adding linux + unix makefile for cgltf --- vendor/cgltf/src/Makefile | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 vendor/cgltf/src/Makefile (limited to 'vendor/cgltf/src') diff --git a/vendor/cgltf/src/Makefile b/vendor/cgltf/src/Makefile new file mode 100644 index 000000000..d359c4739 --- /dev/null +++ b/vendor/cgltf/src/Makefile @@ -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 -- cgit v1.2.3