forked from vngx/vngx-jsch
-
Notifications
You must be signed in to change notification settings - Fork 1
/
GNUmakefile
executable file
·45 lines (32 loc) · 1.08 KB
/
GNUmakefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
Default: all
TOP=$(realpath .)
include $(TOP)/../DeveloperTools/install/common.mk
RSRC=rsrc
LIBDIR=$(RSRC)/lib
LIB=$(subst $(SPACE),$(CLN),$(filter %.jar %.zip, $(wildcard $(LIBDIR)/*)))
BUILD=build
SRC=src/main/java
DOCS=docs
CLASSPATH="$(CLASSLIB)$(CLN)$(LIB)$(CLN)$(SRC)"
CWD=$(shell pwd)
include classes.mk
CLASS_FILES:=$(foreach class, $(CLASSES), $(BUILD)/$(subst .,/,$(class)).class)
PACKAGES=$(sort $(basename $(CLASSES)))
PACKAGEDIRS=$(subst .,/,$(PACKAGES))
all: JSch.jar
JSch.jar: classes
$(JAR) cvf $@ -C $(BUILD)/ .
javadocs:
mkdir -p $(DOCS)
$(JAVA_HOME)/bin/javadoc -d $(DOCS) -classpath $(CLASSPATH) $(PACKAGES)
clean:
rm -rf $(BUILD)
classes: classdirs $(CLASS_FILES)
install: all
cp JSch.jar $(TOP)/../jOVAL-Commercial/components/provider/remote/rsrc/lib
cp JSch.jar $(TOP)/../jOVAL-Commercial/components/sdk/dist/3rd-party
classdirs: $(foreach pkg, $(PACKAGEDIRS), $(BUILD)/$(pkg)/)
$(BUILD)/%.class: $(SRC)/%.java
$(JAVAC) $(JAVACFLAGS) -d $(BUILD) -classpath $(CLASSPATH) $<
$(BUILD)/%/:
mkdir -p $(subst PKG,,$@)