dmake: do not set MAKEFLAGS=k
[unleashed/tickless.git] / usr / src / cmd / logadm / Makefile
blob2d616a0ce985de324f5bb0c702828d476edaab32
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 (c) 2001, 2010, Oracle and/or its affiliates. All rights reserved.
25 PROG= logadm
26 TESTS= conftest globtest kwtest luttest optstest
27 OBJS= conf.o err.o fn.o glob.o kw.o lut.o main.o opts.o
28 TESTOBJS= $(TESTS:%=%.o)
29 SRCS= $(OBJS:%.o=%.c)
30 POFILES= $(OBJS:%.o=%.po)
31 CONFIGFILE= logadm.conf
33 include ../Makefile.cmd
35 CPPFLAGS += -D_FILE_OFFSET_BITS=64
36 CERRWARN += -Wno-parentheses
37 CERRWARN += -Wno-clobbered
38 CERRWARN += -Wno-uninitialized
39 XGETFLAGS += -a -x logadm.xcl
41 $(ROOTETC)/$(CONFIGFILE):= FILEMODE= 644
43 CLOBBERFILES += $(TESTS)
45 LOGADMDIR = $(ROOT)/etc/logadm.d
47 MFSTFILES = logadm-upgrade.xml
48 MANIFESTDIR = $(ROOT)/lib/svc/manifest/system
49 MANIFEST = $(MFSTFILES:%=$(MANIFESTDIR)/%)
50 $(MANIFEST) := FILEMODE = 0444
52 METHODFILES = logadm-upgrade
53 METHODDIR = $(ROOT)/lib/svc/method
54 METHOD = $(METHODFILES:%=$(METHODDIR)/%)
55 $(METHOD) := FILEMODE = 0555
57 .KEEP_STATE:
59 all: $(PROG)
61 test: $(TESTS) $(PROG)
62 $(PERL) -w ./tester `pwd`
64 $(PROG): $(OBJS)
65 $(LINK.c) -o $@ $(OBJS) $(LDLIBS)
66 $(POST_PROCESS)
68 install: all $(ROOTUSRSBINPROG) $(ROOTETC)/$(CONFIGFILE) $(LOGADMDIR) \
69 $(MANIFESTDIR) $(MANIFEST) $(METHODDIR) $(METHOD)
71 $(LOGADMDIR):
72 $(INS.dir)
74 $(MANIFESTDIR):
75 $(INS.dir)
77 $(MANIFESTDIR)/% : %
78 $(INS.file)
80 $(METHODDIR):
81 $(INS.dir)
83 $(METHODDIR)/% : %
84 $(INS.file)
86 $(POFILE): $(POFILES)
87 $(RM) $@
88 cat $(POFILES) > $@
90 clean:
91 $(RM) $(OBJS) $(TESTOBJS)
94 include ../Makefile.targ
97 # dependencies for various test programs built from same source
99 %test.o: %.c
100 $(COMPILE.c) -DTESTMODULE -o $@ $<
101 $(POST_PROCESS_O)
103 conftest: conftest.o err.o fn.o lut.o opts.o
104 $(LINK.c) -o conftest conftest.o err.o fn.o lut.o opts.o $(LDLIBS)
105 $(POST_PROCESS)
107 globtest: globtest.o lut.o err.o fn.o
108 $(LINK.c) -o globtest globtest.o lut.o err.o fn.o $(LDLIBS)
109 $(POST_PROCESS)
111 kwtest: kwtest.o err.o fn.o lut.o
112 $(LINK.c) -o kwtest kwtest.o err.o fn.o lut.o $(LDLIBS)
113 $(POST_PROCESS)
115 luttest: luttest.o err.o
116 $(LINK.c) -o luttest luttest.o err.o $(LDLIBS)
117 $(POST_PROCESS)
119 optstest: optstest.o err.o fn.o lut.o
120 $(LINK.c) -o optstest optstest.o err.o fn.o lut.o $(LDLIBS)
121 $(POST_PROCESS)