aboutsummaryrefslogtreecommitdiff
path: root/nxcompext/Makefile.in
blob: 62dda4482ba75eb6399653d39e57c324d22d5e17 (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
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
############################################################################
#                                                                          #
#  Copyright (c) 2001, 2007 NoMachine, http://www.nomachine.com.           #
#                                                                          #
#  NXCOMPEXT, NX protocol compression and NX extensions to this software   #
#  are copyright of NoMachine. Redistribution and use of the present       #
#  software is allowed according to terms specified in the file LICENSE    #
#  which comes in the source distribution.                                 #
#                                                                          #
#  Check http://www.nomachine.com/licensing.html for applicability.        #
#                                                                          #
#  NX and NoMachine are trademarks of NoMachine S.r.l.                     #
#                                                                          #
#  All rights reserved.                                                    #
#                                                                          #
############################################################################

#
# Get values from configure script.
#

VERSION=@VERSION@
LIBVERSION=@LIBVERSION@

#
# We want to enable really all warnings. -Wredundant-decls,
# though, gives a warning caused by pthread.h and unistd.h.
#

CXX         = @CXX@
CXXFLAGS    = @CXXFLAGS@ @X_CFLAGS@ @DEFS@ \
              -Wall -Wpointer-arith -Wstrict-prototypes -Wmissing-prototypes \
              -Wmissing-declarations -Wnested-externs
CXXINCLUDES = -I. -I../nxcomp
CXXDEFINES  =

CC          = @CC@
CCFLAGS     = @CFLAGS@ @X_CFLAGS@ @DEFS@ \
              -Wall -Wpointer-arith -Wstrict-prototypes -Wmissing-prototypes \
              -Wmissing-declarations -Wnested-externs
CCINCLUDES  = -I. -I../nxcomp
CCDEFINES   =

LDFLAGS     = @LDFLAGS@ -L../nxcomp
LIBS        = @LIBS@ -lz -lNX_X11 -lXcomp

#
# Only if THREADS is defined
#
# LIBS = @LIBS@ -lz -ljpeg -lpthread -lNX_X11 -lXcomp
#

srcdir       = @srcdir@
prefix       = @prefix@
datarootdir  = @datarootdir@
datadir      = @datadir@
exec_prefix  = @exec_prefix@
bindir       = @bindir@
man1dir      = @mandir@/man1
VPATH        = @srcdir@
libdir       = @libdir@
includedir   = @includedir@
pkgconfigdir = @pkgconfigdir@

INSTALL         = @INSTALL@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTALL_DATA    = @INSTALL_DATA@
INSTALL_LINK    = cp -av
DESTDIR         =
RM_FILE         = rm -f
#
# This should be autodetected.
#

MAKEDEPEND     = @MAKEDEPEND@
DEPENDINCLUDES =  -I/usr/include/c++ -I/usr/include/g++ -I/usr/include/g++-3 

.SUFFIXES: .cpp.c

.cpp.o:
	$(CXX) -c $(CXXFLAGS) $(CXXINCLUDES) $<
.c.o:
	$(CC) -c $(CCFLAGS) $(CCINCLUDES) $<

LIBRARY = Xcompext

LIBNAME    = lib$(LIBRARY)
ifeq ($(shell uname),Darwin)
LIBFULL    = lib$(LIBRARY).$(VERSION).dylib
LIBLOAD    = lib$(LIBRARY).$(LIBVERSION).dylib
LIBSHARED  = lib$(LIBRARY).dylib
COMP_VER   = $(shell echo '$(VERSION)' | cut -d '.' -f 1-3)
LIBFLAGS   = -install_name $(libdir)/$(LIBLOAD) -compatibility_version $(LIBVERSION) -current_version $(COMP_VER)
else
LIBFULL    = lib$(LIBRARY).so.$(VERSION)
LIBLOAD    = lib$(LIBRARY).so.$(LIBVERSION)
LIBSHARED  = lib$(LIBRARY).so
LIBFLAGS   =
endif
LIBARCHIVE = lib$(LIBRARY).a

LIBCYGSHARED  = cyg$(LIBRARY).dll
LIBCYGARCHIVE = lib$(LIBRARY).dll.a

all: depend @ALL@

MSRC=

CSRC=	NXlib.c		\
	Clean.c		\
	Mask.c		\
	Colormap.c	\
	Alpha.c		\
	Jpeg.c		\
	Pgn.c		\
	Bitmap.c	\
	Rgb.c		\
	Rle.c		\
        Z.c

CXXSRC=

MOBJ   = $(MSRC:.c=.o)
COBJ   = $(CSRC:.c=.o)
CXXOBJ = $(CXXSRC:.cpp=.o)

$(LIBFULL):	 $(CXXOBJ) $(COBJ)
		 $(CXX) -o $@ $(LDFLAGS) $(LIBFLAGS) $(CXXOBJ) $(COBJ) $(LIBS)

$(LIBLOAD):	 $(LIBFULL)
		 rm -f $(LIBLOAD)
		 ln -s $(LIBFULL) $(LIBLOAD)

$(LIBSHARED):	 $(LIBFULL)
		 rm -f $(LIBSHARED)
		 ln -s $(LIBFULL) $(LIBSHARED)

$(LIBARCHIVE):	 $(CXXOBJ) $(COBJ)
		 rm -f  $(LIBARCHIVE)
		 ar clq $(LIBARCHIVE) $(CXXOBJ) $(COBJ)
		 ranlib $(LIBARCHIVE)

$(LIBCYGSHARED): $(LIBARCHIVE)
		 $(CC) -shared -o $(LIBCYGSHARED) \
		 -Wl,--out-implib=$(LIBCYGARCHIVE) \
		 -Wl,--export-all-symbols \
		 -Wl,--enable-auto-import \
		 -Wl,--whole-archive $(LIBARCHIVE) \
		 -Wl,--no-whole-archive $(LIBS) \
		 $(LDFLAGS)

$(LIBCYGARCHIVE): $(LIBCYGSHARED)

depends:	depend.status

depend:		depend.status

depend.status:	
		if [ -n "$(MAKEDEPEND)" ] && [ -x "$(MAKEDEPEND)" ] ; then \
			$(MAKEDEPEND) $(CXXINCLUDES) $(CCINCLUDES) \
			$(DEPENDINCLUDES) -f Makefile $(MSRC) $(CSRC) \
			$(CXXSRC) 2>/dev/null; \
		fi
		touch depend.status

install:       install.bin install.lib install.man

install.bin:

install.lib: all
	./mkinstalldirs $(DESTDIR)${libdir}
	./mkinstalldirs $(DESTDIR)${pkgconfigdir}
	./mkinstalldirs $(DESTDIR)${includedir}/nx
	$(INSTALL_DATA) $(LIBFULL)              $(DESTDIR)${libdir}
	$(INSTALL_LINK) $(LIBLOAD)              $(DESTDIR)${libdir}
	$(INSTALL_LINK) $(LIBSHARED)            $(DESTDIR)${libdir}
	$(INSTALL_DATA) NX*.h                   $(DESTDIR)${includedir}/nx
	$(INSTALL_DATA) nxcompext.pc            $(DESTDIR)${pkgconfigdir}
	echo "Running ldconfig tool, this may take a while..." && ldconfig || true

install.man:

uninstall:     uninstall.bin uninstall.lib uninstall.man

uninstall.bin:

uninstall.lib:
	$(RM_FILE) $(DESTDIR)${libdir}/$(LIBFULL)
	$(RM_FILE) $(DESTDIR)${libdir}/$(LIBLOAD)
	$(RM_FILE) $(DESTDIR)${libdir}/$(LIBSHARED)
	$(RM_FILE) $(DESTDIR)${includedir}/nx/NXlib.h
	$(RM_FILE) $(DESTDIR)${includedir}/nx/NXlibint.h
	$(RM_FILE) $(DESTDIR)${pkgconfigdir}/nxcompext.pc
	echo "Running ldconfig tool, this may take a while..." && ldconfig || true

uninstall.man:

clean:
		-rm -f *~ *.o *.bak *.orig *.rej st?????? core core.* *.out.* \
		@ALL@

distclean:	clean
		-rm -rf autom4te.cache config.status config.log configure \
		config.cache depend.status Makefile tags