From: Niki Roo Date: Tue, 2 Jul 2024 15:17:36 +0000 (+0200) Subject: Merge branch 'java' of git.nikiroo.be:workspace/template X-Git-Url: https://git.nikiroo.be/?a=commitdiff_plain;h=84be4f7c3e9f278e78dcbc5133a4d22ad85c706e;p=nikiroo-utils.git Merge branch 'java' of git.nikiroo.be:workspace/template --- 84be4f7c3e9f278e78dcbc5133a4d22ad85c706e diff --cc Makefile index 0e715b9,2ac838d..df7b7be --- a/Makefile +++ b/Makefile @@@ -1,47 -1,36 +1,36 @@@ # - # Java Makefile: - # > NAME: name of project (used for jar output file) - # > MAIN: path to main java source to compile - # > MORE: path to supplementary needed resources not linked from MAIN - # > TEST: path to main test source to compile - # > JAR_FLAGS: a list of things to pack, each usually prefixed with "-C bin/" - # > SJAR_FLAGS: like JAR_FLAGS, but for *-sources.jar - # > PREFIX: usually /usr/local (where to install the program) + # Java makefile + # > NAME: main program name (for manual, jar, doc...) + # > MAIN: main source to compile without the 'src/' prefix nor the '.java' ext + # > MORE: more sources to compile to generate the full program + # > TEST: list of all test programs to compile and run (same format as MORE) + # > JAR_FLAGS : list of paths to include in the jar file (`-C dir path`) + # > SJAR_FLAGS: list of paths to include in the source jar file (`-C dir path`) + # > PREFIX: the usual prefix to (un)install to -- you may of course override it # -NAME = program -MAIN = be/nikiroo/program/Main -TEST = be/nikiroo/tests/program/Test +NAME = nikiroo-utils +MAIN = be/nikiroo/tests/utils/Test +TEST = be/nikiroo/tests/utils/Test - - # Option for this program: UI=android (or UI=awt by default) - ifeq ($(UI),android) - MORE += be/nikiroo/utils/android/test/TestAndroid - TEST += be/nikiroo/utils/android/ImageUtilsAndroid - else - MORE += be/nikiroo/utils/ui/ImageUtilsAwt - MORE += be/nikiroo/utils/ui/ImageTextAwt - TEST += be/nikiroo/utils/ui/test/TestUI - endif - - - JAR_MISC = -C ./ LICENSE -C ./ VERSION -C libs/ licenses + JAR_MISC = -C ./ LICENSE -C ./ VERSION -C libs/ licenses JAR_FLAGS += -C bin/ be -C bin/ org $(JAR_MISC) - SJAR_FLAGS += -C src/ org -C src/ be $(JAR_MISC) + SJAR_FLAGS += -C src/ be -C src/ org $(JAR_MISC) PREFIX = /usr/local - # Makefile base template - # - # Version: - # - 1.0.0: add a version comment - # - 1.1.0: add 'help', 'sjar' - # - 1.2.0: add 'apk' - # - 1.2.1: improve 'apk' and add 'android' - # - 1.3.0: add 'man' for man(ual) pages - # - 1.4.0: remove android stuff (not working anyway) - # - 1.5.0: include sources and readme/changelog in jar - # - 1.5.1: include binaries from libs/bin/ into the jar - # - 1.6.0: rework the system without need of a ./configure.sh, add uninstall + # + # Special Options for this program: you can modify the previous var if needed -# > OPTION=non-default-value (or OPTION=default-value by default) ++# > UI=android (or UI=awt by default) + # -ifeq ($(OPTION),non-default-value) -MORE += be/nikiroo/utils/android/test/TestAndroid -TEST += be/nikiroo/utils/android/ImageUtilsAndroid ++ifeq ($(UI),android) ++MORE+= be/nikiroo/utils/android/ImageUtilsAndroid ++TEST += be/nikiroo/utils/android/test/TestAndroid + else + MORE += be/nikiroo/utils/ui/ImageUtilsAwt + MORE += be/nikiroo/utils/ui/ImageTextAwt + TEST += be/nikiroo/utils/ui/test/TestUI + endif + ################################################################################ JAVAC = javac JAVAC_FLAGS += -encoding UTF-8 -d ./bin/ -cp ./src/