"Fossies" - the Fresh Open Source Software Archive

Member "zuluCrypt-5.7.0/external_libraries/zuluplay/Makefile.classic" (12 Sep 2019, 3674 Bytes) of package /linux/misc/zuluCrypt-5.7.0.tar.xz:


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.

    1 # either linux or dragonfly
    2 SYSTEM?=linux
    3 
    4 DESTDIR?=
    5 PREFIX?=/usr/local
    6 LIBSUFFIX?=
    7 LIBDIR?=$(PREFIX)/lib$(LIBSUFFIX)
    8 MANDIR?=$(PREFIX)/share/man
    9 SBINDIR?=$(PREFIX)/sbin
   10 INCLUDEDIR?=$(PREFIX)/include
   11 
   12 # either openssl or gcrypt
   13 PBKDF_BACKEND?=openssl
   14 
   15 # system compiler, normally gcc
   16 CC?=gcc
   17 
   18 INSTALL?=install
   19 
   20 RM?=rm -f
   21 
   22 LN?=ln
   23 
   24 # whether to enable debugging or not
   25 DEBUG?=no
   26 
   27 MAJ_VER=2
   28 MIN_VER=0
   29 
   30 
   31 # I've given up on -Werror for now; many Linux distros have warnings even in
   32 # their standard header files.
   33 WARNFLAGS= -Wsystem-headers -Wall -W -Wno-unused-parameter \
   34 	-Wstrict-prototypes -Wmissing-prototypes -Wpointer-arith \
   35 	-Wold-style-definition -Wreturn-type -Wwrite-strings \
   36 	-Wswitch -Wshadow -Wcast-align -Wunused-parameter -Wchar-subscripts \
   37 	-Winline -Wnested-externs
   38 
   39 VER_FLAGS= -DMAJ_VER=$(MAJ_VER) -DMIN_VER=$(MIN_VER) -D_FILE_OFFSET_BITS=64
   40 
   41 SRCS=	tcplay.c crc32.c safe_mem.c io.c hdr.c humanize.c
   42 SRCS+=	crypto.c generic_xts.c
   43 OBJS=	tcplay.o crc32.o safe_mem.o io.o hdr.o humanize.o
   44 OBJS+=	crypto.o generic_xts.o
   45 
   46 COMMON_CFLAGS= $(WARNFLAGS) -fPIC $(VER_FLAGS)
   47 
   48 ifeq ($(DEBUG), yes)
   49   COMMON_CFLAGS+= -O0 -g -DDEBUG
   50 else
   51   COMMON_CFLAGS+= -O3
   52 endif
   53 
   54 ifeq (${SYSTEM}, linux)
   55   COMMON_CFLAGS+=	-D_GNU_SOURCE
   56   LIBS+=	-lgcrypt -lgpg-error -ldevmapper -luuid
   57   SRCS+=	crypto-gcrypt.c
   58   OBJS+=	crypto-gcrypt.o
   59   ifeq (${PBKDF_BACKEND}, gcrypt)
   60     SRCS+=	pbkdf2-gcrypt.c
   61     OBJS+=	pbkdf2-gcrypt.o
   62   endif
   63   ifeq (${PBKDF_BACKEND}, openssl)
   64     SRCS+=	pbkdf2-openssl.c
   65     OBJS+=	pbkdf2-openssl.o
   66     LIBS+=	-lcrypto
   67   endif
   68 endif
   69 
   70 ifeq (${SYSTEM}, dragonfly)
   71   LIBS+=	-lcrypto -ldm -lprop
   72   SRCS+=	crypto-dev.c
   73   OBJS+=	crypto-dev.o
   74   SRCS+=	pbkdf2-openssl.c
   75   OBJS+=	pbkdf2-openssl.o
   76 endif
   77 
   78 OBJS_PROG= $(OBJS) main.o
   79 OBJS_LIB= $(OBJS) tcplay_api.o
   80 
   81 all: tcplay libtcplay.so libtcplay.a
   82 
   83 %.o: %.c
   84 	$(CC) $(COMMON_CFLAGS) $(CFLAGS)   -c -o $@ $<
   85 
   86 tcplay: $(OBJS_PROG)
   87 	$(CC) $(COMMON_CFLAGS) $(CFLAGS)   -o tcplay $(OBJS_PROG) $(LIBS)
   88 
   89 libtcplay.so.$(MAJ_VER).$(MIN_VER): $(OBJS_LIB)
   90 	$(CC) -shared -Wl,-version-script=tcplay.map -Wl,-soname=libtcplay.so.$(MAJ_VER).$(MIN_VER)  $(LDFLAGS) \
   91 		-o libtcplay.so.$(MAJ_VER).$(MIN_VER) $(OBJS_LIB) $(LIBS)
   92 
   93 libtcplay.so: libtcplay.so.$(MAJ_VER).$(MIN_VER)
   94 	$(LN) -sf libtcplay.so.$(MAJ_VER).$(MIN_VER) libtcplay.so
   95 
   96 libtcplay.a: $(OBJS_LIB)
   97 	$(AR) -rs libtcplay.a $(OBJS_LIB)
   98 
   99 
  100 install: install_program install_lib install_lib_static
  101 
  102 install_program: tcplay install_man8
  103 	$(INSTALL) -d "$(DESTDIR)$(SBINDIR)"
  104 	$(INSTALL) tcplay "$(DESTDIR)$(SBINDIR)"
  105 
  106 install_lib: libtcplay.so.$(MAJ_VER).$(MIN_VER) libtcplay.so install_h install_man3
  107 	$(INSTALL) -d "$(DESTDIR)$(LIBDIR)"
  108 	$(INSTALL) libtcplay.so.$(MAJ_VER).$(MIN_VER) "$(DESTDIR)$(LIBDIR)"
  109 	$(LN) -sf libtcplay.so.$(MAJ_VER).$(MIN_VER) "$(DESTDIR)$(LIBDIR)/libtcplay.so"
  110 
  111 install_lib_static: libtcplay.a install_h install_man3
  112 	$(INSTALL) -d "$(DESTDIR)$(LIBDIR)"
  113 	$(INSTALL) libtcplay.a "$(DESTDIR)$(LIBDIR)"
  114 
  115 install_h: tcplay_api.h
  116 	$(INSTALL) -d "$(DESTDIR)$(INCLUDEDIR)"
  117 	$(INSTALL) tcplay_api.h "$(DESTDIR)$(INCLUDEDIR)"
  118 
  119 install_man3: tcplay.3
  120 	$(INSTALL) -d "$(DESTDIR)$(MANDIR)/man3"
  121 	$(INSTALL) tcplay.3 "$(DESTDIR)$(MANDIR)/man3"
  122 
  123 install_man8: tcplay.8
  124 	$(INSTALL) -d "$(DESTDIR)$(MANDIR)/man8"
  125 	$(INSTALL) tcplay.8 "$(DESTDIR)$(MANDIR)/man8"
  126 
  127 
  128 clean_cmake_mess:
  129 	$(RM) CMakeCache.txt
  130 	$(RM) -r CMakeFiles
  131 	$(RM) CPackConfig.cmake
  132 	$(RM) CPackSourceConfig.cmake
  133 	$(RM) Makefile
  134 	$(RM) cmake_install.cmake
  135 	$(RM) tcplay.pc
  136 
  137 clean: clean_cmake_mess
  138 	$(RM) $(OBJS_PROG)
  139 	$(RM) $(OBJS_LIB)
  140 	$(RM) tcplay libtcplay.so* libtcplay.a tcplay.core ktrace.out
  141 
  142 .PHONY: install install_program install_lib install_lib_static install_man3 install_man8 install_h