blob: 1f403f5258def5db6d68603d159f9658f3c9cf30 (
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
81
82
83
84
85
86
87
88
89
90
91
92
|
INCLUDES=-I. -Iinclude
VNCSERVERLIB=-L. -lvncserver -L/usr/local/lib -lz -ljpeg
#CXX=
CXX=g++
CC=gcc
LINK=gcc
# for IRIX
#EXTRALIBS=-L/usr/lib32
# for Solaris
#EXTRALIBS=-lsocket -lnsl -L/usr/X/lib
# for FreeBSD
#EXTRAINCLUDES=-I/usr/X11R6/include
# Uncomment these two lines to enable use of PThreads
#PTHREADLIB = -lpthread
# Comment the following line to disable the use of 3 Bytes/Pixel.
# The code for 3 Bytes/Pixel is not very efficient!
OPTFLAGS=-g -Wall -pedantic
#OPTFLAGS=-O2 -Wall
RANLIB=ranlib
# for Mac OS X
OSX_LIBS = -framework ApplicationServices -framework Carbon -framework IOKit
ifdef CXX
ZRLE_SRCS=zrle.cc rdr/FdInStream.cxx rdr/FdOutStream.cxx rdr/InStream.cxx \
rdr/NullOutStream.cxx rdr/ZlibInStream.cxx rdr/ZlibOutStream.cxx
ZRLE_OBJS=zrle.o rdr/FdInStream.o rdr/FdOutStream.o rdr/InStream.o \
rdr/NullOutStream.o rdr/ZlibInStream.o rdr/ZlibOutStream.o
ZRLE_DEF=-DHAVE_ZRLE
LINK=$(CXX)
%.o: %.cxx
$(CXX) $(CXXFLAGS) -c -o $@ $<
endif
CFLAGS=$(OPTFLAGS) $(INCLUDES) $(EXTRAINCLUDES)
CXXFLAGS=$(OPTFLAGS) $(INCLUDES) $(EXTRAINCLUDES)
LIBS=$(LDFLAGS) $(VNCSERVERLIB) $(PTHREADLIB) $(EXTRALIBS)
SOURCES=main.c rfbserver.c sraRegion.c auth.c sockets.c \
stats.c corre.c hextile.c rre.c translate.c cutpaste.c \
zlib.c tight.c httpd.c cursor.c font.c \
draw.c selbox.c d3des.c vncauth.c cargs.c $(ZRLE_SRCS)
OBJS=main.o rfbserver.o sraRegion.o auth.o sockets.o \
stats.o corre.o hextile.o rre.o translate.o cutpaste.o \
zlib.o tight.o httpd.o cursor.o font.o \
draw.o selbox.o d3des.o vncauth.o cargs.o $(ZRLE_OBJS)
INSTALLHEADER=rfb.h rfbproto.h sraRegion.h keysym.h
all: libvncserver.a all_examples
all_examples:
cd examples && make
all_contrib:
cd contrib && make
install_OSX: OSXvnc-server
cp OSXvnc-server storepasswd ../OSXvnc/build/OSXvnc.app/Contents/MacOS
.c.o:
$(CC) $(CFLAGS) -c $<
$(OBJS): Makefile include/rfb.h
libvncserver.a: $(OBJS)
$(AR) cru $@ $(OBJS)
$(RANLIB) $@
translate.o: translate.c tableinit24.c tableinitcmtemplate.c tableinittctemplate.c tabletrans24template.c tabletranstemplate.c
clean:
rm -f $(OBJS) *~ core "#"* *.bak *.orig
cd examples && make clean
cd contrib && make clean
realclean: clean
rm -f OSXvnc-server storepasswd example pnmshow libvncserver.a
depend:
$(CC) -M $(INCLUDES) $(SOURCES) >.depend
#include .depend
|