wp-cal-integration/Makefile

21 lines
356 B
Makefile

CC ?= cc
CFLAGS ?= $(shell python-config --embed --cflags)
LDFLAGS ?= $(shell python-config --embed --ldflags)
SRC := main.py adapters/*.py
OBJ := $(SRC:%.py=%.o)
wp-cal-integration: $(OBJ)
$(CC) $(LDFLAGS) -o $@ $^
clean:
$(RM) $(OBJ)
main.c: main.py
cython -3 --embed -o $@ $<
%.c: %.py
cython -3 -o $@ $<
%.o: %.c
$(CC) -c $(CFLAGS) -o $@ $<