SAE_DEV_JAVA/makefile

37 lines
832 B
Makefile

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