blob: 2d9f4317d9e0f2c5c11f3dc3abecee4fbce91322 [file] [log] [blame]
Constantin Kaplinsky47ed8d32004-10-08 09:43:57 +00001
2 VNCTOP = $(TOP)/..
3 VNCLIBS = VncExtLibs
Peter Åstrand1029ea32005-02-10 13:48:58 +00004 VNCINCLUDE = -I$(VNCTOP) -I$(VNCTOP)/vncconfig_unix
Constantin Kaplinsky47ed8d32004-10-08 09:43:57 +00005
6#define CplusplusSource
7
8#include <Server.tmpl>
9
Peter Åstrand1402f8c2005-02-23 08:22:10 +000010#if HasShm
11SHMDEF = -DHAS_SHM
12#endif
13
14XCOMM add more architectures here as we discover them
15#if defined(HPArchitecture) || \
16 (defined(SparcArchitecture) && !defined(LynxOSArchitecture)) || \
17 SystemV4 || \
18 defined(OSF1Architecture) || \
19 defined(i386BsdArchitecture) || \
20 defined(LinuxArchitecture) || \
21 defined(DarwinArchitecture)
22MMAPDEF = -DHAS_MMAP
23#endif
24
Constantin Kaplinsky47ed8d32004-10-08 09:43:57 +000025#ifdef XVendorString
26VENDORSTRING = XVendorString
27#else
28VENDORSTRING = "unknown"
29#endif
30
31#ifdef XVendorRelease
32VENDORRELEASE = XVendorRelease
33#else
34VENDORRELEASE = 0
35#endif
36
37 VENDOR_STRING = -DVENDOR_STRING=\"$(VENDORSTRING)\"
38 VENDOR_RELEASE = -DVENDOR_RELEASE="$(VENDORRELEASE)"
39
40#ifdef OS2Architecture
41SRCS1 = os2_stubs.c
42OBJS1 = os2_stubs.o
43#endif
44
Peter Åstrand1bdab802005-02-14 14:03:35 +000045FBINCLUDE = -I../../fb
46
Constantin Kaplinsky47ed8d32004-10-08 09:43:57 +000047SRCSA = xvnc.cc stubs.c $(SRCS1) miinitext.c $(SRCS2)
48
49OBJSA = xvnc.o stubs.o $(OBJS1) miinitext.o $(OBJS2)
50
51INCLUDES = -I. -I.. -I$(XBUILDINCDIR) -I$(FONTINCSRC) \
Peter Åstrand1bdab802005-02-14 14:03:35 +000052 $(FBINCLUDE) -I../../mfb -I../../mi -I../../include -I../../os \
Constantin Kaplinsky47ed8d32004-10-08 09:43:57 +000053 -I$(EXTINCSRC) -I$(XINCLUDESRC) -I$(SERVERSRC)/render $(VNCINCLUDE)
54
Peter Åstrand1bdab802005-02-14 14:03:35 +000055DEFINES = $(OS_DEFINES) $(SHMDEF) $(MMAPDEF) $(FB_DEFINES) \
Constantin Kaplinsky47ed8d32004-10-08 09:43:57 +000056 $(VENDOR_STRING) $(VENDOR_RELEASE) $(STD_DEFINES) ServerOSDefines \
57 -UXFree86LOADER
58
59#ifdef XFree86Version
60/*
61 * Make sure XINPUT, XF86VidTune, etc arent defined for the miinitext.o
62 * used by Xvnc
63 */
64EXT_DEFINES = ExtensionDefines -UXINPUT -UXF86VIDMODE -UXFreeXDGA -UXF86MISC
65#endif
66
67
68SRCS = $(SRCSA) $(SRCSB) $(SRCSC)
69OBJS = $(OBJSA) $(OBJSB) $(OBJSC)
70
71NormalLibraryObjectRule()
72NormalLibraryTarget(xvnc,$(OBJS) buildtime.o)
73
74#ifdef OS2Architecture
75LinkSourceFile(os2_stubs.c,../xfree86/os-support/os2)
76SpecialCObjectRule(os2_stubs,$(ICONFIGFILES),-DOS2NULLSELECT)
77#endif
78
79#ifdef HasGcc
80NO_OPERATOR_NAMES = -fno-operator-names
81#endif
82LinkSourceFile(stubs.c,../../Xi)
83SpecialCplusplusObjectRule(xvnc,$(ICONFIGFILES) xvnc,$(EXT_DEFINES) $(NO_OPERATOR_NAMES))
84
85LinkSourceFile(miinitext.c,$(SERVERSRC)/mi)
86SpecialCObjectRule(miinitext,$(ICONFIGFILES),$(EXT_DEFINES) $(PAN_DEFINES) -DNO_HW_ONLY_EXTS -DNO_MODULE_EXTS $(EXT_MODULE_DEFINES) -UXFree86LOADER)
87
88/* InstallManPage(Xvfb,$(MANDIR)) */
89DependTarget()
90
91buildtime.o: $(OBJS) ../LibraryTargetName(vnc) $(VNCLIBS)