-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
65 lines (53 loc) · 1.44 KB
/
Makefile
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
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
# Makefile
# Ondřej Míchal <xmicha80>, Marek Filip <xfilip46>
# FIT BUT
# 24/09/2020
export SHELL := /usr/bin/env sh
export NAME = ifj20compiler
export ZIPNAME = xfilip46.zip
export PROJECT_DIR := $(shell pwd)
export BUILD_DIR := $(PROJECT_DIR)/build
export BIN_DIR := $(BUILD_DIR)/bin
export OBJECTS_DIR := $(BUILD_DIR)/objects
export TARGET := $(BIN_DIR)/$(NAME)
export ASSIGNMENT_FILES := rozsireni rozdeleni dokumentace.pdf
.PHONY: all run testunit test2e2 docs zip clean help
all:
@mkdir -p $(BUILD_DIR) $(BIN_DIR) $(OBJECTS_DIR)
$(MAKE) -C src
run:
@$(TARGET)
testunit: all
$(MAKE) -C tests/unit
@./build/bin/ifj20compiler-tests
teste2e: all
@bats ./tests/e2e
docs:
@cd docs; doxygen ./Doxyfile
zip:
@mkdir -p $(BUILD_DIR)
@cp $(ASSIGNMENT_FILES) src/
@cd src; zip $(ZIPNAME) $(ASSIGNMENT_FILES) ./*.c ./*.h ./Makefile; mv $(ZIPNAME) ../
@cd src; rm $(ASSIGNMENT_FILES)
clean:
@rm -f $(ZIPNAME)
@rm -f -r $(BUILD_DIR)
@rm -f src/$(NAME) src/*.o
@rm -rf docs/html docs/latex
help:
@echo "make"
@echo " Execute 'make all' command."
@echo "make all"
@echo " Build the project."
@echo "make run"
@echo " Run the program."
@echo "make test"
@echo " Build and test the project."
@echo "make docs"
@echo " Generate documentation using doxygen"
@echo "make zip"
@echo " Create a zip file with the project."
@echo "make clean"
@echo " Remove all unneeded files."
@echo "make help"
@echo " Show this screen."