xref: /illumos-gate/usr/src/cmd/krb5/kadmin/cli/Makefile (revision 66582b606a8194f7f3ba5b3a3a6dca5b0d346361)
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
43COPTFLAG += $(XESS) #-I$(KINCDIR)
44
45SHAREDLIBS = -lmech_krb5 -lss
46
47CLLIBS = $(LDLIBS) $(KRUNPATH) $(KERBRUNPATH) \
48	-L$(ROOT_KLIBDIR) -L$(KRB5LIB) $(SHAREDLIBS) -lkadm5clnt
49
50SRVLIBS = $(LDLIBS) $(KRUNPATH) $(KERBRUNPATH) \
51	-L$(ROOT_KLIBDIR) -L$(KRB5LIB) $(SHAREDLIBS) -lkadm5srv
52
53kadmin.local:=	DEFS += -D_KADMIN_LOCAL_
54
55.KEEP_STATE:
56
57all: $(PROG) $(SHFILES)
58
59kadmin:	$(RMT_OBJS)
60	$(LINK.c) $(RMT_OBJS) -o $@ $(CLLIBS)
61	$(POST_PROCESS)
62
63kadmin.local:	$(LOC_OBJS)
64	$(LINK.c) $(LOC_OBJS) -o $@ $(SRVLIBS)
65	$(POST_PROCESS)
66
67$(SHFILES): $(SHFILES).sh
68	$(RM) $(SHFILES)
69	$(CP) $(SHFILES).sh $(SHFILES)
70
71install: $(KRB5SBINPROG) $(KRB5SBINSHFILES)
72
73clean:
74	$(RM) $(OBJS)
75
76lint: lint_SRCS
77
78include ../../../Makefile.targ
79
80$(POFILE): $(DERIVED_FILES) .WAIT $(POFILES)
81	$(RM) $@
82	$(CAT) $(POFILES) > $@
83
84kadmin.po: FRC
85	$(RM) messages.po
86	$(XGETTEXT) $(XGETFLAGS) `$(GREP) -l gettext *.[ch]`
87	$(SED) "/^domain/d" messages.po > $@
88	$(RM) messages.po
89
90FRC:
91