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 # Copyright (c) 1995, 2010, Oracle and/or its affiliates. All rights reserved.
  22 # Copyright 2019 OmniOS Community Edition (OmniOSce) Association.
  23 #
  24 
  25 include         $(SRC)/Makefile.master
  26 
  27 MACHDEMOFILES= \
  28                 i386/regs.c \
  29                 i386/m_utils.c \
  30                 i386/rdb_mach.h \
  31                 i386/Makefile \
  32                 amd64/regs.c \
  33                 amd64/rdb_mach.h \
  34                 amd64/Makefile \
  35                 sparc/regs.c \
  36                 sparc/m_utils.c \
  37                 sparc/rdb_mach.h \
  38                 sparc/Makefile \
  39                 sparcv9/regs.c \
  40                 sparcv9/m_utils.c \
  41                 sparcv9/rdb_mach.h \
  42                 sparcv9/Makefile
  43 
  44 DEMOFILES= \
  45                 00README \
  46                 Makefile.com \
  47                 Makefile.targ \
  48                 common/bpt.c \
  49                 common/dis.c \
  50                 common/disasm.c \
  51                 common/disasm.h \
  52                 common/main.c \
  53                 common/ps.c \
  54                 common/gram.y \
  55                 common/lex.l \
  56                 common/globals.c \
  57                 common/help.c \
  58                 common/utils.c \
  59                 common/maps.c \
  60                 common/syms.c \
  61                 common/callstack.c \
  62                 common/rdb.h \
  63                 common/rdb.man \
  64                 tests/breaks \
  65                 tests/loadmaps \
  66                 tests/object_padding_maps \
  67                 tests/plt_skip \
  68                 tests/steps \
  69                 tests/test-sparc-regs \
  70                 tests/simp.c \
  71                 tests/sub.c \
  72                 $(MACHDEMOFILES)
  73 
  74 ROOTDEMODIRBASE=        $(ROOT)/usr/demo/librtld_db
  75 
  76 ROOTDEMODIRS=   $(ROOTDEMODIRBASE) \
  77                 $(ROOTDEMODIRBASE)/common \
  78                 $(ROOTDEMODIRBASE)/tests \
  79                 $(ROOTDEMODIRBASE)/i386 \
  80                 $(ROOTDEMODIRBASE)/amd64 \
  81                 $(ROOTDEMODIRBASE)/sparc \
  82                 $(ROOTDEMODIRBASE)/sparcv9
  83 
  84 ROOTDEMOFILES=  $(DEMOFILES:%=$(ROOTDEMODIRBASE)/%)
  85 
  86 $(ROOTDEMODIRS) :=      DIRMODE =       755
  87 
  88 SED=            sed -e "/DEMO DELETE START/,/DEMO DELETE END/d"
  89 
  90 CLEANFILES=     *.demo */*.demo
  91 
  92 .KEEP_STATE:
  93 .PARALLEL:      $(ROOTDEMOFILES)
  94 
  95 all catalog chkmsg:
  96 
  97 install:        $(ROOTDEMODIRS) .WAIT $(ROOTDEMOFILES)
  98 
  99 clean clobber: FRC
 100                 $(RM) $(CLEANFILES)
 101 
 102 $(ROOTDEMODIRS):
 103                 $(INS.dir)
 104 
 105 $(ROOTDEMODIRBASE)/Makefile.%: Makefile.%.demo
 106                 $(INS.rename)
 107 
 108 $(ROOTDEMODIRBASE)/%/Makefile: %/Makefile.demo
 109                 $(INS.rename)
 110 
 111 Makefile.%.demo: Makefile.%
 112                 $(SED) < $< > $@
 113 
 114 %/Makefile.demo: %/Makefile
 115                 $(SED) < $< > $@
 116 
 117 $(ROOTDEMODIRBASE)/%: %
 118                 $(INS.file)
 119 
 120 $(ROOTDEMODIRBASE)/common/%:    common/%
 121                 $(INS.file)
 122 
 123 $(ROOTDEMODIRBASE)/tests/%:     tests/%
 124                 $(INS.file)
 125 
 126 $(ROOTDEMODIRBASE)/sparc/%:     sparc/%
 127                 $(INS.file)
 128 
 129 $(ROOTDEMODIRBASE)/sparcv9/%:   sparcv9/%
 130                 $(INS.file)
 131 
 132 $(ROOTDEMODIRBASE)/i386/%:      i386/%
 133                 $(INS.file)
 134 
 135 FRC: