-
Notifications
You must be signed in to change notification settings - Fork 99
/
Makefile
42 lines (30 loc) · 1.3 KB
/
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
#
# Catacomb-Snatch
#
# Usage
# Run "make" or "make jar" to create a redistributable jar file
# Run "make clean" or "make clean-class" to clean up files created by make
distdir = dist
distjar = $(distdir)/Catacomb-Snatch.jar
all: jar | natives
class:
find src/main/java/ -name '*.java' -exec javac -classpath lib/CodecJOrbis.jar:lib/CodecWav.jar:lib/LibraryJavaSound.jar:lib/SoundSystem.jar:lib/LibraryLWJGLOpenAL.jar:lib/lwjgl.jar:lib/kryonet-2.21-all.jar:lib/jruby.jar:lib/jython.jar:lib/jinput.jar:src/main/resources/ '{}' '+'
jar: class | lib/.tmp $(distdir)
cd lib/.tmp && find ../ -maxdepth 1 -name '*.jar' -exec jar xf '{}' ';'
jar cfe $(distjar) com.mojang.mojam.MojamStartup -C src/main/java/ . -C src/main/resources/ .
jar ufe $(distjar) com.mojang.mojam.MojamStartup -C lib/.tmp/ .
natives: $(distdir)
jar cf $(distdir)/linux_native.jar -C lib/native/linux/ .
jar cf $(distdir)/macosx_native.jar -C lib/native/macosx/ .
jar cf $(distdir)/solaris_native.jar -C lib/native/solaris/ .
jar cf $(distdir)/windows_native.jar -C lib/native/windows/ .
lib/.tmp:
mkdir -p lib/.tmp
$(distdir):
mkdir -p $(distdir)
clean: clean-class clean-jar
clean-jar:
rm -rf $(distjar) lib/.tmp
clean-class:
find src/main/java/ -name '*.class' -exec rm '{}' '+'
.PHONY: all class jar natives clean clean-jar clean-class