xref: /freebsd/crypto/krb5/src/util/ss/Makefile.in (revision 9f0f30bc1f5f08d25243952bad3fdc6e13a75c2a)
1mydir=util$(S)ss
2BUILDTOP=$(REL)..$(S)..
3SED = sed
4
5INSTALLLIB=cp
6INSTALLFILE=cp
7
8all:
9
10TOP=$(BUILDTOP)
11
12LIBBASE=ss
13LIBMAJOR=1
14LIBMINOR=0
15RELDIR=../util/ss
16
17clean-unix:: clean-liblinks clean-libs clean-libobjs
18install-unix: install-libs
19
20# hard coded srcdir/.. is so that ss/ss.h works
21
22# hard coded .. is so that ss/ss_err.h works
23# hard coded ../et is so com_err.h works
24# CFLAGS= -g
25# CPPFLAGS= -I${INCDIR} -I. -I.. -I../et
26LOCALINCLUDES= -I. -I$(srcdir)/ $(RL_CFLAGS)
27
28# with ss_err.o first, ss_err.h should get rebuilt first too.  should not
29# be relying on this, though.
30STLIBOBJS=\
31	ss_err.o \
32	std_rqs.o \
33	invocation.o help.o \
34	execute_cmd.o listen.o parse.o error.o prompt.o \
35	request_tbl.o list_rqs.o pager.o requests.o \
36	data.o
37
38SRCS=	$(srcdir)/invocation.c $(srcdir)/help.c \
39	$(srcdir)/execute_cmd.c $(srcdir)/listen.c $(srcdir)/parse.c \
40	$(srcdir)/error.c $(srcdir)/prompt.c \
41	$(srcdir)/request_tbl.c $(srcdir)/list_rqs.c $(srcdir)/pager.c \
42	$(srcdir)/requests.c $(srcdir)/data.c
43EXTRADEPSRCS= ss_err.c std_rqs.c
44depend-dependencies: ss_err.h includes
45
46std_rqs.o: std_rqs.c ss_err.h
47
48MKCMDSOBJS=	mk_cmds.o utils.o options.o ct.tab.o cmd_tbl.lex.o
49
50#
51# stuff to build
52#
53
54all-unix:	mk_cmds ct_c.awk ct_c.sed includes # libss_p.a lint
55all-unix: all-liblinks
56all-windows:  all-unix
57
58dist:	archives
59
60install:
61
62includes: mk_cmds ct_c.sed ct_c.awk ss_err.h
63
64HDRDIR=$(BUILDTOP)/include/ss
65HDRS =	$(HDRDIR)/ss.h \
66	$(HDRDIR)/ss_err.h
67
68BUILD_HDRS = ss_err.h
69SRC_HDRS = ss.h
70SRC_HDRS_DEP = $(srcdir)/ss.h
71
72generate-files-mac: ct_c.awk ct_c.sed std_rqs.c ss_err.h
73
74includes: $(HDRS)
75$(HDRDIR)/timestamp:
76	if [ -d $(HDRDIR) ] ; then :; else mkdir -p $(HDRDIR); fi
77	echo timestamp > $(HDRDIR)/timestamp
78$(HDRDIR)/ss.h: ss.h $(HDRDIR)/timestamp
79	$(RM) $(HDRDIR)/ss.h
80	$(CP) $(srcdir)/ss.h $(HDRDIR)/ss.h
81$(HDRDIR)/ss_err.h: ss_err.h $(HDRDIR)/timestamp
82	$(RM) $(HDRDIR)/ss_err.h
83	$(CP) ss_err.h $(HDRDIR)/ss_err.h
84
85clean-unix::
86	$(RM) $(HDRS) $(HDRDIR)/timestamp
87	$(RM) -r $(HDRDIR)
88
89std_rqs.c: std_rqs.ct mk_cmds ct_c.sed ct_c.awk
90
91ss_err.h: ss_err.et
92
93ss_err.c: ss_err.et
94
95depend: ss_err.h
96
97ct.tab.c ct.tab.h: ct.y
98	$(RM) ct.tab.* y.*
99	$(YACC) -d $(srcdir)/ct.y
100	$(MV) y.tab.c ct.tab.c
101	$(MV) y.tab.h ct.tab.h
102
103# install_library_target(ss,$(OBJS),$(SRCS),)
104
105mk_cmds: $(srcdir)/mk_cmds.sh $(srcdir)/config_script
106	$(SHELL) $(srcdir)/config_script $(srcdir)/mk_cmds.sh . $(AWK) $(SED) > mk_cmds
107	chmod 755 mk_cmds
108
109ct_c.awk: $(srcdir)/ct_c_awk.in
110	$(RM) $@
111	$(CP) $(srcdir)/ct_c_awk.in $@
112
113ct_c.sed: $(srcdir)/ct_c_sed.in
114	$(SED) -e '/^#/d' $(srcdir)/ct_c_sed.in > ct_c.sed
115
116clean:
117	$(RM) ss_err.o ss_err.c ss_err.h std_rqs.c
118	$(RM) mk_cmds ct_c.awk ct_c.sed $(MKCMDSOBJS)
119	rm -f *.o *~ \#* *.bak core \
120		ss_err.h ct.tab.c ct.tab.h cmd_tbl.lex.c \
121		lex.yy.c y.tab.c \
122		libss.a libss_p.a llib-lss.ln mk_cmds \
123		ss.ar ss.tar \
124		TAGS test_ss
125
126@libpriv_frag@
127@lib_frag@
128@libobj_frag@
129
130