|
root / base / usr / src / cmd / krb5 / kproplog / Makefile
Makefile Makefile 77 lines 1.9 KB
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
#
# Copyright 2004 Sun Microsystems, Inc.  All rights reserved.
# Use is subject to license terms.
#
# Copyright (c) 2018, Joyent, Inc.

PROG		=	kproplog

OBJS		=	kproplog.o
DERIVED_OBJS	=	iprop_xdr.o

SRCS=	$(OBJS:.o=.c)
SRCS+=	$(DERIVED_OBJS:.o=.c)

RSRC=	kproplog.c

# Definitions needed to rpcgen iprop-related files
ISRC= iprop.h iprop_xdr.c
KRB5IPROPDIR= $(SRC)/cmd/krb5/iprop
CMD= grep -v "usr/src/cmd/krb5/iprop" > $@

include	../../Makefile.cmd
include $(SRC)/lib/gss_mechs/mech_krb5/Makefile.mech_krb5

TEXT_DOMAIN = SUNW_OST_OSCMD
POFILE	= kproplog.po
POFILES	= generic.po

LDFLAGS		+=	-R$(KRB5RUNPATH) $(KRUNPATH)
# Hammerhead: GNU ld needs rpath-link for transitive deps (libdyn, libkdb) via libkadm5clnt
LDFLAGS		+=	-Wl,-rpath-link,$(ROOT)/usr/lib/krb5
LDLIBS		+=	-L$(KRB5LIB) $(KLIB) -lnsl -lkdb -lkadm5clnt

CPPFLAGS	+=	-I. -I$(SRC)/lib/krb5 \
			-I$(KRB5IPROPDIR) \
			-I$(SRC)/lib/gss_mechs/mech_krb5/include \
			-I$(SRC)/uts/common/gssapi/mechs/krb5/include

CERRWARN	+=	-Wno-unused-variable
CERRWARN	+=	-Wno-unused-function
CERRWARN	+=	-Wno-implicit-function-declaration
# Hammerhead: Suppress xdr_longlong_t type mismatch warnings (iprop_xdr.c)
CERRWARN	+=	-Wno-incompatible-pointer-types

# not linted
SMATCH=off

all:		$(PROG)

$(PROG):	$(OBJS) $(DERIVED_OBJS)
	$(LINK.c) $(OBJS) $(DERIVED_OBJS) -o $@ $(LDLIBS)
	$(POST_PROCESS)

# Hammerhead: pre-generated (rpcgen + GNU cpp truncation bug)
# iprop.h and iprop_xdr.c are now committed source files.

# Explicitly state the dependancy on iprop.h
$(OBJS): iprop.h

install:	$(KRB5SBINPROG)

clean:
	$(RM) $(OBJS) $(DERIVED_OBJS)
	@# Hammerhead: do not delete pre-generated $(ISRC)

include ../../Makefile.targ

$(POFILE): $(DERIVED_FILES) .WAIT $(POFILES)
	$(RM) $@
	$(CAT) $(POFILES) > $@

generic.po:
	$(RM) messages.po
	$(XGETTEXT) $(XGETFLAGS) `$(GREP) -l gettext *.[ch]`
	$(SED) "/^domain/d" messages.po > $@
	$(RM) messages.po