1 #
   2 # This file and its contents are supplied under the terms of the
   3 # Common Development and Distribution License ("CDDL"), version 1.0.
   4 # You may only use this file in accordance with the terms of version
   5 # 1.0 of the CDDL.
   6 #
   7 # A full copy of the text of the CDDL should have accompanied this
   8 # source.  A copy of the CDDL is also available via the Internet at
   9 # http://www.illumos.org/license/CDDL.
  10 #
  11 
  12 #
  13 # Copyright 2015 Gary Mills
  14 #
  15 
  16 LIBRARY =       libz.a
  17 VERS =  .1
  18 OBJZ =  adler32.o crc32.o deflate.o infback.o inffast.o inflate.o \
  19         inftrees.o trees.o zutil.o
  20 OBJG =  compress.o uncompr.o gzclose.o gzlib.o gzread.o gzwrite.o
  21 OBJECTS =       $(OBJZ) $(OBJG)
  22 
  23 include ../../Makefile.lib
  24 
  25 # install this library in the root filesystem
  26 include ../../Makefile.rootfs
  27 
  28 LIBS =          $(DYNLIB) $(LINTLIB)
  29 
  30 SRCDIR =        ../common
  31 
  32 $(LINTLIB):=    SRCS = $(SRCDIR)/$(LINTSRC)
  33 LDLIBS +=       -lc
  34 
  35 C99MODE =       $(C99_ENABLE)
  36 
  37 CFLAGS +=       -mt $(CCVERBOSE)
  38 CPPFLAGS +=     -DORIG_LONGEST_MATCH_GLOBAL '-D_LARGEFILE64_SOURCE=1'
  39 CPPFLAGS +=     -I$(SRCDIR)
  40 
  41 COPTFLAG =      -_cc=-xO4 -_gcc=-O3
  42 COPTFLAG64 =    -_cc=-xO4 -_gcc=-O3
  43 
  44 # Can be removed when BUILD.SO is corrected in lib/Makefile.lib
  45 BUILD.SO =      $(CC) $(CFLAGS) -o $@ $(GSHARED) $(DYNFLAGS) \
  46                 $(PICS) $(EXTPICS) $(LDLIBS)
  47 
  48 ULDIR =         $(ROOT)/usr/lib
  49 ULDIR64 =       $(ROOT)/usr/lib/$(MACH64)
  50 
  51 USRLINKS =      $(ULDIR)/libz.so \
  52                 $(ULDIR)/libz.so.1 \
  53                 $(ULDIR)/llib-lz.ln
  54 USRLINKS64 =    $(ULDIR64)/libz.so \
  55                 $(ULDIR64)/libz.so.1 \
  56                 $(ULDIR64)/llib-lz.ln
  57 
  58 $(ULDIR)/libz.so := LINKSRC = ./libz.so.1
  59 $(ULDIR)/libz.so.1 := LINKSRC = ../../lib/libz.so.1
  60 $(ULDIR)/llib-lz.ln := LINKSRC = ../../lib/llib-lz.ln
  61 $(ULDIR64)/libz.so := LINKSRC = libz.so.1
  62 $(ULDIR64)/libz.so.1 := LINKSRC = ../../../lib/$(MACH64)/libz.so.1
  63 $(ULDIR64)/llib-lz.ln := LINKSRC = ../../../lib/$(MACH64)/llib-lz.ln
  64 
  65 $(USRLINKS):
  66         $(RM) $@; $(SYMLINK) $(LINKSRC) $@
  67 $(USRLINKS64):
  68         $(RM) $@; $(SYMLINK) $(LINKSRC) $@
  69 
  70 .KEEP_STATE:
  71 
  72 all: $(LIBS)
  73 
  74 lint: lintcheck
  75 
  76 include ../../Makefile.targ