dmake: do not set MAKEFLAGS=k
[unleashed/tickless.git] / usr / src / cmd / saf / Makefile
blob8d3d938c3ea7f70e3afe7008c3f8def0bade9464
2 # CDDL HEADER START
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.
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.
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]
19 # CDDL HEADER END
22 # Copyright 2009 Sun Microsystems, Inc. All rights reserved.
23 # Use is subject to license terms.
26 PROG= sac sacadm pmadm
28 MANIFEST = sac.xml
30 include ../Makefile.cmd
32 ROOTMANIFESTDIR = $(ROOTSVCSYSTEM)
34 SACOBJ= sac.o readtab.o global.o log.o misc.o
35 SACOBJS= $(SACOBJ) util1.o
36 SACADMOBJ= sacadm.o admutil.o
37 SACADMOBJS= $(SACADMOBJ) util2.o
38 PMADMOBJ= pmadm.o admutil.o
39 PMADMOBJS= $(PMADMOBJ) util2.o
40 SACSRC= $(SACOBJ:%.o=%.c)
41 SACSRCS= $(SACSRC) util.c
42 SACADMSRC= $(SACADMOBJ:%.o=%.c)
43 SACADMSRCS= $(SACADMSRC) util.c
44 PMADMSRC= $(PMADMOBJ:%.o=%.c)
45 PMADMSRCS= $(PMADMSRC) util.c
46 OBJS= $(SACOBJS) $(SACADMOBJS) $(PMADMOBJS)
48 LIBSAFD = $(ROOTLIB)/saf
49 DIRS= $(LIBSAFD)
50 SACF= sac
51 ADMF= sacadm pmadm
52 ROOTSACF= $(SACF:%=$(LIBSAFD)/%)
53 ROOTADMF= $(ADMF:%=$(ROOTUSRSBIN)/%)
55 LDFLAGS += $(MAPFILE.NGB:%=-Wl,-M%)
57 CERRWARN += -Wno-implicit-function-declaration
58 CERRWARN += -Wno-parentheses
59 CERRWARN += -Wno-unused-variable
60 CERRWARN += -Wno-extra
62 util1.o := CPPFLAGS += -DSAC
63 util2.o := CPPFLAGS += -USAC
65 sac := LDLIBS += -lpam
67 $(ROOTUSRSBIN)/sacadm := FILEMODE = 04755
69 $(LIBSAFD)/% : %
70 $(INS.file)
72 .KEEP_STATE:
74 .PARALLEL: $(OBJS)
76 all: $(PROG)
78 sac: $(SACOBJS) $(MAPFILE.NGB)
79 $(LINK.c) $(SACOBJS) -o $@ $(LDLIBS)
80 $(POST_PROCESS)
82 sacadm: $(SACADMOBJS) $(MAPFILE.NGB)
83 $(LINK.c) $(SACADMOBJS) -o $@ $(LDLIBS)
84 $(POST_PROCESS)
86 pmadm: $(PMADMOBJS) $(MAPFILE.NGB)
87 $(LINK.c) $(PMADMOBJS) -o $@ $(LDLIBS)
88 $(POST_PROCESS)
90 util1.o: util.c
91 $(COMPILE.c) -o $@ util.c
93 util2.o: util.c
94 $(COMPILE.c) -o $@ util.c
96 install: all .WAIT $(ROOTSACF) $(ROOTADMF) $(ROOTMANIFEST)
98 # Don't install dirs already installed by Targetdirs
99 #$(DIRS):
100 # $(INS.dir)
102 check: $(CHKMANIFEST)
104 clean:
105 $(RM) $(OBJS)
107 include ../Makefile.targ