forked from mitchgrout/TuataraTuringMachine
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmakefile
More file actions
58 lines (43 loc) · 1.25 KB
/
Copy pathmakefile
File metadata and controls
58 lines (43 loc) · 1.25 KB
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
# Compiler to use
CC=javac
# Directory to find source files
SOURCE_DIR=src
# Directory to find class files
BUILD_DIR=build
# Directory to find documentation HTML
DOCS_DIR=docs
# Directory to find images
IMG_DIR=images
# Directory to find HTML files
HTML_DIR=help
# Name of the main file
MAIN_FILE=tuataraTMSim.MainWindow
# Name of the .JAR file
FILE_JAR=TuataraTuringMachine.jar
# Default behaviour for make
all: gui
# Compile everything such that the GUI can be run, but do not archive.
gui:
mkdir -p $(BUILD_DIR)
$(CC) -d $(BUILD_DIR) `find $(SOURCE_DIR) -name "*.java"`
cp -r $(SOURCE_DIR)/tuataraTMSim/$(IMG_DIR) $(BUILD_DIR)/tuataraTMSim/$(IMG_DIR)
cp -r $(SOURCE_DIR)/tuataraTMSim/$(HTML_DIR) $(BUILD_DIR)/tuataraTMSim/$(HTML_DIR)
# Compile everything such that the GUI can be run, and archive the $(BUILD_DIR) directory
jar:
make gui
cd $(BUILD_DIR) && jar cvfe $(FILE_JAR) $(MAIN_FILE) `find .`
# Generate only javadoc documentation for the project
docs:
mkdir -p $(DOCS_DIR)
javadoc -private -d $(DOCS_DIR) `find $(SOURCE_DIR) -name "*.java"`
# Run the project
run:
cd $(BUILD_DIR) && java $(MAIN_FILE)
# Compile and run the project
compile-run:
make gui
make run
# Remove all .class files, .jar files
.PHONY: clean
clean:
rm -rf $(BUILD_DIR)