treebird/test/Makefile
me@ow.nekobit.net 0b70dba7b8 Unit Test
FossilOrigin-Name: 675e4fefe4a49d87caba1b0a44ff9382eb7e5abe4cfe8e8a7863df4fbeccd82a
2022-04-08 02:05:09 +00:00

21 lines
584 B
Makefile

CC ?= cc
MASTODONT_DIR = mastodont-c/
MASTODONT = $(MASTODONT_DIR)libmastodont.a
CFLAGS += -Wall -I ../$(MASTODONT_DIR)include/ -Wno-unused-variable -Wno-discarded-qualifiers -I/usr/include/ $(shell pkg-config --cflags libcurl libcjson libpcre)
LDFLAGS = -L./../$(MASTODONT_DIR) -lmastodont $(shell pkg-config --libs libcjson libcurl libpcre) -lfcgi
TARGET = tests
SRC = unit/main.c
OBJ = $(patsubst %.c,%.o,$(SRC))
all: $(TARGET)
$(TARGET): $(OBJ)
$(CC) -o $(TARGET) $(OBJ) $(LDFLAGS)
%.o: %.c %.h
$(CC) $(CFLAGS) -c $< -o $@
clean:
rm -f $(TARGET) $(OBJ)
.PHONY: all clean