přidán Makefile - možnost sestavení bez Antu (nebo Mavenu) v_0
authorFrantišek Kučera <franta-hg@frantovo.cz>
Sat, 16 Dec 2023 14:14:40 +0100
branchv_0
changeset 36a7de67e6578c
parent 35 72ea1c6d836c
child 37 9abe4cd1f308
přidán Makefile - možnost sestavení bez Antu (nebo Mavenu)
java/rozsirene-atributy/Makefile
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/java/rozsirene-atributy/Makefile	Sat Dec 16 14:14:40 2023 +0100
     1.3 @@ -0,0 +1,46 @@
     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 +all: dist/rozsirene-atributy.jar
    1.20 +
    1.21 +.PHONY: all clean run run-binfmt
    1.22 +
    1.23 +clean:
    1.24 +	rm -rf build
    1.25 +	rm -rf dist
    1.26 +
    1.27 +SRC=$(shell find -name '*.java')
    1.28 +MAIN=cz.frantovo.rozsireneatributy.Startér
    1.29 +LAF=-Dswing.defaultlaf=javax.swing.plaf.nimbus.NimbusLookAndFeel
    1.30 +JAR=dist/rozsirene-atributy.jar
    1.31 +
    1.32 +build: $(SRC)
    1.33 +	mkdir -p build
    1.34 +	touch    build
    1.35 +	javac -d build $(SRC)
    1.36 +	cp \
    1.37 +		src/cz/frantovo/rozsireneatributy/*.properties \
    1.38 +		build/cz/frantovo/rozsireneatributy/
    1.39 +
    1.40 +$(JAR): build
    1.41 +	mkdir -p dist
    1.42 +	jar --create --file $(@) --main-class $(MAIN) -C build .
    1.43 +	chmod +x $(@)
    1.44 +
    1.45 +run: $(JAR)
    1.46 +	java $(LAF) -jar $(<) --soubor $(<)
    1.47 +
    1.48 +run-binfmt: $(JAR)
    1.49 +	$(<) --soubor $(<)