6 top_srcdir = @top_srcdir@
17 DLL_ADDRESS = 0x66880000
23 DLL_LIBS = -L../.. -lcom_err
25 DLL_INSTALL_DIR = $(root_libdir)
31 ELF_INSTALL_DIR = $(root_libdir)
32 ELF_OTHER_LIBS = -lc -L../.. -lcom_err
37 BSDLIB_INSTALL_DIR = $(root_libdir)
40 COMPILE_ET=../et/compile_et
41 MK_CMDS=_SS_DIR_OVERRIDE=. ./mk_cmds
43 # -I.. is so that ss/ss_err.h works
44 # -I$(srcdir)/.. is so that ss/ss.h works
45 # -I$(srcdir)/../et is so com_err.h works
46 XTRA_CFLAGS=-DPOSIX_SIGNALS -I$(srcdir)/../et
49 $(CC) $(ALL_CFLAGS) -c $<
50 @PROFILE_CMT@ $(CC) $(ALL_CFLAGS) -g -pg -o profiled/$*.o -c $<
51 @CHECKER_CMT@ $(CC) $(ALL_CFLAGS) -checker -g -o checker/$*.o -c $<
52 @DLL_CMT@ (export JUMP_DIR=`pwd`/jump; $(CC) -B$(JUMP_PREFIX) \
53 @DLL_CMT@ $(ALL_CFLAGS) -o jump/$*.o -c $<)
54 @ELF_CMT@ $(CC) $(ALL_CFLAGS) -fPIC -o elfshared/$*.o -c $<
55 @BSDLIB_CMT@ $(CC) $(ALL_CFLAGS) -fpic -o pic/$*.o -c $<
61 # with ss_err.o first, ss_err.h should get rebuilt first too. should not
62 # be relying on this, though.
66 execute_cmd.o listen.o parse.o error.o prompt.o \
67 request_tbl.o list_rqs.o pager.o requests.o \
70 SRCS= $(srcdir)/invocation.c $(srcdir)/help.c \
71 $(srcdir)/execute_cmd.c $(srcdir)/listen.c $(srcdir)/parse.c \
72 $(srcdir)/error.c $(srcdir)/prompt.c $(srcdir)/request_tbl.c \
73 $(srcdir)/list_rqs.c $(srcdir)/pager.c $(srcdir)/requests.c \
85 CODE= $(SRCS) $(MKCMDSFILES)
87 MKCMDSOBJS= mk_cmds.o utils.o options.o ct.tab.o cmd_tbl.lex.o
89 MKCMDSFILES= mk_cmds.c utils.c options.c ct.y cmd_tbl.lex.l
91 MKCMDSCSRCS= mk_cmds.c utils.c options.c ct.tab.c cmd_tbl.lex.c
94 HFILES= ss.h ss_internal.h
95 SHARE_FILES= ct_c.awk ct_c.sed
99 # for 'tags' and dependencies
101 CFILES= $(SRCS) $(MKCMDSCSRCS) test_ss.c
103 # for building archives
105 FILES= $(SRCS) $(MKCMDSFILES) $(HFILES) \
106 ss_err.et std_rqs.ct Makefile \
109 all:: libss.a # libss_p.a lint
111 std_rqs.c: std_rqs.ct mk_cmds
112 DIR=$(srcdir) $(MK_CMDS) $(srcdir)/std_rqs.ct
114 ss_err.c ss_err.h: ss_err.et
115 $(COMPILE_ET) $(srcdir)/ss_err.et
117 ct.tab.c ct.tab.h: ct.y
118 $(RM) -f ct.tab.* y.*
119 $(YACC) -d $(srcdir)/ct.y
120 $(MV) -f y.tab.c ct.tab.c
121 $(MV) -f y.tab.h ct.tab.h
124 # $(LD) -r -s -o $@ $(OBJS)
127 mk_cmds: $(DEP_SUBSTITUTE) $(srcdir)/mk_cmds.sh.in
128 $(SUBSTITUTE) $(srcdir)/mk_cmds.sh.in mk_cmds
132 $(top_srcdir)/mkinstalldirs $(DESTDIR)$(libdir) \
133 $(DESTDIR)$(includedir)/ss $(DESTDIR)$(datadir)/ss \
136 install:: libss.a $(INSTALL_HFILES) installdirs ss_err.h mk_cmds
137 $(INSTALL_DATA) libss.a $(DESTDIR)$(libdir)/libss.a
138 $(CHMOD) 644 $(DESTDIR)$(libdir)/libss.a
139 -$(RANLIB) $(DESTDIR)$(libdir)/libss.a
140 $(CHMOD) $(LIBMODE) $(DESTDIR)$(libdir)/libss.a
141 $(RM) -f $(DESTDIR)$(includedir)/ss/*
142 for i in $(INSTALL_HFILES); do \
143 $(INSTALL_DATA) $(srcdir)/$$i $(DESTDIR)$(includedir)/ss/$$i; \
145 $(INSTALL_DATA) ss_err.h $(DESTDIR)$(includedir)/ss/ss_err.h
146 for i in $(SHARE_FILES); do \
147 $(INSTALL_DATA) $(srcdir)/$$i $(DESTDIR)$(datadir)/ss/$$i; \
149 $(INSTALL) mk_cmds $(DESTDIR)$(bindir)/mk_cmds
152 $(RM) -f $(DESTDIR)$(libdir)/libss.a $(DESTDIR)$(bindir)/mk_cmds
153 $(RM) -rf $(DESTDIR)$(includedir)/ss $(DESTDIR)$(datadir)/ss
156 $(RM) -f ../libss.a libss.a mk_cmds ss_err.h ss_err.c std_rqs.c \
157 *.o *~ \#* *.bak core
161 $(RM) -f .depend Makefile $(srcdir)/TAGS $(srcdir)/Makefile.in.old
164 # Hack to parallel makes recognize dependencies correctly.
166 $(top_builddir)/lib/ss/ss_err.h: ss_err.h
168 # +++ Dependency line eater +++
170 # Makefile dependencies follow. This must be the last section in
171 # the Makefile.in file
173 invocation.o: $(srcdir)/invocation.c $(srcdir)/ss_internal.h $(srcdir)/ss.h \
174 $(top_builddir)/lib/ss/ss_err.h
175 help.o: $(srcdir)/help.c $(srcdir)/ss_internal.h $(srcdir)/ss.h \
176 $(top_builddir)/lib/ss/ss_err.h
177 execute_cmd.o: $(srcdir)/execute_cmd.c $(srcdir)/ss_internal.h $(srcdir)/ss.h \
178 $(top_builddir)/lib/ss/ss_err.h
179 listen.o: $(srcdir)/listen.c $(srcdir)/ss_internal.h $(srcdir)/ss.h \
180 $(top_builddir)/lib/ss/ss_err.h
181 parse.o: $(srcdir)/parse.c $(srcdir)/ss_internal.h $(srcdir)/ss.h \
182 $(top_builddir)/lib/ss/ss_err.h
183 error.o: $(srcdir)/error.c $(srcdir)/../et/com_err.h $(srcdir)/ss_internal.h \
184 $(srcdir)/ss.h $(top_builddir)/lib/ss/ss_err.h
185 prompt.o: $(srcdir)/prompt.c $(srcdir)/ss_internal.h $(srcdir)/ss.h \
186 $(top_builddir)/lib/ss/ss_err.h
187 request_tbl.o: $(srcdir)/request_tbl.c $(srcdir)/ss_internal.h $(srcdir)/ss.h \
188 $(top_builddir)/lib/ss/ss_err.h
189 list_rqs.o: $(srcdir)/list_rqs.c $(srcdir)/ss_internal.h $(srcdir)/ss.h \
190 $(top_builddir)/lib/ss/ss_err.h
191 pager.o: $(srcdir)/pager.c $(srcdir)/ss_internal.h $(srcdir)/ss.h \
192 $(top_builddir)/lib/ss/ss_err.h
193 requests.o: $(srcdir)/requests.c $(srcdir)/ss_internal.h $(srcdir)/ss.h \
194 $(top_builddir)/lib/ss/ss_err.h
195 data.o: $(srcdir)/data.c $(srcdir)/ss_internal.h $(srcdir)/ss.h \
196 $(top_builddir)/lib/ss/ss_err.h