-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmakefile
31 lines (29 loc) · 875 Bytes
/
makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
P=Main
MAIN_CLASS=aplicacion.$(P)
SRC_DIR=./src
OUT_DIR=bin
LIB_DIR=./lib
DOC_DIR=html
JAR_FILE = $(P).jar
compilar:limpiar
mkdir $(OUT_DIR)
find $(SRC_DIR) -name *.java | xargs javac -cp $(OUT_DIR):$(LIB_DIR) -d $(OUT_DIR)
jar:compilar
jar cvfm $(JAR_FILE) manifest.txt -C $(OUT_DIR) .
ejecutar:compilar
java -cp $(OUT_DIR) $(MAIN_CLASS)
limpiar:
rm -rf $(OUT_DIR)
rm -rf $(DOC_DIR)
rm -f $(JAR_FILE)
javadoc:compilar
find . -type f -name "*.java" | xargs javadoc -d $(DOC_DIR) -encoding utf-8 -docencoding utf-8 -charset utf-8
debug: compilar
find $(SRC_DIR) -name *.java | xargs javac -g -cp $(OUT_DIR):$(LIB_DIR) -d $(OUT_DIR)
cd bin; jdb -sourcepath ../src
runjar: jar
@echo "Manifest-Version: 1.0" > manifest.txt
@echo "Main-Class:" $(MAIN_CLASS) >> manifest.txt
@echo "Class-Path: . ">> manifest.txt
@echo "" >> manifest.txt
java -jar $(JAR_FILE)