-
Notifications
You must be signed in to change notification settings - Fork 2
/
Makefile
48 lines (32 loc) · 988 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
45
46
47
48
JC = javac
JAR = jar
BUILD_DIR = build
SRC_DIR = src
META_DIR = META-INF
HQ_MAIN = info/labunsky/stego/auth/HQUtil.java
SPY_MAIN = info/labunsky/stego/auth/SpyUtil.java
HQ_JAR = HQUtil.jar
HQ_MF = $(META_DIR)/HQ.mf
SPY_JAR = SpyUtil.jar
SPY_MF = $(META_DIR)/Spy.mf
LIB_JAR = StegoAuth.jar
all: lib hq-util spy-util
hq-prepare:
mkdir -p $(BUILD_DIR)/hq
$(JC) -d $(BUILD_DIR)/hq -sourcepath $(SRC_DIR) $(SRC_DIR)/$(HQ_MAIN)
hq-util: hq-prepare
$(JAR) cfm $(HQ_JAR) $(HQ_MF) -C $(BUILD_DIR)/hq .
spy-prepare:
mkdir -p $(BUILD_DIR)/spy
$(JC) -d $(BUILD_DIR)/spy -sourcepath $(SRC_DIR) $(SRC_DIR)/$(SPY_MAIN)
spy-util: spy-prepare
$(JAR) cfm $(SPY_JAR) $(SPY_MF) -C $(BUILD_DIR)/spy .
lib-prepare: spy-prepare hq-prepare
mkdir -p $(BUILD_DIR)/lib
cp -r $(BUILD_DIR)/hq/. $(BUILD_DIR)/lib/
cp -r $(BUILD_DIR)/spy/. $(BUILD_DIR)/lib/
lib: lib-prepare
$(JAR) cvf $(LIB_JAR) -C $(BUILD_DIR)/lib .
clean:
rm -rf $(BUILD_DIR)
.PHONY: all spy-prepare hq-prepare lib-prepare