# 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 gio-2.0 --cflags` -c $< .cpp.o: $(CPP) $(CFLAGS) `pkg-config glib-2.0 gio-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 gio-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