blob: 4e930daffeb75b6809eeeb068929d6fd4ac5339c (
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
|
# path definitions
DESTDIR = /usr
INSTALL = install -c
INSTALL_DATA = ${INSTALL} -m 644
DIR_UNRAR = unrar
# compiler options
CC = gcc
CPP = g++
CFLAGS = -I. -I/usr/include -I$(DIR_UNRAR) \
-Wall -Wtype-limits -fPIC -O2 -g -ggdb \
-DG_DISABLE_DEPRECATED -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_GNU_SOURCE \
-D__VERBOSE_DEBUGx
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_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
VFS_COMMON_OBJECTS = filelist.o filelist-vfs-intf.o strutils.o vfsutils.o
VFS_OBJECTS = unrar.o rarlog.o
.SUFFIXES: .c .cpp
.c.o:
$(CC) $(CFLAGS) `pkg-config glib-2.0 --cflags` -c $<
.cpp.o:
$(CPP) $(CFLAGS) `pkg-config glib-2.0 --cflags` -c $<
all shared static: libunrar_plugin.so
libunrar_plugin.so: 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 --libs`
libunrar:
( cd $(DIR_UNRAR) && make -f ../Makefile.unrar ) || exit 1
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
rm -f *.o *.d *.gch libunrar_plugin.so
|