-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmakefile
More file actions
40 lines (28 loc) · 707 Bytes
/
makefile
File metadata and controls
40 lines (28 loc) · 707 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
39
40
PROJECT_NAME = climp
TARGET_DIR = target/release
INSTALL_DIR = /usr/local/bin
TEST_DIR = tests
EXECUTABLE = $(PROJECT_NAME)
RUSTC = rustc
all: build
build:
@echo "Building..."
@cargo build --release
@echo "Built"
install: build
@echo "Installing..."
@install -m 755 $(TARGET_DIR)/$(EXECUTABLE) $(INSTALL_DIR)
@echo "Installed"
@clean
test: clean-tests build
@echo "Running..."
@install -m 777 $(TARGET_DIR)/$(EXECUTABLE) $(TEST_DIR)
cd $(TEST_DIR) && python3.11 tests.py
clean:
@echo "Cleaning up..."
@cargo clean
@echo "Cleaned up"
clean-tests:
@echo "Cleaning up..."
@find $(TEST_DIR) -mindepth 1 -maxdepth 1 ! -name 'tests.py' -exec rm -rf {} +
.PHONY: all build install clean