1AM_CPPFLAGS = -I$(top_srcdir) -I$(top_srcdir)/common
2
3if WITH_TIGHTVNC_FILETRANSFER
4TIGHTVNCFILETRANSFERHDRS=tightvnc-filetransfer/filelistinfo.h \
5	tightvnc-filetransfer/filetransfermsg.h \
6	tightvnc-filetransfer/handlefiletransferrequest.h \
7	tightvnc-filetransfer/rfbtightproto.h
8
9TIGHTVNCFILETRANSFERSRCS = tightvnc-filetransfer/rfbtightserver.c \
10	tightvnc-filetransfer/handlefiletransferrequest.c \
11	tightvnc-filetransfer/filetransfermsg.c \
12	tightvnc-filetransfer/filelistinfo.c
13endif
14
15if WITH_WEBSOCKETS
16
17if HAVE_GNUTLS
18WEBSOCKETSSSLSRCS = rfbssl_gnutls.c rfbcrypto_gnutls.c
19WEBSOCKETSSSLLIBS = @GNUTLS_LIBS@
20else
21if HAVE_LIBSSL
22WEBSOCKETSSSLSRCS = rfbssl_openssl.c rfbcrypto_openssl.c
23WEBSOCKETSSSLLIBS = @SSL_LIBS@ @CRYPT_LIBS@
24else
25WEBSOCKETSSSLSRCS = rfbssl_none.c rfbcrypto_included.c ../common/md5.c ../common/sha1.c
26endif
27endif
28
29WEBSOCKETSSRCS = websockets.c $(WEBSOCKETSSSLSRCS)
30endif
31
32includedir=$(prefix)/include/rfb
33#include_HEADERS=rfb.h rfbconfig.h rfbint.h rfbproto.h keysym.h rfbregion.h
34
35include_HEADERS=../rfb/rfb.h ../rfb/rfbconfig.h ../rfb/rfbint.h \
36	../rfb/rfbproto.h ../rfb/keysym.h ../rfb/rfbregion.h ../rfb/rfbclient.h
37
38noinst_HEADERS=../common/d3des.h ../rfb/default8x16.h zrleoutstream.h \
39	zrlepalettehelper.h zrletypes.h private.h scale.h rfbssl.h rfbcrypto.h \
40	../common/minilzo.h ../common/lzoconf.h ../common/lzodefs.h ../common/md5.h ../common/sha1.h \
41	$(TIGHTVNCFILETRANSFERHDRS)
42
43EXTRA_DIST=tableinit24.c tableinittctemplate.c tabletranstemplate.c \
44	tableinitcmtemplate.c tabletrans24template.c \
45	zrleencodetemplate.c
46
47if HAVE_LIBZ
48ZLIBSRCS = zlib.c zrle.c zrleoutstream.c zrlepalettehelper.c ../common/zywrletemplate.c
49if HAVE_LIBJPEG
50TIGHTSRCS = tight.c ../common/turbojpeg.c
51endif
52endif
53
54LIB_SRCS = main.c rfbserver.c rfbregion.c auth.c sockets.c $(WEBSOCKETSSRCS) \
55	stats.c corre.c hextile.c rre.c translate.c cutpaste.c \
56	httpd.c cursor.c font.c \
57	draw.c selbox.c ../common/d3des.c ../common/vncauth.c cargs.c ../common/minilzo.c ultra.c scale.c \
58	$(ZLIBSRCS) $(TIGHTSRCS) $(TIGHTVNCFILETRANSFERSRCS)
59
60libvncserver_la_SOURCES=$(LIB_SRCS)
61libvncserver_la_LIBADD=$(WEBSOCKETSSSLLIBS)
62
63lib_LTLIBRARIES=libvncserver.la
64
65if HAVE_RPM
66$(PACKAGE)-$(VERSION).tar.gz: dist
67
68# Rule to build RPM distribution package
69rpm: $(PACKAGE)-$(VERSION).tar.gz libvncserver.spec
70	cp $(PACKAGE)-$(VERSION).tar.gz @RPMSOURCEDIR@
71	rpmbuild -ba libvncserver.spec
72endif
73
74
75