forked from NoticEditorTeam/NoticEditor
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
44 lines (35 loc) · 874 Bytes
/
Makefile
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
JC=javac
JCOPTS=-classpath `./configure` -sourcepath $(SRC) -d $(BUILD) -g $(SRC)/$(MAIN_CLASS)
PACKCMD=jar cfm $(DIST)/$(OUTPUT) $(MANIFEST) -C $(BUILD) .
RM=rm -rf
BUILD=./build
LIBS=./libs
DIST=./dist
SRC=./src
XMLIN=$(SRC)/fxml
XMLOUT=$(BUILD)/fxml
RESIN=$(SRC)/resources
RESOUT=$(BUILD)/resources
MANIFEST=manifest.mf
OUTPUT=NoticEditor.jar
MAIN_CLASS=com/temporaryteam/noticeditor/Main.java
all: init clean compile pack
init:
mkdir -p $(BUILD)
mkdir -p $(DIST)
clean:
$(RM) $(BUILD)/*
$(RM) $(DIST)/$(OUTPUT)
compile:
$(JC) $(JCOPTS)
pack:
mkdir -p $(BUILD)/{fxml,resources}
cp -rf $(XMLIN)/* $(XMLOUT)
cp -rf $(RESIN)/* $(RESOUT)
for j in $(LIBS)/*.jar ; do \
unzip $$j -x META-INF/* -d $(BUILD) > /dev/null ; \
done
$(PACKCMD)
install:
mkdir -p $(DESTDIR)$(PREFIX)/bin
install -m 0755 dist/NoticEditor.jar $(DESTDIR)$(PREFIX)/bin/noticed.jar