wp-cal-integration/Makefile

22 lines
356 B
Makefile
Raw Normal View History

2022-11-23 02:00:36 +01:00
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 $@ $<