summaryrefslogtreecommitdiffstats
path: root/src/util/ss/Makefile.in
blob: 55359420e4db3762c4ddef45b5699375b8ad50d3 (plain)
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
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
thisconfigdir=../..
myfulldir=util/ss
mydir=util/ss
BUILDTOP=$(REL)..$(S)..
SED = sed
DEFS=

INSTALLLIB=cp
INSTALLFILE=cp

all::

TOP=$(BUILDTOP)

LIBBASE=ss
LIBMAJOR=1
LIBMINOR=0
RELDIR=../util/ss

STOBJLISTS=OBJS.ST

clean-unix:: clean-liblinks clean-libs clean-libobjs
install-unix:: install-libs

# hard coded srcdir/.. is so that ss/ss.h works

# hard coded .. is so that ss/ss_err.h works
# hard coded ../et is so com_err.h works
# CFLAGS= -g
# CPPFLAGS= -I${INCDIR} -I. -I.. -I../et
LOCALINCLUDES= -I. -I$(srcdir)/

# with ss_err.o first, ss_err.h should get rebuilt first too.  should not
# be relying on this, though.
STLIBOBJS=\
	ss_err.o \
	std_rqs.o \
	invocation.o help.o \
	execute_cmd.o listen.o parse.o error.o prompt.o \
	request_tbl.o list_rqs.o pager.o requests.o \
	data.o

SRCS=	$(srcdir)/invocation.c $(srcdir)/help.c \
	$(srcdir)/execute_cmd.c $(srcdir)/listen.c $(srcdir)/parse.c \
	$(srcdir)/error.c $(srcdir)/prompt.c \
	$(srcdir)/request_tbl.c $(srcdir)/list_rqs.c $(srcdir)/pager.c \
	$(srcdir)/requests.c $(srcdir)/data.c
EXTRADEPSRCS= \
	$(srcdir)/mk_cmds.c $(srcdir)/utils.c $(srcdir)/options.c \
	cmd_tbl.lex.c ct.tab.c \
	ss_err.c \
	std_rqs.c
depend-dependencies: ss_err.h includes

std_rqs.o: std_rqs.c ss_err.h

CODE= $(SRCS) $(MKCMDSFILES)

MKCMDSOBJS=	mk_cmds.o utils.o options.o ct.tab.o cmd_tbl.lex.o

MKCMDSFILES=	mk_cmds.c utils.c options.c ct.y cmd_tbl.lex.l

MKCMDSCSRCS=	mk_cmds.c utils.c options.c ct.tab.c cmd_tbl.lex.c


HFILES=	ss.h mit-sipb-copyright.h
BUILT_HFILES = ss_err.h

# for 'tags' and dependencies

CFILES=	$(SRCS) $(MKCMDSCSRCS) test_ss.c

# for building archives

FILES=	$(SRCS) $(MKCMDSFILES) $(HFILES) \
	ss_err.et std_rqs.ct Makefile \
	test_ss.c ss mit-sipb-copyright.h copyright.h

#
# stuff to build
#

all-unix::	mk_cmds ct_c.awk ct_c.sed includes # libss_p.a lint
all-unix:: all-liblinks
all-windows::  all-unix

dist:	archives

install::

includes:: mk_cmds ct_c.sed ct_c.awk ss_err.h

HDRDIR=$(BUILDTOP)/include/ss
HDRS =	$(HDRDIR)/ss.h \
	$(HDRDIR)/ss_err.h

BUILD_HDRS = ss_err.h
SRC_HDRS = ss.h 
SRC_HDRS_DEP = $(srcdir)/ss.h

generate-files-mac: ct_c.awk ct_c.sed std_rqs.c ss_err.h

includes:: $(HDRS)
$(HDRDIR)/timestamp:
	if [ -d $(HDRDIR) ] ; then :; else mkdir -p $(HDRDIR); fi
	echo timestamp > $(HDRDIR)/timestamp
$(HDRDIR)/ss.h: ss.h $(HDRDIR)/timestamp
	$(RM) $(HDRDIR)/ss.h
	$(CP) $(srcdir)/ss.h $(HDRDIR)/ss.h
$(HDRDIR)/ss_err.h: ss_err.h $(HDRDIR)/timestamp
	$(RM) $(HDRDIR)/ss_err.h
	$(CP) ss_err.h $(HDRDIR)/ss_err.h

