Add initial cython makefile.
This commit is contained in:
parent
605abaf177
commit
d629e8fb71
2 changed files with 24 additions and 0 deletions
3
.gitignore
vendored
3
.gitignore
vendored
|
@ -1 +1,4 @@
|
|||
__pycache__
|
||||
wp-cal-integration
|
||||
*.c
|
||||
*.o
|
||||
|
|
21
Makefile
Normal file
21
Makefile
Normal file
|
@ -0,0 +1,21 @@
|
|||
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 $@ $<
|
||||
|
Loading…
Reference in a new issue