M17_Implementations/SP5WWP/lib/Makefile

31 wiersze
501 B
Makefile

INC = -I ../include
TARGET = libm17.so
CFLAGS = $(INC) -fPIC -Wall -Wextra
LDFLAGS = -shared -lm
SRCS = $(wildcard *.c) $(wildcard */*.c)
OBJS = $(SRCS:.c=.o)
all: $(TARGET) clean
clean:
rm -f $(OBJS)
fclean:
rm -f $(TARGET)
test:
$(CC) $(CFLAGS) ../tests/unit_tests.c -o ../tests/unit_tests -lm -lunity -lm17
testrun:
./../tests/unit_tests
install:
sudo install $(TARGET) /usr/local/lib
$(TARGET): $(OBJS)
$(CC) $(CFLAGS) $(OBJS) -o $@ $(LDFLAGS)
.PHONY: all clean fclean