-
Notifications
You must be signed in to change notification settings - Fork 11
/
Copy pathMakefile
41 lines (35 loc) · 1.23 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
DESTDIR ?= /usr/local/share/java
VERSION = 2.0.1
.PHONY: build
build: clean Makefile src/edu/harvard/CS50.java
mkdir -p build/usr/share/java
javac -d build src/edu/harvard/CS50.java
cp src/edu/harvard/CS50.java build/edu/harvard
jar cvf build/usr/share/java/cs50.jar -C build .
.PHONY: clean
clean:
rm -rf build libcs50-java* libcs50-java_*
.PHONY: deb
deb: build
@echo "libcs50-java ($(VERSION)-0ubuntu1) trusty; urgency=low" > debian/changelog
@echo " * v$(VERSION)" >> debian/changelog
@echo " -- CS50 Sysadmins <[email protected]> $$(date --rfc-2822)" >> debian/changelog
mkdir -p libcs50-java-$(VERSION)
rsync -a build/usr libcs50-java-$(VERSION)
tar -cvzf libcs50-java_$(VERSION).orig.tar.gz libcs50-java-$(VERSION)
cp -r debian libcs50-java-$(VERSION)
cd libcs50-java-$(VERSION) && debuild -S -sa --lintian-opts --display-info --info --show-overrides
mkdir -p build/deb
mv libcs50-java* build/deb
.PHONY: docs
docs:
rm -rf docs
javadoc -d docs -linkoffline https://docs.oracle.com/javase/8/docs/api/ \
https://docs.oracle.com/javase/8/docs/api/ -sourcepath src edu.harvard
.PHONY: install
install: build
mkdir -p $(DESTDIR)
cp -r build/usr/share/java/cs50.jar $(DESTDIR)
.PHONY: version
version:
@echo $(VERSION)