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