added cgmath, libanim, and libpsys
[andemo] / libs / psys / Makefile
diff --git a/libs/psys/Makefile b/libs/psys/Makefile
new file mode 100644 (file)
index 0000000..9d434ac
--- /dev/null
@@ -0,0 +1,28 @@
+src = $(wildcard *.c)
+obj = $(src:.c=.o)
+alib = ../unix/libpsys.a
+
+sys ?= $(shell uname -s | sed 's/MINGW.*/mingw/')
+ifeq ($(sys), mingw)
+       obj = $(src:.c=.w32.o)
+       alib = ../w32/libpsys.a
+endif
+ifeq ($(sys), android-arm64)
+       obj = $(src:.c=.arm64.o)
+       alib = ../android/libpsys.a
+endif
+
+CFLAGS = -O3 -ffast-math -fno-strict-aliasing -I..
+
+$(alib): $(obj)
+       $(AR) rcs $@ $(obj)
+
+%.arm64.o: %.c
+       $(CC) -o $@ $(CFLAGS) -c $<
+
+%.w32.o: %.c
+       $(CC) -o $@ $(CFLAGS) -c $<
+
+.PHONY: clean
+clean:
+       rm -f $(obj) $(alib)