summaryrefslogtreecommitdiff
path: root/unrar/Makefile
diff options
context:
space:
mode:
authorTomas Bzatek <tbzatek@redhat.com>2023-12-19 18:46:18 +0100
committerTomas Bzatek <tbzatek@redhat.com>2023-12-19 18:46:18 +0100
commite9036281ebb3a5be97e42f56667bb8dfebc5b4fe (patch)
tree4db07bedbeeb8b4d690a6bc8e4fe82ded153e701 /unrar/Makefile
parent6d1c2e642eaf673e9e88ab08eacd5a6873659bcd (diff)
downloadtuxcmd-modules-e9036281ebb3a5be97e42f56667bb8dfebc5b4fe.tar.xz
unrar: Align with the unrar-6.2.12 release
Includes static and shared build.
Diffstat (limited to 'unrar/Makefile')
-rw-r--r--unrar/Makefile49
1 files changed, 27 insertions, 22 deletions
diff --git a/unrar/Makefile b/unrar/Makefile
index e822800..77d5f17 100644
--- a/unrar/Makefile
+++ b/unrar/Makefile
@@ -7,7 +7,7 @@ DIR_UNRAR = unrar
# compiler options
CC = gcc
CPP = g++
-CFLAGS = -I. -I/usr/include -I$(DIR_UNRAR) \
+CFLAGS = -I. \
-Wall -Wtype-limits -fPIC -O2 -g -ggdb \
-DG_DISABLE_DEPRECATED -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_GNU_SOURCE \
-D__VERBOSE_DEBUGx
@@ -15,26 +15,28 @@ CFLAGS = -I. -I/usr/include -I$(DIR_UNRAR) \
LIB_SUFFIX = `if test \`uname -m\` = x86_64 -o \`uname -m\` = ppc64; then echo 64; fi`
-UNRAR_LIB_OBJ = $(DIR_UNRAR)/filestr.o $(DIR_UNRAR)/scantree.o $(DIR_UNRAR)/dll.o
+UNRAR_LIB_OBJ = $(DIR_UNRAR)/filestr.o $(DIR_UNRAR)/scantree.o \
+ $(DIR_UNRAR)/dll.o $(DIR_UNRAR)/qopen.o
UNRAR_OBJECTS = $(DIR_UNRAR)/rar.o $(DIR_UNRAR)/strlist.o $(DIR_UNRAR)/strfn.o \
- $(DIR_UNRAR)/pathfn.o $(DIR_UNRAR)/int64.o $(DIR_UNRAR)/savepos.o \
- $(DIR_UNRAR)/global.o $(DIR_UNRAR)/file.o $(DIR_UNRAR)/filefn.o \
- $(DIR_UNRAR)/filcreat.o $(DIR_UNRAR)/archive.o $(DIR_UNRAR)/arcread.o \
- $(DIR_UNRAR)/unicode.o $(DIR_UNRAR)/system.o $(DIR_UNRAR)/isnt.o \
- $(DIR_UNRAR)/crypt.o $(DIR_UNRAR)/crc.o $(DIR_UNRAR)/rawread.o \
- $(DIR_UNRAR)/encname.o $(DIR_UNRAR)/resource.o $(DIR_UNRAR)/match.o \
- $(DIR_UNRAR)/timefn.o $(DIR_UNRAR)/rdwrfn.o $(DIR_UNRAR)/consio.o \
- $(DIR_UNRAR)/options.o $(DIR_UNRAR)/ulinks.o $(DIR_UNRAR)/errhnd.o \
- $(DIR_UNRAR)/rarvm.o $(DIR_UNRAR)/rijndael.o $(DIR_UNRAR)/getbits.o \
- $(DIR_UNRAR)/sha1.o $(DIR_UNRAR)/extinfo.o $(DIR_UNRAR)/extract.o \
- $(DIR_UNRAR)/volume.o $(DIR_UNRAR)/list.o $(DIR_UNRAR)/find.o \
- $(DIR_UNRAR)/unpack.o $(DIR_UNRAR)/cmddata.o
-
+ $(DIR_UNRAR)/pathfn.o $(DIR_UNRAR)/smallfn.o $(DIR_UNRAR)/global.o \
+ $(DIR_UNRAR)/file.o $(DIR_UNRAR)/filefn.o $(DIR_UNRAR)/filcreat.o \
+ $(DIR_UNRAR)/archive.o $(DIR_UNRAR)/arcread.o $(DIR_UNRAR)/unicode.o \
+ $(DIR_UNRAR)/system.o $(DIR_UNRAR)/crypt.o $(DIR_UNRAR)/crc.o \
+ $(DIR_UNRAR)/rawread.o $(DIR_UNRAR)/encname.o $(DIR_UNRAR)/resource.o \
+ $(DIR_UNRAR)/match.o $(DIR_UNRAR)/timefn.o $(DIR_UNRAR)/rdwrfn.o \
+ $(DIR_UNRAR)/consio.o $(DIR_UNRAR)/options.o $(DIR_UNRAR)/errhnd.o \
+ $(DIR_UNRAR)/rarvm.o $(DIR_UNRAR)/secpassword.o $(DIR_UNRAR)/rijndael.o \
+ $(DIR_UNRAR)/getbits.o $(DIR_UNRAR)/sha1.o $(DIR_UNRAR)/sha256.o \
+ $(DIR_UNRAR)/blake2s.o $(DIR_UNRAR)/hash.o $(DIR_UNRAR)/extinfo.o \
+ $(DIR_UNRAR)/extract.o $(DIR_UNRAR)/volume.o $(DIR_UNRAR)/list.o \
+ $(DIR_UNRAR)/find.o $(DIR_UNRAR)/unpack.o $(DIR_UNRAR)/headers.o \
+ $(DIR_UNRAR)/threadpool.o $(DIR_UNRAR)/rs16.o $(DIR_UNRAR)/cmddata.o \
+ $(DIR_UNRAR)/ui.o
VFS_COMMON_OBJECTS = filelist.o filelist-vfs-intf.o strutils.o vfsutils.o
-VFS_OBJECTS = unrar.o rarlog.o
+VFS_OBJECTS = unrar.o
.SUFFIXES: .c .cpp
@@ -44,24 +46,27 @@ VFS_OBJECTS = unrar.o rarlog.o
$(CPP) $(CFLAGS) `pkg-config glib-2.0 gio-2.0 --cflags` -c $<
-all shared static: libunrar_plugin.so
+all: shared
+
+shared: CFLAGS += -DMODULE_SHARED -I/usr/include/libunrar6
+shared: $(VFS_COMMON_OBJECTS) $(VFS_OBJECTS)
+ $(CPP) -shared -o libunrar_plugin.so $(VFS_COMMON_OBJECTS) $(VFS_OBJECTS) $(CFLAGS) `pkg-config glib-2.0 gio-2.0 --libs` -lunrar
-libunrar_plugin.so: libunrar $(VFS_COMMON_OBJECTS) $(VFS_OBJECTS)
+static: CFLAGS += -I$(DIR_UNRAR)
+static: libunrar $(VFS_COMMON_OBJECTS) $(VFS_OBJECTS)
$(CPP) -shared -o libunrar_plugin.so $(VFS_COMMON_OBJECTS) $(VFS_OBJECTS) $(UNRAR_OBJECTS) $(UNRAR_LIB_OBJ) $(CFLAGS) `pkg-config glib-2.0 gio-2.0 --libs`
libunrar:
- ( cd $(DIR_UNRAR) && make -f ../Makefile.unrar ) || exit 1
+ make -C $(DIR_UNRAR) lib
filelist.o: filelist.h filelist.c
filelist-vfs-intf.o: filelist-vfs-intf.h filelist-vfs-intf.c
strutils.o: strutils.h strutils.c
vfsutils.o: vfsutils.h vfsutils.c
-rarlog.o: rarlog.hpp rarlog.cpp
install::
$(INSTALL) ./libunrar_plugin.so $(DESTDIR)/lib$(LIB_SUFFIX)/tuxcmd/
clean:
- ( cd $(DIR_UNRAR) && make -f ../Makefile.unrar clean ) || exit 1
+ make -C $(DIR_UNRAR) clean
rm -f *.o *.d *.gch libunrar_plugin.so
-