summaryrefslogtreecommitdiffstats
path: root/libvncserver/Makefile.am
blob: e25784ba3adbe74025b097f112e1cb74b2b95c5c (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
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
AM_CPPFLAGS = -I$(top_srcdir) -I$(top_srcdir)/common

if WITH_TIGHTVNC_FILETRANSFER
TIGHTVNCFILETRANSFERHDRS=tightvnc-filetransfer/filelistinfo.h \
	tightvnc-filetransfer/filetransfermsg.h \
	tightvnc-filetransfer/handlefiletransferrequest.h \
	tightvnc-filetransfer/rfbtightproto.h

TIGHTVNCFILETRANSFERSRCS = tightvnc-filetransfer/rfbtightserver.c \
	tightvnc-filetransfer/handlefiletransferrequest.c \
	tightvnc-filetransfer/filetransfermsg.c \
	tightvnc-filetransfer/filelistinfo.c
endif

if WITH_WEBSOCKETS

if HAVE_GNUTLS
WEBSOCKETSSSLSRCS = rfbssl_gnutls.c rfbcrypto_gnutls.c
WEBSOCKETSSSLLIBS = @GNUTLS_LIBS@
else
if HAVE_LIBSSL
WEBSOCKETSSSLSRCS = rfbssl_openssl.c rfbcrypto_openssl.c
WEBSOCKETSSSLLIBS = @SSL_LIBS@ @CRYPT_LIBS@
else
WEBSOCKETSSSLSRCS = rfbssl_none.c rfbcrypto_included.c ../common/md5.c ../common/sha1.c
endif
endif

WEBSOCKETSSRCS = websockets.c $(WEBSOCKETSSSLSRCS)
endif

includedir=$(prefix)/include/rfb

include_HEADERS=../rfb/rfb.h ../rfb/rfbconfig.h \
	../rfb/rfbproto.h ../rfb/keysym.h ../rfb/rfbregion.h ../rfb/rfbclient.h

noinst_HEADERS=../common/d3des.h ../rfb/default8x16.h zrleoutstream.h \
	zrlepalettehelper.h zrletypes.h private.h scale.h rfbssl.h rfbcrypto.h \
	../common/minilzo.h ../common/lzoconf.h ../common/lzodefs.h ../common/md5.h ../common/sha.h ../common/sha-private.h \
	$(TIGHTVNCFILETRANSFERHDRS)

EXTRA_DIST=tableinit24.c tableinittctemplate.c tabletranstemplate.c \
	tableinitcmtemplate.c tabletrans24template.c \
	zrleencodetemplate.c

if HAVE_LIBZ
ZLIBSRCS = zlib.c zrle.c zrleoutstream.c zrlepalettehelper.c ../common/zywrletemplate.c
if HAVE_LIBJPEG
TIGHTSRCS = tight.c ../common/turbojpeg.c
endif
endif

LIB_SRCS = main.c rfbserver.c rfbregion.c auth.c sockets.c $(WEBSOCKETSSRCS) \
	stats.c corre.c hextile.c rre.c translate.c cutpaste.c \
	httpd.c cursor.c font.c \
	draw.c selbox.c ../common/d3des.c ../common/vncauth.c cargs.c ../common/minilzo.c ultra.c scale.c \
	$(ZLIBSRCS) $(TIGHTSRCS) $(TIGHTVNCFILETRANSFERSRCS)

libvncserver_la_SOURCES=$(LIB_SRCS)
libvncserver_la_LIBADD=$(WEBSOCKETSSSLLIBS)

if WITH_SYSTEMD
AM_CPPFLAGS += -DLIBVNCSERVER_WITH_SYSTEMD
libvncserver_la_CFLAGS = $(LIBSYSTEMD_CFLAGS)
libvncserver_la_LIBADD += $(LIBSYSTEMD_LIBS)
endif

lib_LTLIBRARIES=libvncserver.la
libvncserver_la_LDFLAGS = -version-info 1:0:0

if HAVE_RPM
$(PACKAGE)-$(VERSION).tar.gz: dist

# Rule to build RPM distribution package
rpm: $(PACKAGE)-$(VERSION).tar.gz libvncserver.spec
	cp $(PACKAGE)-$(VERSION).tar.gz @RPMSOURCEDIR@
	rpmbuild -ba libvncserver.spec
endif