FIProjetIHM2022/Makefile

54 lines
1.5 KiB
Makefile
Raw Permalink Normal View History

2022-11-15 20:03:04 +01:00
# Commandes
JAVAC = javac -encoding UTF-8
2022-11-15 20:03:04 +01:00
JAVA = java
2022-11-28 02:18:41 +01:00
JAR = $(JAVA) -jar
2022-11-15 20:03:04 +01:00
JAVADOC = javadoc
OPTION_DOCS = -d docs/
OPTION_COMPILE = -d build/ -cp "src/Test/libs/mariadb-connector.jar"
OPTION_DOCS = -d docs/ -cp "src/Test/libs/mariadb-connector.jar"
OPTION_EXE = -cp ".:Test/libs/mariadb-connector.jar" Test.TestTexteMNP
2022-12-07 16:36:22 +01:00
OPTION_EXE_A = -cp ".:Test/libs/mariadb-connector.jar" Test.MainAdmin
OPTION_EXE_P = -cp ".:Test/libs/mariadb-connector.jar" Test.MainProf
OPTION_EXE_S = -cp ".:Test/libs/mariadb-connector.jar" Test.MainStudent
2022-11-15 20:03:04 +01:00
RM = rm -rf
# Chemin
API = src/API
MNP = src/MNP
TEST = src/Test
BUILD = build
ALL = *.java
# Arguments
.PHONY: run clean docs
run:
2022-12-02 12:01:30 +01:00
$(RM) build/*
$(RM) docs/*
2022-11-15 20:03:04 +01:00
$(JAVAC) $(OPTION_COMPILE) $(API)/$(ALL) $(MNP)/$(ALL) $(TEST)/$(ALL)
2022-12-02 11:58:18 +01:00
cp -r src/Test/libs build/Test && cd build/ && $(JAVA) $(OPTION_EXE)
2022-11-15 20:03:04 +01:00
2022-12-07 16:36:22 +01:00
admin:
$(RM) build/*
$(RM) docs/*
$(JAVAC) $(OPTION_COMPILE) $(API)/$(ALL) $(MNP)/$(ALL) $(TEST)/$(ALL)
cp -r src/Test/libs build/Test && cd build/ && $(JAVA) $(OPTION_EXE_A)
student:
$(RM) build/*
$(RM) docs/*
$(JAVAC) $(OPTION_COMPILE) $(API)/$(ALL) $(MNP)/$(ALL) $(TEST)/$(ALL)
cp -r src/Test/libs build/Test && cd build/ && $(JAVA) $(OPTION_EXE_S)
prof:
$(RM) build/*
$(RM) docs/*
$(JAVAC) $(OPTION_COMPILE) $(API)/$(ALL) $(MNP)/$(ALL) $(TEST)/$(ALL)
cp -r src/Test/libs build/Test && cd build/ && $(JAVA) $(OPTION_EXE_P)
2022-11-15 20:03:04 +01:00
clean:
$(RM) build/*
$(RM) docs/*
docs:
2022-11-15 18:57:04 +01:00
$(JAVADOC) $(OPTION_DOCS) $(API)/$(ALL) $(MNP)/$(ALL) $(TEST)/$(ALL)