6f34ca3a1231fbe8c23c7c6f40a303f7ab69a8e2
[andemo] / libs / anim / Makefile
1 obj = anim.o track.o dynarr.o
2 lib = ../unix/libanim.a
3
4 sys ?= $(shell uname -s | sed 's/MINGW.*/mingw/')
5 ifeq ($(sys), mingw)
6         obj = anim.w32.o track.w32.o dynarr.w32.o
7         lib = ../w32/libanim.a
8 endif
9 ifeq ($(sys), android-arm64)
10         obj = anim.arm64.o track.arm64.o dynarr.arm64.o
11         lib = ../android64/libanim.a
12         pic = -fPIC
13 endif
14 ifeq ($(sys), android-arm32)
15         obj = anim.arm32.o track.arm32.o dynarr.arm32.o
16         lib = ../android32/libanim.a
17         pic = -fPIC
18 endif
19
20 CFLAGS = -g -ffast-math -fno-strict-aliasing $(pic) -I..
21
22 $(lib): $(obj)
23
24 $(lib): $(obj)
25         $(AR) rcs $@ $(obj)
26
27 %.arm64.o: %.c
28         $(CC) -o $@ $(CFLAGS) -c $<
29
30 %.arm32.o: %.c
31         $(CC) -o $@ $(CFLAGS) -c $<
32
33 %.w32.o: %.c
34         $(CC) -o $@ $(CFLAGS) -c $<
35
36 .PHONY: clean
37 clean:
38         rm -f $(obj) $(lib)