-
Notifications
You must be signed in to change notification settings - Fork 0
/
makefile
38 lines (25 loc) · 887 Bytes
/
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
# Makefile for compiling and running serial program
# Directories
SRC_DIR = src/serialAbelianSandpile
BIN_DIR = bin/serialAbelianSandpile
# Source files
JAVA_FILES = $(wildcard $(SRC_DIR)/*.java)
# Compiled class files
CLASS_FILES = $(patsubst $(SRC_DIR)/%.java, $(BIN_DIR)/%.class, $(JAVA_FILES))
# Compilation flags
JAVAC_FLAGS = -d bin -sourcepath src src/serialAbelianSandpile/*.java
# Main class
MAIN_CLASS = serialAbelianSandpile.AutomatonSimulation
# Default arguments (update these if needed)
ARGS ?= input/2000_by_2000_All_1.csv output/c.png # Replace 'default_arguments' with your specific default arguments, if any
# Targets
.PHONY: all clean run directories
all: directories $(CLASS_FILES)
directories:
@mkdir -p $(BIN_DIR)
$(BIN_DIR)/%.class: $(SRC_DIR)/%.java
javac $(JAVAC_FLAGS) $<
clean:
rm -rf bin/*
run: all
java -classpath bin $(MAIN_CLASS) $(ARGS)