"Fossies" - the Fresh Open Source Software Archive

Member "unrar/makefile" (22 Feb 2022, 3892 Bytes) of package /linux/misc/unrarsrc-6.1.7.tar.gz:


As a special service "Fossies" has tried to format the requested text file into HTML format (style: standard) with prefixed line numbers. Alternatively you can here view or download the uninterpreted source code file. See also the last Fossies "Diffs" side-by-side code changes report for "makefile": 6.1.4_vs_6.1.5.

    1 #
    2 # Makefile for UNIX - unrar
    3 
    4 # Linux using GCC
    5 CXX=c++
    6 CXXFLAGS=-O2 -Wno-logical-op-parentheses -Wno-switch -Wno-dangling-else
    7 LIBFLAGS=-fPIC
    8 DEFINES=-D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -DRAR_SMP
    9 STRIP=strip
   10 AR=ar
   11 LDFLAGS=-pthread
   12 DESTDIR=/usr
   13 
   14 # Linux using LCC
   15 #CXX=lcc
   16 #CXXFLAGS=-O2
   17 #DEFINES=-D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE
   18 #STRIP=strip
   19 #AR=ar
   20 #DESTDIR=/usr
   21 
   22 # CYGWIN using GCC
   23 #CXX=c++
   24 #CXXFLAGS=-O2
   25 #LIBFLAGS=
   26 #DEFINES=-D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -DRAR_SMP
   27 #STRIP=strip
   28 #AR=ar
   29 #LDFLAGS=-pthread
   30 #DESTDIR=/usr
   31 
   32 # HP UX using aCC
   33 #CXX=aCC
   34 #CXXFLAGS=-AA +O2 +Onolimit
   35 #DEFINES=-D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE
   36 #STRIP=strip
   37 #AR=ar
   38 #DESTDIR=/usr
   39 
   40 # IRIX using GCC
   41 #CXX=g++
   42 #CXXFLAGS=-O2 
   43 #DEFINES=-DBIG_ENDIAN -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_BSD_COMPAT -D_XOPEN_SOURCE -D_XOPEN_SOURCE_EXTENDED=1
   44 #STRIP=strip
   45 #AR=ar
   46 #DESTDIR=/usr
   47 
   48 # IRIX using MIPSPro (experimental)
   49 #CXX=CC
   50 #CXXFLAGS=-O2 -mips3 -woff 1234,1156,3284 -LANG:std
   51 #DEFINES=-DBIG_ENDIAN -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_BSD_COMPAT -Dint64=int64_t
   52 #STRIP=strip
   53 #AR=ar
   54 #DESTDIR=/usr
   55 
   56 # AIX using xlC (IBM VisualAge C++ 5.0)
   57 #CXX=xlC
   58 #CXXFLAGS=-O -qinline -qro -qroconst -qmaxmem=16384 -qcpluscmt
   59 #DEFINES=-D_LARGE_FILES -D_LARGE_FILE_API
   60 #LIBS=-lbsd
   61 #STRIP=strip
   62 #AR=ar
   63 #DESTDIR=/usr
   64 
   65 # Solaris using CC
   66 #CXX=CC
   67 #CXXFLAGS=-fast -erroff=wvarhidemem
   68 #DEFINES=-D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE
   69 #STRIP=strip
   70 #AR=ar
   71 #DESTDIR=/usr
   72 
   73 # Solaris using GCC (optimized for UltraSPARC 1 CPU)
   74 #CXX=g++
   75 #CXXFLAGS=-O3 -mcpu=v9 -mtune=ultrasparc -m32
   76 #DEFINES=-D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE
   77 #STRIP=/usr/ccs/bin/strip
   78 #AR=/usr/ccs/bin/ar
   79 #DESTDIR=/usr
   80 
   81 # Tru64 5.1B using GCC3
   82 #CXX=g++
   83 #CXXFLAGS=-O2 -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_XOPEN_SOURCE=500
   84 #STRIP=strip
   85 #AR=ar
   86 #LDFLAGS=-rpath /usr/local/gcc/lib
   87 #DESTDIR=/usr
   88 
   89 # Tru64 5.1B using DEC C++
   90 #CXX=cxx
   91 #CXXFLAGS=-O4 -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -Dint64=long
   92 #STRIP=strip
   93 #AR=ar
   94 #LDFLAGS=
   95 #DESTDIR=/usr
   96 
   97 # QNX 6.x using GCC
   98 #CXX=g++
   99 #CXXFLAGS=-O2 -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -fexceptions
  100 #STRIP=strip
  101 #AR=ar
  102 #LDFLAGS=-fexceptions
  103 #DESTDIR=/usr
  104 
  105 # Cross-compile
  106 # Linux using arm-linux-g++
  107 #CXX=arm-linux-g++
  108 #CXXFLAGS=-O2
  109 #DEFINES=-D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE
  110 #STRIP=arm-linux-strip
  111 #AR=arm-linux-ar
  112 #LDFLAGS=-static
  113 #DESTDIR=/usr
  114 
  115 ##########################
  116 
  117 COMPILE=$(CXX) $(CPPFLAGS) $(CXXFLAGS) $(DEFINES)
  118 LINK=$(CXX)
  119 
  120 WHAT=UNRAR
  121 
  122 UNRAR_OBJ=filestr.o recvol.o rs.o scantree.o qopen.o
  123 LIB_OBJ=filestr.o scantree.o dll.o qopen.o
  124 
  125 OBJECTS=rar.o strlist.o strfn.o pathfn.o smallfn.o global.o file.o filefn.o filcreat.o \
  126 	archive.o arcread.o unicode.o system.o crypt.o crc.o rawread.o encname.o \
  127 	resource.o match.o timefn.o rdwrfn.o consio.o options.o errhnd.o rarvm.o secpassword.o \
  128 	rijndael.o getbits.o sha1.o sha256.o blake2s.o hash.o extinfo.o extract.o volume.o \
  129   list.o find.o unpack.o headers.o threadpool.o rs16.o cmddata.o ui.o
  130 
  131 .cpp.o:
  132 	$(COMPILE) -D$(WHAT) -c $<
  133 
  134 all:	unrar
  135 
  136 install:	install-unrar
  137 
  138 uninstall:	uninstall-unrar
  139 
  140 clean:
  141 	@rm -f *.bak *~
  142 	@rm -f $(OBJECTS) $(UNRAR_OBJ) $(LIB_OBJ)
  143 	@rm -f unrar libunrar.*
  144 
  145 unrar:	clean $(OBJECTS) $(UNRAR_OBJ)
  146 	@rm -f unrar
  147 	$(LINK) -o unrar $(LDFLAGS) $(OBJECTS) $(UNRAR_OBJ) $(LIBS)	
  148 	$(STRIP) unrar
  149 
  150 sfx:	WHAT=SFX_MODULE
  151 sfx:	clean $(OBJECTS)
  152 	@rm -f default.sfx
  153 	$(LINK) -o default.sfx $(LDFLAGS) $(OBJECTS)
  154 	$(STRIP) default.sfx
  155 
  156 lib:	WHAT=RARDLL
  157 lib:	CXXFLAGS+=$(LIBFLAGS)
  158 lib:	clean $(OBJECTS) $(LIB_OBJ)
  159 	@rm -f libunrar.*
  160 	$(LINK) -shared -o libunrar.so $(LDFLAGS) $(OBJECTS) $(LIB_OBJ)
  161 	$(AR) rcs libunrar.a $(OBJECTS) $(LIB_OBJ)
  162 
  163 install-unrar:
  164 			install -D unrar $(DESTDIR)/bin/unrar
  165 
  166 uninstall-unrar:
  167 			rm -f $(DESTDIR)/bin/unrar
  168 
  169 install-lib:
  170 		install libunrar.so $(DESTDIR)/lib
  171 		install libunrar.a $(DESTDIR)/lib
  172 
  173 uninstall-lib:
  174 		rm -f $(DESTDIR)/lib/libunrar.so