CC ?= cc
CFLAGS ?= -O2 -g
CFLAGS += -std=c11 -Wall -Wextra -Wpedantic -Werror -fPIC
.PHONY: all test clean
all: libhspsocket.so
libhspsocket.so: hspsocket.c hspsocket.h
	$(CC) $(CPPFLAGS) $(CFLAGS) -shared $(LDFLAGS) -Wl,-z,defs -o $@ hspsocket.c
test: libhspsocket.so
	python3 test_socket.py
clean:
	rm -f libhspsocket.so *.ax
