dmake: do not set MAKEFLAGS=k
[unleashed/tickless.git] / usr / src / cmd / gss / gssd / Makefile
blob95306670ada6ae55dbdd32faf60b7de10dd7162d
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 TESTPROG = gssdtest
28 OUTPUT_OPTION = -I.
30 PROG= gssd
32 MANIFEST= gss.xml
34 GSSD_BASEOBJS = gssd.o gssd_proc.o gssd_generic.o gssd_getuid.o
35 GSSC_BASEOBJS = gssdtest.o gssd_release_name_and_type.o gssd_clnt_stubs.o \
36 gssd_handle.o
38 GD_OBJS = gssd_svc.o
39 GC_OBJS = gssd_clnt.o
40 G_OBJS = gssd_xdr.o
41 GSSDOBJS = $(GSSD_BASEOBJS) $(GD_OBJS) $(G_OBJS)
42 GSSCOBJS = $(GSSC_BASEOBJS) $(GC_OBJS) $(G_OBJS)
44 ROBJS = $(GD_OBJS) $(GC_OBJS) $(G_OBJS)
45 OBJS = $(GSSD_BASEOBJS) $(GD_OBJS) $(GSSC_BASEOBJS) $(GC_OBJS) $(G_OBJS)
46 SRCS = $(OBJS:.o=.c)
47 RSRC = $(ROBJS:.o=.c)
48 RSRC += gssd.h
50 CLOBBERFILES += $(TESTPROG)
52 include ../../Makefile.cmd
54 ROOTMANIFESTDIR= $(ROOTSVCNETWORKRPC)
56 TEXT_DOMAIN = SUNW_OST_NETRPC
57 POFILE = $(PROG).po
58 POFILES = generic.po
61 # Override $ROOTLIB
63 ROOTLIB= $(ROOT)/usr/lib/gss
65 DIRS= $(ROOTLIB)
67 CPPFLAGS += -I$(SRC)/uts/common/gssapi/include
68 COPTFLAG += #-I$(KINCDIR)
70 CERRWARN += -Wno-unused-variable
71 CERRWARN += -Wno-implicit-function-declaration
72 CERRWARN += -Wno-parentheses
73 CERRWARN += -Wno-uninitialized
75 LDLIBS += -lgss
77 gssd := MAPFILES = $(MAPFILE.INT) $(MAPFILE.NGB)
78 gssd := LDFLAGS += $(MAPFILES:%=-Wl,-M%)
80 $(GPROGS) := CPPFLAGS += -DSYSV -DSunOS=50
82 .KEEP_STATE:
84 all: $(PROG) $(TESTPROG)
86 $(ROOTLIB):
87 $(INS.dir)
89 $(ROOTLIB)/%: %
90 $(INS.file)
92 gssd: $(GSSDOBJS) $$(MAPFILES)
93 $(LINK.c) $(GSSDOBJS) -o $@ $(LDLIBS)
94 $(POST_PROCESS)
96 gssdtest: $(GSSCOBJS)
97 $(LINK.c) $(GSSCOBJS) -o $@ $(LDLIBS)
98 $(POST_PROCESS)
100 GSSDX= $(SRC)/uts/common/gssapi/gssd.x
101 gssd.x: $(GSSDX)
102 rm -f $@
103 cp $(GSSDX) $@
105 # Rules to generate derived rpcgen files from gssd.x spec file.
107 # NOTE WELL: There is code in gssd that assumes gssd is NOT
108 # multi-threaded. Do NOT add -A to the rpcgen argument list in the
109 # Makefile unless you also remove this assumption.
111 gssd.h: gssd.x
112 $(RM) $@
113 $(RPCGEN) -M -h gssd.x > $@
115 gssd_clnt.c: gssd.x
116 $(RM) $@
117 $(RPCGEN) -M -l gssd.x > $@
119 gssd_svc.c: gssd.x
120 $(RM) $@
121 $(RPCGEN) -M -m gssd.x > $@
123 gssd_xdr.c: gssd.x
124 $(RM) $@
125 $(RPCGEN) -M -c gssd.x > $@
127 $(OBJS): gssd.h
129 install: all $(DIRS) $(ROOTLIBPROG) $(ROOTMANIFEST)
131 install_h:
133 clean:
134 $(RM) $(OBJS) $(RSRC) gssd.x
136 check: $(CHKMANIFEST)
138 include ../../Makefile.targ
140 $(POFILE): $(DERIVED_FILES) .WAIT $(POFILES)
141 $(RM) $@
142 $(CAT) $(POFILES) > $@
144 generic.po: FRC
145 $(RM) messages.po
146 $(XGETTEXT) $(XGETFLAGS) `$(GREP) -l gettext *.[ch]`
147 $(SED) "/^domain/d" messages.po > $@
148 $(RM) messages.po
150 FRC: