-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathMakefile
More file actions
32 lines (22 loc) · 726 Bytes
/
Copy pathMakefile
File metadata and controls
32 lines (22 loc) · 726 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
include config.mk
all: $(EXEC)
$(OBJ_DIR)/%.o: $(SRC_DIR)/%.cpp
@mkdir -p $(dir $@)
$(CXX) $(CXXFLAGS) -MMD -MP -c $< -o $@
$(EXEC): $(OBJECTS)
@echo "Linking: $@"
$(CXX) $(OBJECTS) -o $@ $(LDFLAGS)
clean:
rm -rf build debug release
run: $(EXEC)
@$(EXEC) build zura_files/main.zu -save $(if $(findstring debug,$(BUILD)),-debug) -name main
valgrind: $(EXEC)
valgrind --leak-check=full --show-leak-kinds=all --track-origins=yes \
--log-file=valgrind-out.txt $(EXEC) build zura_files/main.zu -name main
install: $(EXEC)
@echo "Installing to $(INSTALL_DIR)"
@install -Dm755 $(EXEC) $(INSTALL_DIR)/zura
test: $(EXEC)
@python3 run_tests.py
-include $(OBJECTS:.o=.d)
.PHONY: all clean run valgrind install test