Makefile
author František Kučera <franta-hg@frantovo.cz>
Tue, 19 Dec 2023 00:47:41 +0100
branchv_0
changeset 41 64e564c2f069
parent 39 ec0e970e0830
child 44 c43c96b0ab1b
permissions -rw-r--r--
buňky tabulky editovatelné po stisku mezerníku
franta-hg@36
     1
# Rozšířené atributy – program na správu rozšířených atributů souborů
franta-hg@36
     2
# Copyright © 2023 František Kučera (Frantovo.cz)
franta-hg@36
     3
#
franta-hg@36
     4
# This program is free software: you can redistribute it and/or modify
franta-hg@36
     5
# it under the terms of the GNU General Public License as published by
franta-hg@36
     6
# the Free Software Foundation, version 3 of the License.
franta-hg@36
     7
#
franta-hg@36
     8
# This program is distributed in the hope that it will be useful,
franta-hg@36
     9
# but WITHOUT ANY WARRANTY; without even the implied warranty of
franta-hg@36
    10
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
franta-hg@36
    11
# GNU General Public License for more details.
franta-hg@36
    12
#
franta-hg@36
    13
# You should have received a copy of the GNU General Public License
franta-hg@36
    14
# along with this program. If not, see <http://www.gnu.org/licenses/>.
franta-hg@36
    15
franta-hg@39
    16
SRC=$(shell find src -name '*.java')
franta-hg@39
    17
MAIN=cz.frantovo.rozsireneatributy.Startér
franta-hg@39
    18
LAF=-Dswing.defaultlaf=javax.swing.plaf.nimbus.NimbusLookAndFeel
franta-hg@39
    19
VERSION=0.1-SNAPSHOT
franta-hg@39
    20
JAR=target/rozsirene-atributy-$(VERSION).jar
franta-hg@39
    21
franta-hg@39
    22
all: $(JAR)
franta-hg@36
    23
franta-hg@36
    24
.PHONY: all clean run run-binfmt
franta-hg@36
    25
franta-hg@36
    26
clean:
franta-hg@39
    27
	rm -rf target
franta-hg@36
    28
franta-hg@39
    29
target/classes: $(SRC)
franta-hg@39
    30
	mkdir -p target/classes
franta-hg@39
    31
	touch    target/classes
franta-hg@39
    32
	javac -d target/classes $(SRC)
franta-hg@39
    33
	cp \
franta-hg@39
    34
		src/main/resources/cz/frantovo/rozsireneatributy/*.properties \
franta-hg@39
    35
		target/classes/cz/frantovo/rozsireneatributy/
franta-hg@36
    36
franta-hg@39
    37
$(JAR): target/classes
franta-hg@39
    38
	jar --create --file $(@) --main-class $(MAIN) -C target/classes .
franta-hg@36
    39
	chmod +x $(@)
franta-hg@36
    40
franta-hg@36
    41
run: $(JAR)
franta-hg@36
    42
	java $(LAF) -jar $(<) --soubor $(<)
franta-hg@36
    43
franta-hg@36
    44
run-binfmt: $(JAR)
franta-hg@36
    45
	$(<) --soubor $(<)