summaryrefslogtreecommitdiffstats
path: root/java/src/com/tigervnc/vncviewer/Makefile
blob: d68a49fccbafe7fb30f9ae7dea7a77933dd67e75 (plain)
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
49
50
51
52
53
54
55
#
# Making the VNC applet.
#

CP = cp
JC = javac
JCFLAGS = -target 1.5 -classpath ../../../
JAR = jar
ARCHIVE = VncViewer.jar
MANIFEST = MANIFEST.MF
TIMESTAMP = timestamp
PAGES = index.vnc
INSTALL_DIR = /usr/local/vnc/classes
DATE = $(shell date -u "+%b %d %Y")
TIME = $(shell date -u "+%H:%M:%S")

CLASSES = CConn.class OptionsDialogCallback.class ClipboardDialog.class \
    PasswdDialog.class DesktopWindow.class PixelBufferImage.class \
    Dialog.class ServerDialog.class F8Menu.class	UserPrefs.class \
    OptionsDialog.class VncViewer.class

SOURCES = CConn.java OptionsDialogCallback.java ClipboardDialog.java \
    PasswdDialog.java DesktopWindow.java PixelBufferImage.java \
    Dialog.java ServerDialog.java F8Menu.java	UserPrefs.java \
    OptionsDialog.java VncViewer.java

all: $(CLASSES) $(ARCHIVE)

$(CLASSES): $(SOURCES) ../rfb/*.java ../rdr/*.java
	$(JC) $(JCFLAGS) -O $(SOURCES)

$(ARCHIVE): $(CLASSES) $(MANIFEST) $(TIMESTAMP)
	cd ../../..; \
	$(JAR) cfm com/tigervnc/vncviewer/$(ARCHIVE) \
		com/tigervnc/vncviewer/$(MANIFEST) \
		com/tigervnc/vncviewer/$(TIMESTAMP) \
		com/tigervnc/vncviewer/*.class \
		com/tigervnc/rfb/*.class \
		com/tigervnc/rdr/*.class \
		com/tigervnc/vncviewer/tigervnc.png \
		com/tigervnc/vncviewer/tigervnc.ico

$(TIMESTAMP):
	$(shell cat $(MANIFEST) >> $(TIMESTAMP))
	$(shell echo "Package-Date: $(DATE)" >> $(TIMESTAMP))
	$(shell echo "Package-Time: $(TIME)" >> $(TIMESTAMP))

install: $(CLASSES) $(ARCHIVE)
	$(CP) $(CLASSES) $(ARCHIVE) $(PAGES) $(INSTALL_DIR)

export:: $(CLASSES) $(ARCHIVE) $(PAGES)
	@$(ExportJavaClasses)

clean::
	$(RM) *.class *.jar timestamp ../rfb/*.class ../rdr/*.class