clean-unix::
	$(RM) $(HDRS) $(HDRDIR)/timestamp
	$(RM) -r $(HDRDIR)

std_rqs.c: std_rqs.ct mk_cmds ct_c.sed ct_c.awk

ss_err.h: ss_err.et

ss_err.c: ss_err.et

clean::
	$(RM) ss_err.o ss_err.c ss_err.h std_rqs.c

depend:: ss_err.h

ct.tab.c ct.tab.h: ct.y
	$(RM) ct.tab.* y.*
	$(YACC) -d $(srcdir)/ct.y
	$(MV) y.tab.c ct.tab.c
	$(MV) y.tab.h ct.tab.h

# install_library_target(ss,$(OBJS),$(SRCS),)

#mk_cmds: $(MKCMDSOBJS)
#	$(CC) $(ALL_CFLAGS) -o $@ $(MKCMDSOBJS) $(LEXLIB) $(BSDLIB)
#
#mk_cmds.o:	ss_err.h
#
#install::
#	$(INSTALLPROG) mk_cmds ${DESTDIR}$(PROGDIR)/mk_cmds

mk_cmds: $(srcdir)/mk_cmds.sh $(srcdir)/config_script 
	$(SHELL) $(srcdir)/config_script $(srcdir)/mk_cmds.sh . $(AWK) $(SED) > mk_cmds
	chmod 755 mk_cmds	

ct_c.awk: $(srcdir)/ct_c_awk.in
	$(RM) $@
	$(CP) $(srcdir)/ct_c_awk.in $@

ct_c.sed: $(srcdir)/ct_c_sed.in
	$(SED) -e '/^#/d' $(srcdir)/ct_c_sed.in > ct_c.sed

clean::
	$(RM) mk_cmds ct_c.awk ct_c.sed $(MKCMDSOBJS)

# 

clean::
	rm -f *.o *~ \#* *.bak core \
		ss_err.h ct.tab.c ct.tab.h cmd_tbl.lex.c \
		lex.yy.c y.tab.c \
		libss.a libss_p.a llib-lss.ln mk_cmds \
		ss.ar ss.tar \
		TAGS test_ss

@libpriv_frag@
@lib_frag@
@libobj_frag@

# +++ Dependency line eater +++
# 
# Makefile dependencies follow.  This must be the last section in
# the Makefile.in file
#
invocation.so invocation.po $(OUTPRE)invocation.$(OBJEXT): \
  $(BUILDTOP)/include/autoconf.h $(BUILDTOP)/include/ss/ss_err.h \
  $(COM_ERR_DEPS) $(SRCTOP)/include/k5-platform.h $(SRCTOP)/include/k5-thread.h \
  copyright.h invocation.c ss.h ss_internal.h
help.so help.po $(OUTPRE)help.$(OBJEXT): $(BUILDTOP)/include/autoconf.h \
  $(BUILDTOP)/include/ss/ss_err.h $(COM_ERR_DEPS) $(SRCTOP)/include/k5-platform.h \
  $(SRCTOP)/include/k5-thread.h copyright.h help.c ss.h \
  ss_internal.h
execute_cmd.so execute_cmd.po $(OUTPRE)execute_cmd.$(OBJEXT): \
  $(BUILDTOP)/include/autoconf.h $(BUILDTOP)/include/ss/ss_err.h \
  $(COM_ERR_DEPS) $(SRCTOP)/include/k5-platform.h $(SRCTOP)/include/k5-thread.h \
  copyright.h execute_cmd.c ss.h ss_internal.h
listen.so listen.po $(OUTPRE)listen.$(OBJEXT): $(BUILDTOP)/include/autoconf.h \
  $(BUILDTOP)/include/ss/ss_err.h $(COM_ERR_DEPS) $(SRCTOP)/include/k5-platform.h \
  $(SRCTOP)/include/k5-thread.h copyright.h listen.c \
  ss.h ss_internal.h
parse.so parse.po $(OUTPRE)parse.$(OBJEXT): $(BUILDTOP)/include/autoconf.h \
  $(BUILDTOP)/include/ss/ss_err.h $(COM_ERR_DEPS) $(SRCTOP)/include/k5-platform.h \
  $(SRCTOP)/include/k5-thread.h copyright.h parse.c ss.h \
  ss_internal.h
