diff --git a/makefile b/makefile index 0c9d6ba..e84c74e 100644 --- a/makefile +++ b/makefile @@ -1,4 +1,4 @@ -.PHONY: all +.PHONY: all clean permissions # Define the target executable TARGET = JavaCrypt.jar @@ -10,7 +10,7 @@ SRC_DIR = javacrypt SRC_FILES = $(wildcard $(SRC_DIR)/*.java) # Define the compiler and flags -JAVAC = /usr/lib/jvm/default-java/bin/javac +JAVAC = /usr/bin/javac JAR = jar JAVAC_FLAGS = -Xlint:unchecked @@ -23,7 +23,14 @@ $(TARGET): $(SRC_FILES) @$(JAVAC) $(JAVAC_FLAGS) $(SRC_FILES) @echo "Creating the JAR archive..." @$(JAR) cfm $(TARGET) manifest.mf $(SRC_DIR)/*.class + +# Rule to clean up the build artifacts +clean: @echo "Cleaning up..." @rm -rf $(TARGET) $(SRC_DIR)/*.class @echo "Done!" +# Rule to set execution permissions for the JAR archive +permissions: + @echo "Setting execution permissions for the JAR archive..." + @chmod +x $(TARGET)