Makefile
branchv_0
changeset 39 ec0e970e0830
parent 36 a7de67e6578c
child 44 c43c96b0ab1b
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/Makefile	Sat Dec 16 20:13:13 2023 +0100
     1.3 @@ -0,0 +1,45 @@
     1.4 +# Rozšířené atributy – program na správu rozšířených atributů souborů
     1.5 +# Copyright © 2023 František Kučera (Frantovo.cz)
     1.6 +#
     1.7 +# This program is free software: you can redistribute it and/or modify
     1.8 +# it under the terms of the GNU General Public License as published by
     1.9 +# the Free Software Foundation, version 3 of the License.
    1.10 +#
    1.11 +# This program is distributed in the hope that it will be useful,
    1.12 +# but WITHOUT ANY WARRANTY; without even the implied warranty of
    1.13 +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
    1.14 +# GNU General Public License for more details.
    1.15 +#
    1.16 +# You should have received a copy of the GNU General Public License
    1.17 +# along with this program. If not, see <http://www.gnu.org/licenses/>.
    1.18 +
    1.19 +SRC=$(shell find src -name '*.java')
    1.20 +MAIN=cz.frantovo.rozsireneatributy.Startér
    1.21 +LAF=-Dswing.defaultlaf=javax.swing.plaf.nimbus.NimbusLookAndFeel
    1.22 +VERSION=0.1-SNAPSHOT
    1.23 +JAR=target/rozsirene-atributy-$(VERSION).jar
    1.24 +
    1.25 +all: $(JAR)
    1.26 +
    1.27 +.PHONY: all clean run run-binfmt
    1.28 +
    1.29 +clean:
    1.30 +	rm -rf target
    1.31 +
    1.32 +target/classes: $(SRC)
    1.33 +	mkdir -p target/classes
    1.34 +	touch    target/classes
    1.35 +	javac -d target/classes $(SRC)
    1.36 +	cp \
    1.37 +		src/main/resources/cz/frantovo/rozsireneatributy/*.properties \
    1.38 +		target/classes/cz/frantovo/rozsireneatributy/
    1.39 +
    1.40 +$(JAR): target/classes
    1.41 +	jar --create --file $(@) --main-class $(MAIN) -C target/classes .
    1.42 +	chmod +x $(@)
    1.43 +
    1.44 +run: $(JAR)
    1.45 +	java $(LAF) -jar $(<) --soubor $(<)
    1.46 +
    1.47 +run-binfmt: $(JAR)
    1.48 +	$(<) --soubor $(<)