.PHONY: all doc test check install uninstall clean distclean

CLEANER = rm -f
MYSQL_CFLAGS := $(shell mysql_config --cflags)
MYSQL_LDFLAGS := $(shell mysql_config --libs_r)
CFLAGS += $(MYSQL_CFLAGS) -Wall
#LDFLAGS += -shared -nostartfiles -rdynamic $(MYSQL_LDFLAGS)
LDFLAGS += -shared $(MYSQL_LDFLAGS)

targets = libhello.so

all: $(targets)

libhello.so: libhello.o
	$(CC) $(LDFLAGS) -o $@ $<

libhello.o: libhello.c

clean:
	$(CLEANER) $(targets) *.o core.*
