Makefile revision fa9e4066f08beec538e775443c5be79dd423fcab
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe#
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe# CDDL HEADER START
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe#
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe# The contents of this file are subject to the terms of the
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe# Common Development and Distribution License, Version 1.0 only
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe# (the "License"). You may not use this file except in compliance
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe# with the License.
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe#
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe# or http://www.opensolaris.org/os/licensing.
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe# See the License for the specific language governing permissions
a9478106a12424322498e53cf7cd75bd8a4d6004Yuri Pankov# and limitations under the License.
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe#
a9478106a12424322498e53cf7cd75bd8a4d6004Yuri Pankov# When distributing Covered Code, include this CDDL HEADER in each
a9478106a12424322498e53cf7cd75bd8a4d6004Yuri Pankov# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe# If applicable, add the following below this CDDL HEADER, with the
a9478106a12424322498e53cf7cd75bd8a4d6004Yuri Pankov# fields enclosed by brackets "[]" replaced with your own identifying
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe# information: Portions Copyright [yyyy] [name of copyright owner]
a9478106a12424322498e53cf7cd75bd8a4d6004Yuri Pankov#
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe# CDDL HEADER END
a9478106a12424322498e53cf7cd75bd8a4d6004Yuri Pankov#
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe#
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe# Copyright 2005 Sun Microsystems, Inc. All rights reserved.
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe# Use is subject to license terms.
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe#
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe# ident "%Z%%M% %I% %E% SMI"
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe#
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Loweinclude ../Makefile.cmd
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe
c10c16dec587a0662068f6e2991c29ed3a9db943Richard LoweROOTSEC = $(ROOTETC)/security
c10c16dec587a0662068f6e2991c29ed3a9db943Richard LoweROOTSECDEV = $(ROOTSEC)/dev
c10c16dec587a0662068f6e2991c29ed3a9db943Richard LoweROOTSECLIB = $(ROOTSEC)/lib
c10c16dec587a0662068f6e2991c29ed3a9db943Richard LoweROOTDIRS = $(ROOTSECDEV) $(ROOTSECLIB)
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe
c10c16dec587a0662068f6e2991c29ed3a9db943Richard LowePROG1 = allocate
c10c16dec587a0662068f6e2991c29ed3a9db943Richard LowePROG2 = mkdevmaps mkdevalloc
c10c16dec587a0662068f6e2991c29ed3a9db943Richard LowePROG3 = audio_clean
a9478106a12424322498e53cf7cd75bd8a4d6004Yuri PankovPROG = $(PROG1) $(PROG2) $(PROG3)
c10c16dec587a0662068f6e2991c29ed3a9db943Richard LoweDEFILE = deallocate
c10c16dec587a0662068f6e2991c29ed3a9db943Richard LoweLISTFILE = list_devices
c10c16dec587a0662068f6e2991c29ed3a9db943Richard LoweRTLCKS = audio fd0 sr0 st0 st1
c10c16dec587a0662068f6e2991c29ed3a9db943Richard LoweSCRIPTS = st_clean fd_clean sr_clean
a9478106a12424322498e53cf7cd75bd8a4d6004Yuri PankovALLSCRIPTS = allscripts.sh
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe
a9478106a12424322498e53cf7cd75bd8a4d6004Yuri PankovPOFILE= allocate_all.po
c10c16dec587a0662068f6e2991c29ed3a9db943Richard LowePOFILES= $(OBJS:%.o=%.po) $(ALLSCRIPTS:%.sh=%.po)
a9478106a12424322498e53cf7cd75bd8a4d6004Yuri Pankov
a9478106a12424322498e53cf7cd75bd8a4d6004Yuri Pankov# make DFLAGS=-DDEBUG
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe
c10c16dec587a0662068f6e2991c29ed3a9db943Richard LoweDFLAGS=
c10c16dec587a0662068f6e2991c29ed3a9db943Richard LoweCPPFLAGS += $(DFLAGS)
a9478106a12424322498e53cf7cd75bd8a4d6004Yuri Pankov
c10c16dec587a0662068f6e2991c29ed3a9db943Richard LoweROOTPROG = $(PROG1:%=$(ROOTUSRSBIN)/%) $(PROG2:%=$(ROOTUSRSBIN)/%) \
a9478106a12424322498e53cf7cd75bd8a4d6004Yuri Pankov $(PROG3:%=$(ROOTSECLIB)/%)
ROOTLOCKS= $(RTLCKS:%=$(ROOTSECDEV)/%)
ROOTSCRIPTS= $(SCRIPTS:%=$(ROOTSECLIB)/%)
CLOBBERFILES += $(SCRIPTS)
allocate := POBJS = allocate.o allocate3.o
mkdevmaps := POBJS = mkdevmaps.o
mkdevalloc := POBJS = mkdevalloc.o
audio_clean := POBJS = audio_clean.o
OBJS = allocate.o allocate3.o audio_clean.o mkdevmaps.o mkdevalloc.o
SRCS = $(OBJS:%.o=%.c)
FILEMODE= 0755
DIRMODE= 0755
OWNER= root
GROUP= sys
$(ROOTUSRSBIN)/% := OWNER = root
$(ROOTUSRSBIN)/% := GROUP = bin
$(ROOTUSRSBIN)/allocate := FILEMODE = 04755
$(ROOTUSRSBIN)/deallocate := FILEMODE = 04755
$(ROOTUSRSBIN)/list_devices := FILEMODE = 04755
$(ROOTSECDEV)/% := FILEMODE = 0400
$(ROOTSECDEV)/% := OWNER = root
$(ROOTSECDEV)/% := GROUP = bin
$(ROOTSECLIB)/% := FILEMODE = 0751
allocate := LDLIBS += -lbsm -lsec -lsecdb
.KEEP_STATE:
all : $(PROG) $(RTLCKS) $(SCRIPTS)
install : all $(ROOTDIRS) $(ROOTPROG) $(ROOTLOCKS) $(ROOTSCRIPTS)
$(RM) $(ROOTUSRSBIN)/$(DEFILE)
$(LN) $(ROOTUSRSBIN)/$(PROG1) $(ROOTUSRSBIN)/$(DEFILE)
$(RM) $(ROOTUSRSBIN)/$(LISTFILE)
$(LN) $(ROOTUSRSBIN)/$(PROG1) $(ROOTUSRSBIN)/$(LISTFILE)
$(PROG) : $$(POBJS)
$(LINK.c) $(POBJS) -o $@ $(LDLIBS)
$(POST_PROCESS)
$(RTLCKS):
$(TOUCH) $@
$(ROOTDIRS):
$(INS.dir)
$(ROOTSECDEV)/%: %
$(INS.file)
$(ROOTSECLIB)/%: %
$(INS.file)
$(POFILE): $(POFILES)
$(RM) $@; $(CAT) $(POFILES) > $@; $(RM) $(POFILES)
#
# Concatenate all the scripts into one before we build the catalogue.
# Done to shrink the catalogue since some messages are shared between
# the various scripts.
#
$(ALLSCRIPTS): $(SCRIPTS:%=%.sh)
$(CAT) $(SCRIPTS:%=%.sh) > $@
clean :
$(RM) $(OBJS) $(RTLCKS) $(ALLSCRIPTS)
lint : lint_SRCS
strip :
$(STRIP) $(PROG)
include ../Makefile.targ