~freenx-team/nx-x11/nxcompshad-ubuntu

« back to all changes in this revision

Viewing changes to Makefile.in

  • Committer: Marcelo Boveto Shima
  • Date: 2009-01-22 23:14:12 UTC
  • Revision ID: marceloshima@gmail.com-20090122231412-9683ft4r5xwep1nb
Import nxcompshad-3.3.0-2

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
############################################################################
 
2
#                                                                          #
 
3
#  Copyright (c) 2001, 2005 NoMachine, http://www.nomachine.com.           #
 
4
#                                                                          #
 
5
#  NXCOMP, NX protocol compression and NX extensions to this software      #
 
6
#  are copyright of NoMachine. Redistribution and use of the present       #
 
7
#  software is allowed according to terms specified in the file LICENSE    #
 
8
#  which comes in the source distribution.                                 #
 
9
#                                                                          #
 
10
#  Check http://www.nomachine.com/licensing.html for applicability.        #
 
11
#                                                                          #
 
12
#  NX and NoMachine are trademarks of Medialogic S.p.A.                    #
 
13
#                                                                          #
 
14
#  All rights reserved.                                                    #
 
15
#                                                                          #
 
16
############################################################################
 
17
 
 
18
#
 
19
# Get values from configure script.
 
20
#
 
21
 
 
22
VERSION=@VERSION@
 
23
LIBVERSION=@LIBVERSION@
 
24
 
 
25
#
 
26
# We would really like to enable all warnings, -Wredundant-decls,
 
27
# though, gives a warning caused by pthread.h and unistd.h and
 
28
# GCC 3.4 was changed in a way that it now complains about some
 
29
# of the -W directives we used before (-Wmissing-declarations,
 
30
# -Wnested-externs, -Wstrict-prototypes and -Wmissing-prototypes).
 
31
#
 
32
 
 
33
CXX         = @CXX@
 
34
CXXFLAGS    = @CXXFLAGS@ @X_CFLAGS@ @DEFS@ \
 
35
              -Wall -Wpointer-arith
 
36
CXXINCLUDES =
 
37
CXXDEFINES  =
 
38
 
 
39
#
 
40
# C programs don't share the C++ flags. They should
 
41
# have their own @CCFLAGS@.
 
42
#
 
43
 
 
44
CC          = @CC@
 
45
CCFLAGS     = @X_CFLAGS@ @DEFS@ \
 
46
              -Wall -Wpointer-arith
 
47
CCINCLUDES  =
 
48
CCDEFINES   =
 
49
 
 
50
LDFLAGS     = @LDFLAGS@
 
51
LIBS        = @LIBS@ -L/usr/X11R6/lib -lX11
 
52
 
 
53
#
 
54
# Only if THREADS is defined.
 
55
#
 
56
# LIBS = $(LIBS) -lpthread
 
57
#
 
58
 
 
59
#
 
60
# Only if you want ElectricFence.
 
61
#
 
62
# LIBS = $(LIBS) -lefence
 
63
#
 
64
 
 
65
#
 
66
# Only if you want mpatrol.
 
67
#
 
68
# LIBS = $(LIBS) -lmpatrol -lbfd -liberty
 
69
#
 
70
 
 
71
srcdir      = @srcdir@
 
72
prefix      = @prefix@
 
73
exec_prefix = @exec_prefix@
 
74
bindir      = @bindir@
 
75
man1dir     = @mandir@/man1
 
76
VPATH       = @srcdir@
 
77
 
 
78
INSTALL         = @INSTALL@
 
79
INSTALL_PROGRAM = @INSTALL_PROGRAM@
 
80
INSTALL_DATA    = @INSTALL_DATA@
 
81
 
 
82
#
 
83
# This should be autodetected.
 
84
#
 
85
 
 
86
MAKEDEPEND     = @MAKEDEPEND@
 
87
DEPENDINCLUDES = -I/usr/include/g++ -I/usr/include/g++-3
 
88
 
 
89
.SUFFIXES: .cpp.c
 
90
 
 
91
.cpp.o:
 
92
        $(CXX) -c $(CXXFLAGS) $(CXXINCLUDES) $(CXXDEFINES) $<
 
93
.c.o:
 
94
        $(CC) -c $(CCFLAGS) $(CCINCLUDES) $(CCDEFINES) $<
 
95
 
 
96
LIBRARY = Xcompshad
 
97
 
 
98
LIBNAME    = lib$(LIBRARY)
 
99
LIBFULL    = lib$(LIBRARY).so.$(VERSION)
 
100
LIBLOAD    = lib$(LIBRARY).so.$(LIBVERSION)
 
101
LIBSHARED  = lib$(LIBRARY).so
 
102
LIBARCHIVE = lib$(LIBRARY).a
 
103
 
 
104
MSRC   = Main.c
 
105
 
 
106
CSRC   =
 
107
 
 
108
CXXSRC = Core.cpp \
 
109
         Input.cpp \
 
110
         Logger.cpp \
 
111
         Shadow.cpp \
 
112
         X11.cpp \
 
113
         Win.cpp \
 
114
         Updater.cpp \
 
115
         Manager.cpp
 
116
 
 
117
MOBJ   = $(MSRC:.c.cpp=.o)
 
118
COBJ   = $(CSRC:.c=.o)
 
119
CXXOBJ = $(CXXSRC:.cpp=.o)
 
120
 
 
121
MLIBS  = -L. -lXShadow
 
122
 
 
123
ifeq ($(findstring -lgdi32,$(LIBS)),-lgdi32)
 
124
 
 
125
# We need a smarter way to detect windows
 
126
# platform.
 
127
 
 
128
LIBDLL       = cyg$(LIBRARY).dll
 
129
LIBDLLSTATIC = lib${LIBRARY}.dll.a
 
130
 
 
131
all: depend $(LIBARCHIVE) $(LIBDLL)
 
132
 
 
133
else
 
134
 
 
135
EXTRALIBS = -lXtst -lXrandr -lXdamage
 
136
 
 
137
all: depend $(LIBFULL) $(LIBLOAD) $(LIBSHARED) $(LIBARCHIVE)
 
138
 
 
139
endif
 
140
 
 
141
$(LIBFULL):     $(CXXOBJ) $(COBJ)
 
142
                $(CXX) -o $@ $(LDFLAGS) $(CXXOBJ) $(COBJ) $(LIBS) $(EXTRALIBS)
 
143
 
 
144
$(LIBLOAD):     $(LIBFULL)
 
145
                rm -f $(LIBLOAD)
 
146
                ln -s $(LIBFULL) $(LIBLOAD)
 
147
 
 
148
$(LIBSHARED):   $(LIBFULL)
 
149
                rm -f $(LIBSHARED)
 
150
                ln -s $(LIBFULL) $(LIBSHARED)
 
151
 
 
152
$(LIBARCHIVE):  $(CXXOBJ) $(COBJ)
 
153
                rm -f  $(LIBARCHIVE)
 
154
                ar clq $(LIBARCHIVE) $(CXXOBJ) $(COBJ)
 
155
                ranlib $(LIBARCHIVE)
 
156
 
 
157
$(LIBDLL): $(LIBARCHIVE)
 
158
                $(CC) -o $@ \
 
159
                -shared \
 
160
                -Wl,--out-implib=$(LIBDLLSTATIC) \
 
161
                -Wl,--export-all-symbols \
 
162
                -Wl,--enable-auto-import \
 
163
                -Wl,--whole-archive ${LIBARCHIVE} \
 
164
                -Wl,--no-whole-archive \
 
165
                ${LIBS} -L/usr/X11R6/lib
 
166
 
 
167
$(PROGRAM):     $(MOBJ) $(COBJ) $(CXXOBJ) $(LIBDLL)
 
168
#               $(CC) $(CCFLAGS) -o $@ $(MOBJ) $(MLIBS)
 
169
 
 
170
depends:        depend.status
 
171
 
 
172
depend:         depend.status
 
173
 
 
174
depend.status:  
 
175
                if [ -x $(MAKEDEPEND) ] ; then \
 
176
                        $(MAKEDEPEND) $(CXXINCLUDES) $(CCINCLUDES) \
 
177
                        $(DEPENDINCLUDES) -f Makefile $(MSRC) $(CSRC) $(CXXSRC) 2>/dev/null; \
 
178
                fi
 
179
                touch depend.status
 
180
 
 
181
install:        install.bin install.man
 
182
 
 
183
install.bin:
 
184
 
 
185
install.man:
 
186
 
 
187
clean:
 
188
                -rm -f *~ *.o *.bak st?????? core core.* *.out.* *.exe.stackdump \
 
189
                $(LIBFULL) $(LIBLOAD) $(LIBSHARED) $(LIBARCHIVE) $(LIBDLL) $(LIBDLLSTATIC) $(PROGRAM) $(PROGRAM).exe
 
190
 
 
191
distclean:      clean
 
192
                -rm -rf config.status config.log config.cache depend.status Makefile tags autom4te.cache