diff options
| author | Tomas Bzatek <tbzatek@users.sourceforge.net> | 2008-06-08 11:04:43 +0200 |
|---|---|---|
| committer | Tomas Bzatek <tbzatek@users.sourceforge.net> | 2008-06-08 11:04:43 +0200 |
| commit | 16f738ecee689c6feb2acb7e4ef4d9bb4144ae7d (patch) | |
| tree | 3d22f54f7298f81b18ed66d05a62fa8bfab359ab /zip/Makefile | |
| download | tuxcmd-modules-0.6.36.tar.xz | |
Initial commitv0.6.36release-0.6.36-dev
Diffstat (limited to 'zip/Makefile')
| -rw-r--r-- | zip/Makefile | 50 |
1 files changed, 50 insertions, 0 deletions
diff --git a/zip/Makefile b/zip/Makefile new file mode 100644 index 0000000..6beb14b --- /dev/null +++ b/zip/Makefile @@ -0,0 +1,50 @@ +# path definitions +DESTDIR = /usr +INSTALL=install -c +INSTALL_DATA = ${INSTALL} -m 644 +DIR_ZIPARCHIVE = ./ZipArchive/ + +# compiler options +CC = gcc +CPP = g++ +CFLAGS =-I. -I$(DIR_ZIPARCHIVE) -I/usr/include \ + -Wall -fPIC -O2 -g \ + -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; then echo 64; fi` + + +VFS_COMMON_OBJECTS=strutils.o treepathutils.o treepath_vfs.o vfsutils.o + +VFS_C_OBJECTS= +VFS_CPP_OBJECTS=zip.o + + +.SUFFIXES: .c .cpp +.c.o: + $(CPP) $(CFLAGS) `pkg-config glib-2.0 --cflags` -c $< +.cpp.o: + $(CPP) $(CFLAGS) `pkg-config glib-2.0 --cflags` -c $< + + +all shared static: libzip_plugin.so + +libzip_plugin.so: ziparchive $(VFS_COMMON_OBJECTS) $(VFS_CPP_OBJECTS) $(VFS_C_OBJECTS) + $(CPP) -shared -o libzip_plugin.so zip.o $(VFS_COMMON_OBJECTS) $(DIR_ZIPARCHIVE)libziparch.a -lz -lm $(CFLAGS) `pkg-config glib-2.0 --libs` + +ziparchive: + ( cd $(DIR_ZIPARCHIVE) && make -f ../Makefile.ziparch ) || exit 1 + +strutils.o: strutils.c strutils.h +treepathutils.o: treepathutils.c treepathutils.h +vfsutils.o: vfsutils.c vfsutils.h +treepath_vfs.o: treepath_vfs.c treepath_vfs.h + + +install:: + $(INSTALL) ./libzip_plugin.so $(DESTDIR)/lib$(LIB_SUFFIX)/tuxcmd/ + +clean: + ( cd $(DIR_ZIPARCHIVE) && make -f ../Makefile.ziparch clean ) || exit 1 + rm -f *.o *.d *.gch libzip_plugin.so |
