APIHotel/Makefile

105 lines
3.5 KiB
Makefile
Raw Normal View History

2021-10-06 21:23:51 +02:00
# COMMANDES #
JAVAC = javac
# note $$ to get a single shell $
JAVAC_OPTIONS = -d build -cp build:$$CLASSPATH -implicit:none
JAVA = java
JAR = jar
EXEC_JAR = ${JAVA} -jar
# CHEMINS RELATIFS
SRC = src/fr/iutfbleau/projetIHM2021FI2
BUILD = build/fr/iutfbleau/projetIHM2021FI2
DOC = doc/fr/iutfbleau/projetIHM2021FI2
2021-10-06 21:23:51 +02:00
# CHOIX NOMS
JAR_MNP = test-mnp.jar
# BUTS FACTICES #
.PHONY : run clean doc
2021-10-06 21:23:51 +02:00
# BUT PAR DEFAUT #
run : ${JAR_MNP}
${EXEC_JAR} ${JAR_MNP}
2021-10-06 21:23:51 +02:00
# AUTRE BUTS
doc :
javadoc -d doc src/fr/iutfbleau/projetIHM2021FI2/API/*.java src/fr/iutfbleau/projetIHM2021FI2/MNP/*.java
2021-10-06 21:23:51 +02:00
clean :
rm -rf ${BUILD}/* *.jar
# REGLES DE DEPENDANCE #
## API ##
${BUILD}/API/MonPrint.class : ${SRC}/API/MonPrint.java
${JAVAC} ${JAVAC_OPTIONS} ${SRC}/API/MonPrint.java
2021-10-06 21:23:51 +02:00
${BUILD}/API/TypeChambre.class : ${SRC}/API/TypeChambre.java
${JAVAC} ${JAVAC_OPTIONS} ${SRC}/API/TypeChambre.java
${BUILD}/API/Chambre.class : ${SRC}/API/Chambre.java \
${BUILD}/API/TypeChambre.class\
${BUILD}/API/MonPrint.class
2021-10-06 21:23:51 +02:00
${JAVAC} ${JAVAC_OPTIONS} ${SRC}/API/Chambre.java
${BUILD}/API/Client.class : ${SRC}/API/Client.java \
${BUILD}/API/MonPrint.class
2021-10-06 21:23:51 +02:00
${JAVAC} ${JAVAC_OPTIONS} ${SRC}/API/Client.java
${BUILD}/API/Prereservation.class : ${SRC}/API/Prereservation.java \
${BUILD}/API/TypeChambre.class \
${BUILD}/API/Client.class
2021-10-06 21:23:51 +02:00
${JAVAC} ${JAVAC_OPTIONS} ${SRC}/API/Prereservation.java
${BUILD}/API/Reservation.class : ${SRC}/API/Reservation.java \
${BUILD}/API/Prereservation.class
${JAVAC} ${JAVAC_OPTIONS} ${SRC}/API/Reservation.java
${BUILD}/API/PrereservationFactory.class : ${SRC}/API/PrereservationFactory.java \
${BUILD}/API/Prereservation.class
${JAVAC} ${JAVAC_OPTIONS} ${SRC}/API/PrereservationFactory.java
${BUILD}/API/ReservationFactory.class : ${SRC}/API/ReservationFactory.java \
${BUILD}/API/Prereservation.class
${JAVAC} ${JAVAC_OPTIONS} ${SRC}/API/ReservationFactory.java
## MNP ##
${BUILD}/MNP/ClientNP.class : ${SRC}/MNP/ClientNP.java \
2021-10-06 21:23:51 +02:00
${BUILD}/API/Client.class
${JAVAC} ${JAVAC_OPTIONS} ${SRC}/MNP/ClientNP.java
${BUILD}/MNP/ChambreNP.class : ${SRC}/MNP/ChambreNP.java \
${BUILD}/API/Chambre.class
${JAVAC} ${JAVAC_OPTIONS} ${SRC}/MNP/ChambreNP.java
2021-10-06 21:23:51 +02:00
${BUILD}/MNP/PrereservationNP.class : ${SRC}/MNP/PrereservationNP.java \
2021-10-15 16:44:28 +02:00
${BUILD}/MNP/ClientNP.class \
${BUILD}/API/Prereservation.class
${JAVAC} ${JAVAC_OPTIONS} ${SRC}/MNP/PrereservationNP.java
2021-10-06 21:23:51 +02:00
${BUILD}/MNP/ReservationNP.class : ${SRC}/MNP/ReservationNP.java \
${BUILD}/API/Reservation.class
${JAVAC} ${JAVAC_OPTIONS} ${SRC}/MNP/ReservationNP.java
2021-10-15 16:44:28 +02:00
${BUILD}/MNP/PrereservationFactory.class : ${SRC}/API/PrereservationFactory.java
${JAVAC} ${JAVAC_OPTIONS} ${SRC}/MNP/PrereservationFactory.java
${BUILD}/MNP/PrereservationFactoryNP.class : ${SRC}/MNP/PrereservationFactoryNP.java \
${BUILD}/API/PrereservationFactory.class
${JAVAC} ${JAVAC_OPTIONS} ${SRC}/MNP/PrereservationFactoryNP.java
## TEST ##
2021-10-06 21:23:51 +02:00
${BUILD}/Test/TestTexteMNP.class : ${SRC}/Test/TestTexteMNP.java \
2021-10-15 16:44:28 +02:00
${BUILD}/MNP/PrereservationNP.class \
${BUILD}/MNP/PrereservationFactoryNP.class
${JAVAC} -Xlint:deprecation ${JAVAC_OPTIONS} ${SRC}/Test/TestTexteMNP.java
2021-10-06 21:23:51 +02:00
# ## JARS ##
${JAR_MNP} : ${BUILD}/Test/TestTexteMNP.class
${JAR} cvfe ${JAR_MNP} fr.iutfbleau.projetIHM2021FI2.Test.TestTexteMNP -C build fr
2021-10-06 21:23:51 +02:00