"Fossies" - the Fresh Open Source Software Archive

Member "grzip-0.3.0/Makefile" (31 Jan 2007, 3158 Bytes) of package /linux/privat/old/grzip-0.3.0.tar.gz:


As a special service "Fossies" has tried to format the requested source page into HTML format using (guessed) C and C++ source code syntax highlighting (style: standard) with prefixed line numbers and code folding option. Alternatively you can here view or download the uninterpreted source code file.

    1 #*-------------------------------------------------*#
    2 #* GRZipII/libGRZip compressor            makefile *#
    3 #* GRZipII makefile                                *#
    4 #*-------------------------------------------------*#
    5 
    6 # Modified compressor client program par Jean-Pierre Demailly
    7 # (command line options matching more closely those of gzip/bzip2)
    8 
    9 #ifndef DESTDIR
   10 DESTDIR=/usr
   11 #endif
   12 
   13 GRZIPLIB = -L. -lgrzip
   14 
   15 CC       = gcc
   16 
   17 WARNING  = -Wall
   18 
   19 # OPTFLAGS = -O6 -ffast-math -fomit-frame-pointer -fforce-addr
   20 OPTFLAGS = -O2 -DENABLE_NLS -DLOCALEDIR=\"$(DESTDIR)/share/locale\"
   21 
   22 # CPUARCH  = -march=pentium
   23 CPUARCH =
   24 ENDIANNESS = SMALLENDIAN
   25 
   26 CFLAGS = $(CPUARCH) $(OPTFLAGS) $(WARNING) -D$(ENDIANNESS)
   27 LDFLAGS = -lm
   28 LDSTATICFLAGS = libgrzip.a -lm
   29 
   30 static: grzip_static
   31     mv -f grzip_static grzip
   32     @echo ""
   33     @echo "Type 'make all' to generate shared library"
   34     @echo ""    
   35     @echo "grzip-0.3.0 has been tested on x86, x86_64 and alpha processors."
   36     @echo "It should therefore be 64-bit safe."
   37     @echo ""    
   38     @echo "More work is needed for big-endian machines (e.g. LinuxPPC)"
   39     @echo "since the code does not work on those yet."
   40     @echo ""        
   41     @echo "On 32 bit systems, grzip only works with files < 2GB in size."
   42     @echo "This limitation can be overcome (up to 4 GB on 32-bit systems)"
   43     @echo "by using grzip with <stdin> and <stdout> rather than directly on files"
   44     @echo ""    
   45 
   46 all: libgrzip.so libgrzip.a grzip potfiles
   47 
   48 install: all
   49     if [ -x grzip ] ; then install -c -s grzip $(DESTDIR)/bin/grzip ; fi
   50     cd $(DESTDIR)/bin ; ln -s -f grzip grunzip
   51     cd $(DESTDIR)/bin ; ln -s -f grzip grzcat
   52     install -c scripts/grztar $(DESTDIR)/bin
   53     install -c scripts/grzdiff $(DESTDIR)/bin/grzdiff
   54     install -c scripts/grzgrep $(DESTDIR)/bin/grzgrep
   55     install -c scripts/grzmore $(DESTDIR)/bin/grzmore
   56     cd $(DESTDIR)/bin ; ln -s -f grzdiff grzcmp
   57     cd $(DESTDIR)/bin ; ln -s -f grzmore grzless
   58     if [ -x libgrzip.so ] ; then install -c -s libgrzip.so $(DESTDIR)/lib ; fi
   59     if [ -r libgrzip.a ] ; then install -c -s libgrzip.a $(DESTDIR)/lib ; fi    
   60     cp -f grzip.h $(DESTDIR)/include
   61     cd po ; make DESTDIR=$(DESTDIR) install
   62 
   63 libgrzip.o: libGRZip.h CRC32.c BWT.c LZP.c ST4.c MTF_Ari.c WFC_Ari.c \
   64   Rec_Flt.c main.c libgrzip.c
   65     $(CC) $(CFLAGS) -c libgrzip.c -o libgrzip.o
   66     
   67 libgrzip.so: libgrzip.o
   68     $(CC) -shared -Wl,-soname,libgrzip.so libgrzip.o -o libgrzip.so
   69 
   70 libgrzip.a: libgrzip.o
   71     ar rc libgrzip.a libgrzip.o
   72     ranlib libgrzip.a
   73 
   74 grzip: libgrzip.so
   75     $(CC) $(CFLAGS) grzip.c -o grzip $(LDFLAGS) $(GRZIPLIB)
   76 
   77 grzip_static: libgrzip.a
   78     $(CC) $(CFLAGS) grzip.c -o grzip_static $(LDSTATICFLAGS)
   79     
   80 # Original compressor client program par Ilya Grebnov  = GRZipII
   81 # if still wanted (grzip can replace it)
   82 #
   83 GRZipII: libgrzip.a
   84     $(CC) $(CFLAGS) GRZipII.c -o GRZipII $(LDSTATICFLAGS)
   85     
   86 pot:
   87     xgettext --keyword=_ -o grzip.pot main.c
   88     mv -f grzip.pot po
   89 
   90 potfiles:
   91     cd po ; make DESTDIR=$(DESTDIR)
   92     
   93 clean:
   94     -rm -f core build-stamp *.o *~ libgrzip.a libgrzip.so \
   95            grzip grzip_static GRZipII
   96     cd po ; make clean
   97 
   98 distclean: clean
   99 
  100 #*-------------------------------------------------*#
  101 #* End                                    makefile *#
  102 #*-------------------------------------------------*#