SAE_DEV_JAVA/makefile

37 lines
832 B
Makefile
Raw Normal View History

# Variables
SRC_DIR = src
BIN_DIR = bin
2024-06-06 20:26:49 +02:00
JAVAC = javac
JAVA = java
JAVADOC = javadoc
MAIN = com.charpentierbalocchi.dorfjavatik.view.FenetreDemarrage
2024-06-06 20:26:49 +02:00
# Compilation flags
JFLAGS = -d $(BIN_DIR) -sourcepath $(SRC_DIR)
2024-06-06 20:26:49 +02:00
# Default rule
all: compile
2024-06-06 20:26:49 +02:00
# Rule to compile the java files
compile:
@echo "Compiling Java source files..."
@mkdir -p $(BIN_DIR)
2024-06-06 20:26:49 +02:00
@$(JAVAC) $(JFLAGS) $(SRC_DIR)/com/charpentierbalocchi/dorfjavatik/**/*.java
2024-06-06 20:26:49 +02:00
# Rule to run the application
run: compile
@echo "Running the application..."
@$(JAVA) -cp $(BIN_DIR) $(MAIN)
2024-06-06 20:26:49 +02:00
# Rule to generate Javadoc
javadoc:
@echo "Generating Javadoc..."
@$(JAVADOC) -d $(BIN_DIR)/docs -sourcepath $(SRC_DIR) -subpackages com.charpentierbalocchi.dorfjavatik
2024-06-06 20:26:49 +02:00
# Rule to clean the project
clean:
@echo "Cleaning up..."
@rm -rf $(BIN_DIR)
2024-06-06 20:26:49 +02:00
.PHONY: all compile run javadoc clean