# HG changeset patch # User František Kučera # Date 1702732480 -3600 # Node ID a7de67e6578cb60fb2cfa5d06875d2077f3f0e07 # Parent 72ea1c6d836c2befbe500671ba99be86b0e79ffc přidán Makefile - možnost sestavení bez Antu (nebo Mavenu) diff -r 72ea1c6d836c -r a7de67e6578c java/rozsirene-atributy/Makefile --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/java/rozsirene-atributy/Makefile Sat Dec 16 14:14:40 2023 +0100 @@ -0,0 +1,46 @@ +# Rozšířené atributy – program na správu rozšířených atributů souborů +# Copyright © 2023 František Kučera (Frantovo.cz) +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, version 3 of the License. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . + +all: dist/rozsirene-atributy.jar + +.PHONY: all clean run run-binfmt + +clean: + rm -rf build + rm -rf dist + +SRC=$(shell find -name '*.java') +MAIN=cz.frantovo.rozsireneatributy.Startér +LAF=-Dswing.defaultlaf=javax.swing.plaf.nimbus.NimbusLookAndFeel +JAR=dist/rozsirene-atributy.jar + +build: $(SRC) + mkdir -p build + touch build + javac -d build $(SRC) + cp \ + src/cz/frantovo/rozsireneatributy/*.properties \ + build/cz/frantovo/rozsireneatributy/ + +$(JAR): build + mkdir -p dist + jar --create --file $(@) --main-class $(MAIN) -C build . + chmod +x $(@) + +run: $(JAR) + java $(LAF) -jar $(<) --soubor $(<) + +run-binfmt: $(JAR) + $(<) --soubor $(<)