xref: /illumos-gate/usr/src/cmd/krb5/kadmin/cli/Makefile (revision d17be682a2c70b4505d43c830bbd2603da11918d)
1#
2# Copyright 2008 Sun Microsystems, Inc.  All rights reserved.
3# Use is subject to license terms.
4#
5# Copyright (c) 2018, Joyent, Inc.
6
7PROG= kadmin kadmin.local
8SHFILES= k5srvutil
9CLOBBERFILES= $(SHFILES)
10
11KRB5SBINSHFILES= $(SHFILES:%=$(KRB5SBIN)/%)
12
13COMMON_OBJS   = kadmin.o kadmin_ct.o ss_wrapper.o getdate.o keytab.o
14RMT_OBJS= $(COMMON_OBJS) kadmin_rmt.o
15LOC_OBJS= $(COMMON_OBJS) kadmin_loc.o
16OBJS	= $(COMMON_OBJS) $(RMT_OBJS) $(LOC_OBJS)
17SRCS	= $(OBJS:.o=.c)
18
19include ../../../Makefile.cmd
20include $(SRC)/lib/gss_mechs/mech_krb5/Makefile.mech_krb5
21
22POFILE = generic.po
23POFILES = kadmin.po k5srvutil.po
24
25DEFS = -DHAVE_LIBSOCKET=1 -DHAVE_LIBNSL=1 -DHAVE_UNISTD_H=1 -DHAVE_SYS_TIMEB_H=1 \
26	-DHAVE_ALLOCA_H=1 -DHAVE_FTIME=1 -DHAVE_TIMEZONE
27
28CPPFLAGS += -I$(SRC)/uts/common/gssapi/include/ \
29		-I$(SRC)/uts/common/gssapi/mechs/krb5/include \
30		-I$(SRC)/uts/common/gssapi/include \
31		-I$(SRC)/cmd/krb5/iprop \
32		-I$(SRC)/lib/krb5 \
33		-I$(SRC)/lib/gss_mechs/mech_krb5/include $(DEFS)
34
35CERRWARN += -_gcc=-Wno-implicit-function-declaration
36CERRWARN += -_gcc=-Wno-unused-label
37CERRWARN += -_gcc=-Wno-unused-function
38CERRWARN += -_gcc=-Wno-parentheses
39CERRWARN += -_gcc=-Wno-unused-variable
40
41SMATCH=off
42
43SHAREDLIBS = -lmech_krb5 -lss
44
45CLLIBS = $(LDLIBS) $(KRUNPATH) $(KERBRUNPATH) \
46	-L$(ROOT_KLIBDIR) -L$(KRB5LIB) $(SHAREDLIBS) -lkadm5clnt
47
48SRVLIBS = $(LDLIBS) $(KRUNPATH) $(KERBRUNPATH) \
49	-L$(ROOT_KLIBDIR) -L$(KRB5LIB) $(SHAREDLIBS) -lkadm5srv
50
51kadmin.local:=	DEFS += -D_KADMIN_LOCAL_
52
53.KEEP_STATE:
54
55all: $(PROG) $(SHFILES)
56
57kadmin:	$(RMT_OBJS)
58	$(LINK.c) $(RMT_OBJS) -o $@ $(CLLIBS)
59	$(POST_PROCESS)
60
61kadmin.local:	$(LOC_OBJS)
62	$(LINK.c) $(LOC_OBJS) -o $@ $(SRVLIBS)
63	$(POST_PROCESS)
64
65$(SHFILES): $(SHFILES).sh
66	$(RM) $(SHFILES)
67	$(CP) $(SHFILES).sh $(SHFILES)
68
69install: $(KRB5SBINPROG) $(KRB5SBINSHFILES)
70
71clean:
72	$(RM) $(OBJS)
73
74include ../../../Makefile.targ
75
76$(POFILE): $(DERIVED_FILES) .WAIT $(POFILES)
77	$(RM) $@
78	$(CAT) $(POFILES) > $@
79
80kadmin.po: FRC
81	$(RM) messages.po
82	$(XGETTEXT) $(XGETFLAGS) `$(GREP) -l gettext *.[ch]`
83	$(SED) "/^domain/d" messages.po > $@
84	$(RM) messages.po
85
86FRC:
87