1 #
   2 # CDDL HEADER START
   3 #
   4 # The contents of this file are subject to the terms of the
   5 # Common Development and Distribution License (the "License").
   6 # You may not use this file except in compliance with the License.
   7 #
   8 # You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
   9 # or http://www.opensolaris.org/os/licensing.
  10 # See the License for the specific language governing permissions
  11 # and limitations under the License.
  12 #
  13 # When distributing Covered Code, include this CDDL HEADER in each
  14 # file and include the License file at usr/src/OPENSOLARIS.LICENSE.
  15 # If applicable, add the following below this CDDL HEADER, with the
  16 # fields enclosed by brackets "[]" replaced with your own identifying
  17 # information: Portions Copyright [yyyy] [name of copyright owner]
  18 #
  19 # CDDL HEADER END
  20 #
  21 #
  22 # Copyright 2006 Sun Microsystems, Inc.  All rights reserved.
  23 # Use is subject to license terms.
  24 # Copyright 2016 Joyent, Inc.
  25 #
  26 
  27 LX_CMN  =       $(SRC)/common/brand/lx
  28 
  29 LIBRARY =       lx_brand.a
  30 VERS    =       .1
  31 COBJS   =       aio.o                   \
  32                 capabilities.o          \
  33                 clock.o                 \
  34                 clone.o                 \
  35                 debug.o                 \
  36                 dir.o                   \
  37                 file.o                  \
  38                 fcntl.o                 \
  39                 fork.o                  \
  40                 lx_brand.o              \
  41                 mem.o                   \
  42                 misc.o                  \
  43                 module.o                \
  44                 mount.o                 \
  45                 mount_nfs.o             \
  46                 priority.o              \
  47                 ptrace.o                \
  48                 sched.o                 \
  49                 sendfile.o              \
  50                 signal.o                \
  51                 stack.o                 \
  52                 statfs.o                \
  53                 sysctl.o                \
  54                 sysv_ipc.o              \
  55                 time.o                  \
  56                 truncate.o
  57 
  58 CMNOBJS =       lx_auxv.o       \
  59                 lx_errno.o      \
  60                 lx_signum.o
  61 ASOBJS  =       lx_handler.o lx_crt.o
  62 OBJECTS =       $(CMNOBJS) $(COBJS) $(ASOBJS)
  63 
  64 USDT_PROVIDERS =        lx_provider.d
  65 
  66 include ../../Makefile.lx
  67 include ../../../../Makefile.lib
  68 
  69 CSRCS   =       $(COBJS:%o=../common/%c) $(CMNOBJS:%o=$(LX_CMN)/%c)
  70 ASSRCS  =       $(ASOBJS:%o=$(ISASRCDIR)/%s)
  71 SRCS    =       $(CSRCS) $(ASSRCS)
  72 
  73 SRCDIR =        ../common
  74 UTSBASE =       ../../../../../uts
  75 
  76 LIBS =          $(DYNLIB)
  77 LDLIBS +=       -lc -lsocket -lmapmalloc -lproc -lrtld_db -lrpcsvc -lnsl
  78 DYNFLAGS +=     $(DYNFLAGS_$(CLASS))
  79 DYNFLAGS +=     $(BLOCAL) $(ZNOVERSION) -Wl,-e_start -M../common/mapfile
  80 CFLAGS +=       $(CCVERBOSE)
  81 CPPFLAGS +=     -D_REENTRANT -I. -I../ -I$(UTSBASE)/common/brand/lx -I$(LX_CMN)
  82 ASFLAGS =       -P $(ASFLAGS_$(CURTYPE)) -D_ASM -I../   \
  83                         -I$(UTSBASE)/common/brand/lx
  84 
  85 C99MODE=        -xc99=%all
  86 C99LMODE=       -Xc99=%all
  87 
  88 .KEEP_STATE:
  89 
  90 all: $(LIBS)
  91 
  92 lint: lintcheck
  93 
  94 include ../../../../Makefile.targ
  95 include ../../../../Makefile.usdt
  96 
  97 pics/%.o: $(ISASRCDIR)/%.s
  98         $(COMPILE.s) -o $@ $<
  99         $(POST_PROCESS_O)
 100 
 101 pics/%.o: $(LX_CMN)/%.c
 102         $(COMPILE.c) -o $@ $<
 103         $(POST_PROCESS_O)