1# find the OS
2uname_S := $(shell sh -c 'uname -s 2>/dev/null || echo not')
3
4# Compile flags for linux / osx
5CFLAGS ?= -W -fno-common -g -ggdb -fPIC -std=gnu99 -O3
6
7SOURCEDIR = .
8CC_SOURCES = $(wildcard $(SOURCEDIR)/*.c)
9CC_OBJECTS = $(sort $(patsubst $(SOURCEDIR)/%.c, $(SOURCEDIR)/%.o, $(CC_SOURCES)))
10
11.SUFFIXES: .c .cc .o
12
13all: libtriemap.a
14
15
16libtriemap.a: $(CC_OBJECTS)
17	ar rcs $@ $^
18
19clean:
20	rm -rf *.o *.a
21