-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
38 lines (28 loc) · 862 Bytes
/
Copy pathMakefile
File metadata and controls
38 lines (28 loc) · 862 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
CC = gcc
CFLAGS = -Wall -Wextra -std=c99 -I./include
LDFLAGS = -L./target/release -lpython_gc -Wl,-rpath,./target/release
.PHONY: all clean test build-rust
all: build-rust test_c_integration
build-rust:
cargo build --release
test_c_integration: tests/test_c_integration.c
$(CC) $(CFLAGS) -o test_c_integration tests/test_c_integration.c $(LDFLAGS)
test_production_features: tests/test_production_features.c
$(CC) $(CFLAGS) -o test_production_features tests/test_production_features.c $(LDFLAGS)
test: test_c_integration
./test_c_integration
clean:
rm -f test_c_integration
cargo clean
build: build-rust test_c_integration
test-all: test
cargo test
info:
@echo "Rust library:"
@ls -la target/release/libpython_gc.*
@echo ""
@echo "C header:"
@ls -la include/python_gc.h
@echo ""
@echo "C test program:"
@ls -la tests/test_c_integration.c