CC ?=		cc
CFLAGS ?=	-O2 -pipe
RM ?=		rm -f
TARGET_LIB ?=	libatomstb.so
SRCS =		atomstb.c
MAJOR ?=	0
MINOR ?=	0

.PHONY: all
all: $(TARGET_LIB)

$(TARGET_LIB): atomstb.o
	$(CC) $(LDFLAGS) -shared -o $(TARGET_LIB).$(MAJOR).$(MINOR) atomstb.o

atomstb.o:
	$(CC) $(CFLAGS) -c -fPIC -Wall -Werror $(SRCS)

.PHONY: clean
clean:
	$(RM) $(TARGET_LIB).* atomstb.o
