Files
old-tfm/apiv2/Makefile
2024-11-09 17:55:28 +01:00

19 lines
452 B
Makefile

CC = gcc
CFLAGS = -I. -I./include -I/opt/homebrew/include -I/usr/include -Wall $(shell pkg-config --cflags jansson)
SOURCES = src/main.c src/database.c mongoose.c sqlite3.c
OBJECTS = $(SOURCES:.c=.o)
TARGET = api_server
LIBS = -lpthread -ldl $(shell pkg-config --libs jansson)
.PHONY: all clean
all: $(TARGET)
$(TARGET): $(OBJECTS)
$(CC) $(CFLAGS) $(OBJECTS) -o $@ $(LIBS)
%.o: %.c
$(CC) $(CFLAGS) -c $< -o $@
clean:
rm -f $(OBJECTS) $(TARGET)