error.so error.po $(OUTPRE)error.$(OBJEXT): $(BUILDTOP)/include/autoconf.h \
  $(BUILDTOP)/include/ss/ss_err.h $(COM_ERR_DEPS) $(SRCTOP)/include/k5-platform.h \
  $(SRCTOP)/include/k5-thread.h copyright.h error.c ss.h \
  ss_internal.h
prompt.so prompt.po $(OUTPRE)prompt.$(OBJEXT): $(BUILDTOP)/include/autoconf.h \
  $(BUILDTOP)/include/ss/ss_err.h $(COM_ERR_DEPS) $(SRCTOP)/include/k5-platform.h \
  $(SRCTOP)/include/k5-thread.h copyright.h prompt.c \
  ss.h ss_internal.h
request_tbl.so request_tbl.po $(OUTPRE)request_tbl.$(OBJEXT): \
  $(BUILDTOP)/include/autoconf.h $(BUILDTOP)/include/ss/ss_err.h \
  $(COM_ERR_DEPS) $(SRCTOP)/include/k5-platform.h $(SRCTOP)/include/k5-thread.h \
  copyright.h request_tbl.c ss.h ss_internal.h
list_rqs.so list_rqs.po $(OUTPRE)list_rqs.$(OBJEXT): \
  $(BUILDTOP)/include/autoconf.h $(BUILDTOP)/include/ss/ss_err.h \
  $(COM_ERR_DEPS) $(SRCTOP)/include/k5-platform.h $(SRCTOP)/include/k5-thread.h \
  copyright.h list_rqs.c ss.h ss_internal.h
pager.so pager.po $(OUTPRE)pager.$(OBJEXT): $(BUILDTOP)/include/autoconf.h \
  $(BUILDTOP)/include/ss/ss_err.h $(COM_ERR_DEPS) $(SRCTOP)/include/k5-platform.h \
  $(SRCTOP)/include/k5-thread.h copyright.h pager.c ss.h \
  ss_internal.h
requests.so requests.po $(OUTPRE)requests.$(OBJEXT): \
  $(BUILDTOP)/include/autoconf.h $(BUILDTOP)/include/ss/ss_err.h \
  $(COM_ERR_DEPS) $(SRCTOP)/include/k5-platform.h $(SRCTOP)/include/k5-thread.h \
  requests.c ss.h ss_internal.h
data.so data.po $(OUTPRE)data.$(OBJEXT): $(BUILDTOP)/include/autoconf.h \
  $(BUILDTOP)/include/ss/ss_err.h $(COM_ERR_DEPS) $(SRCTOP)/include/k5-platform.h \
  $(SRCTOP)/include/k5-thread.h copyright.h data.c ss.h \
  ss_internal.h
mk_cmds.so mk_cmds.po $(OUTPRE)mk_cmds.$(OBJEXT): $(BUILDTOP)/include/autoconf.h \
  $(BUILDTOP)/include/ss/ss_err.h $(COM_ERR_DEPS) $(SRCTOP)/include/k5-platform.h \
  $(SRCTOP)/include/k5-thread.h copyright.h mk_cmds.c \
  ss.h ss_internal.h
utils.so utils.po $(OUTPRE)utils.$(OBJEXT): $(BUILDTOP)/include/autoconf.h \
  $(BUILDTOP)/include/ss/ss_err.h $(COM_ERR_DEPS) $(SRCTOP)/include/k5-platform.h \
  $(SRCTOP)/include/k5-thread.h copyright.h ss.h ss_internal.h \
  utils.c
options.so options.po $(OUTPRE)options.$(OBJEXT): $(BUILDTOP)/include/ss/ss_err.h \
  $(COM_ERR_DEPS) copyright.h options.c ss.h
cmd_tbl.lex.o: cmd_tbl.lex.c
ct.tab.o: $(BUILDTOP)/include/ss/ss_err.h $(COM_ERR_DEPS) \
  ct.tab.c ss.h
ss_err.so ss_err.po $(OUTPRE)ss_err.$(OBJEXT): $(COM_ERR_DEPS) \
  ss_err.c
std_rqs.so std_rqs.po $(OUTPRE)std_rqs.$(OBJEXT): $(COM_ERR_DEPS) \
  $(SS_DEPS) std_rqs.c