Makefile.in 4.19 KB
Newer Older
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
############################################################################
#                                                                          #
#  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
Mike Gabriel's avatar
Mike Gabriel committed
45
LIBS        = @LIBS@ -lz -lX11 -lXcomp
46 47 48 49

#
# Only if THREADS is defined
#
Mike Gabriel's avatar
Mike Gabriel committed
50
# LIBS = @LIBS@ -lz -ljpeg -lpthread -lX11 -lXcomp
51 52 53 54 55 56 57 58 59 60 61 62
#

srcdir      = @srcdir@
prefix      = @prefix@
exec_prefix = @exec_prefix@
bindir      = @bindir@
man1dir     = @mandir@/man1
VPATH       = @srcdir@

INSTALL         = @INSTALL@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTALL_DATA    = @INSTALL_DATA@
Mike Gabriel's avatar
Mike Gabriel committed
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
#
# 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)
LIBFULL    = lib$(LIBRARY).so.$(VERSION)
LIBLOAD    = lib$(LIBRARY).so.$(LIBVERSION)
LIBSHARED  = lib$(LIBRARY).so
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) $(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 [ -x $(MAKEDEPEND) ] ; then \
			$(MAKEDEPEND) $(CXXINCLUDES) $(CCINCLUDES) \
                        $(DEPENDINCLUDES) -f Makefile $(MSRC) $(CSRC) \
			$(CXXSRC) 2>/dev/null; \
		fi
		touch depend.status

Mike Gabriel's avatar
Mike Gabriel committed
150
install:	install.bin install.man
151 152 153 154 155 156 157 158 159 160

install.bin:

install.man:

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

distclean:	clean
Mike Gabriel's avatar
Mike Gabriel committed
161
		-rm -rf autom4te.cache config.status config.log \
162
		config.cache depend.status Makefile tags