1#
2# Makefile for lib/ss
3#
4
5srcdir = .
6top_srcdir = ../..
7
8top_builddir = ../..
9my_dir = lib/ss
10INSTALL = /usr/bin/install -c
11DLOPEN_LIB = -ldl
12
13# Beginning of file MCONFIG
14
15all::
16
17check::
18
19SHELL = /bin/sh
20
21COMPRESS_EXT = gz bz2 bz Z
22
23prefix = /usr
24root_prefix = 
25exec_prefix = ${prefix}
26root_bindir = ${root_prefix}/bin
27root_sbindir = ${root_prefix}/sbin
28root_libdir = ${root_prefix}/lib
29datarootdir = ${prefix}/share
30bindir = ${exec_prefix}/bin
31sbindir = ${exec_prefix}/sbin
32libdir = ${exec_prefix}/lib
33datadir= ${datarootdir}
34localedir = $(datadir)/locale
35root_sysconfdir= ${root_prefix}/etc
36includedir = ${prefix}/include
37mandir = ${datarootdir}/man
38man1dir = $(mandir)/man1
39man3dir = $(mandir)/man3
40man5dir = $(mandir)/man5
41man8dir = $(mandir)/man8
42infodir = ${datarootdir}/info
43datadir = ${datarootdir}
44
45
46
47CROSS_COMPILER = mipsel-linux-
48CC = $(CROSS_COMPILER)gcc
49BUILD_CC = $(CC)
50DEFS = -DLOCALEDIR=\"$(localedir)\" -DROOT_SYSCONFDIR=\"$(root_sysconfdir)\" -DPACKAGE_NAME=\"\" -DPACKAGE_TARNAME=\"\" -DPACKAGE_VERSION=\"\" -DPACKAGE_STRING=\"\" -DPACKAGE_BUGREPORT=\"\" -DSTDC_HEADERS=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_MEMORY_H=1 -DHAVE_STRINGS_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DHAVE_UNISTD_H=1 -DENABLE_HTREE=1 -DENABLE_SWAPFS=1 -DTLS= -DUSE_UUIDD=1 -DPACKAGE=\"e2fsprogs\" -DVERSION=\"0.14.1\" -DHAVE_LONG_LONG=1 -DHAVE_LONG_DOUBLE=1 -DHAVE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CASECMP=1 -DHAVE_SRANDOM=1 -DHAVE_JRAND48=1 -DHAVE_FCHOWN=1 -DHAVE_MALLINFO=1 -DHAVE_FDATASYNC=1 -DHAVE_STRNLEN=1 -DHAVE_STRPTIME=1 -DHAVE_STRDUP=1 -DHAVE_SYSCONF=1 -DHAVE_PATHCONF=1 -DHAVE_POSIX_MEMALIGN=1 -DHAVE_MEMALIGN=1 -DHAVE_VALLOC=1 -DHAVE___SECURE_GETENV=1 -DHAVE_PRCTL=1 -DHAVE_MMAP=1 -DHAVE_UTIME=1 -DHAVE_SETRESUID=1 -DHAVE_SETRESGID=1 -DHAVE_DLOPEN=1 -DHAVE_EXT2_IOCTLS=1
51CFLAGS = -g -O2
52CPPFLAGS =  -I$(top_builddir)/lib -I$(top_srcdir)/lib 
53INTL_FLAGS = 
54ALL_CFLAGS = $(CPPFLAGS) $(DEFS) $(USE_WFLAGS) $(CFLAGS) $(XTRA_CFLAGS) \
55	$(INTL_FLAGS) $(LINUX_INCLUDE) 
56LDFLAGS = 
57ALL_LDFLAGS = $(LDFLAGS)
58BUILD_CFLAGS = -g -O2
59BUILD_LDFLAGS = 
60RM = /bin/rm
61LN = /bin/ln
62LN_S = ln -s
63MV = /bin/mv
64CP = /bin/cp
65CHMOD = /bin/chmod
66AR = $(CROSS_COMPILER)ar
67AWK = gawk
68SED = /bin/sed
69PERL = /usr/bin/perl
70RANLIB = $(CROSS_COMPILER)ranlib
71STRIP = $(CROSS_COMPILER)strip
72LD = $(PURE) $(CC)
73ARUPD = $(AR) r
74ARGEN = $(AR) rc
75LDCONFIG = /sbin/ldconfig
76INSTALL_PROGRAM = ${INSTALL}
77INSTALL_DATA = ${INSTALL} -m 644
78INSTALL_SCRIPT = ${INSTALL}
79MKINSTALLDIRS = $(top_builddir)/config/mkinstalldirs
80
81#
82# Library definitions
83#
84DEVMAPPER_LIBS = 
85STATIC_DEVMAPPER_LIBS = 
86
87LIB = $(top_builddir)/lib
88LIBSS = $(LIB)/libss.a
89LIBCOM_ERR = $(LIB)/libcom_err.a
90LIBE2P = $(LIB)/libe2p.a
91LIBEXT2FS = $(LIB)/libext2fs.a
92LIBUUID = $(LIB)/libuuid.a 
93LIBBLKID = $(LIB)/libblkid.a 
94LIBINTL = 
95DEPLIBUUID = $(LIB)/libuuid.a
96DEPLIBBLKID = $(LIB)/libblkid.a
97
98STATIC_LIBSS = $(LIB)/libss.a
99STATIC_LIBCOM_ERR = $(LIB)/libcom_err.a
100STATIC_LIBE2P = $(LIB)/libe2p.a
101STATIC_LIBEXT2FS = $(LIB)/libext2fs.a
102STATIC_LIBUUID = $(LIB)/libuuid.a  
103STATIC_LIBBLKID = $(LIB)/libblkid.a $(STATIC_DEVMAPPER_LIBS)
104DEPSTATIC_LIBUUID = $(LIB)/libuuid.a
105DEPSTATIC_LIBBLKID = $(LIB)/libblkid.a
106
107PROFILED_LIBSS = $(LIB)/libss
108PROFILED_LIBCOM_ERR = $(LIB)/libcom_err
109PROFILED_LIBE2P = $(LIB)/libe2p
110PROFILED_LIBEXT2FS = $(LIB)/libext2fs
111PROFILED_LIBUUID = $(LIB)/libuuid  
112PROFILED_LIBBLKID = $(LIB)/libblkid
113DEPPROFILED_LIBUUID = $(LIB)/libuuid
114DEPPROFILED_LIBBLKID = $(LIB)/libblkid
115
116# An include directive pointing to a directory holding enough linux-like
117# include files to satisfy some programs here
118LINUX_INCLUDE=
119
120#
121# A fast substitution command for fixing up man pages, shell scripts, etc.
122#
123SUBST_CONF=$(top_builddir)/util/subst.conf
124SUBSTITUTE= $(top_builddir)/util/subst -f $(SUBST_CONF)
125SUBSTITUTE_UPTIME= $(top_builddir)/util/subst -t -f $(SUBST_CONF)
126DEP_SUBSTITUTE= $(top_builddir)/util/subst $(SUBST_CONF)
127
128$(top_builddir)/util/subst:
129	cd $(top_builddir)/util ; $(MAKE) subst
130
131#
132# Warning flags
133#
134# Run make gcc-wall to do a build with warning messages.
135#
136#
137WFLAGS=		-std=c99 -D_XOPEN_SOURCE=600 -D_GNU_SOURCE \
138			-pedantic $(WFLAGS_EXTRA) \
139			-Wall -W -Wwrite-strings -Wpointer-arith \
140			-Wcast-qual -Wcast-align -Wno-variadic-macros \
141			-Wstrict-prototypes -Wmissing-prototypes \
142			-Wformat-security  -Wformat-nonliteral \
143			-Wmissing-format-attribute -O2 -Wstrict-aliasing \
144			-Wnested-externs -Winline -DNO_INLINE_FUNCS -Wshadow \
145			-UENABLE_NLS
146
147gcc-wall-new:
148	(make USE_WFLAGS="$(WFLAGS)" > /dev/null) 2>&1 | sed -f $(top_srcdir)/util/gcc-wall-cleanup 
149
150gcc-wall:
151	make clean > /dev/null
152	make gcc-wall-new
153
154#
155# Installation user and groups
156#
157BINGRP=		bin
158BINOWN=		bin
159BINMODE=	555
160INCGRP=		bin
161INCOWN=		bin
162INCMODE=	444
163LIBOWN=		bin
164LIBGRP=		bin
165LIBMODE=	444
166MANGRP=		bin
167MANOWN=		bin
168MANMODE=	444
169
170#
171# Autoconf magic...
172#
173
174DEP_LIB_MAKEFILES = $(top_srcdir)/lib/Makefile.elf-lib  \
175	$(top_srcdir)/lib/Makefile.bsd-lib $(top_srcdir)/lib/Makefile.darwin-lib \
176	$(top_srcdir)/lib/Makefile.solaris-lib $(top_srcdir)/lib/Makefile.checker \
177	$(top_srcdir)/lib/Makefile.profile
178
179$(top_builddir)/config.status: $(top_srcdir)/configure
180	cd $(top_builddir); ./config.status --recheck
181
182$(top_builddir)/MCONFIG: $(top_srcdir)/MCONFIG.in $(top_builddir)/config.status
183	cd $(top_builddir); CONFIG_FILES=MCONFIG ./config.status
184
185$(top_builddir)/lib/substitute_sh: $(top_srcdir)/lib/substitute_sh.in \
186		$(top_builddir)/config.status
187	cd $(top_builddir); CONFIG_FILES=lib/substitute_sh ./config.status
188
189$(top_builddir)/util/subst.conf: $(top_srcdir)/util/subst.conf.in \
190		$(top_builddir)/config.status
191	cd $(top_builddir); CONFIG_FILES=util/subst.conf ./config.status
192
193Makefile: $(srcdir)/Makefile.in $(top_builddir)/MCONFIG \
194		$(DEP_MAKEFILE) $(top_builddir)/config.status
195	cd $(top_builddir); CONFIG_FILES=$(my_dir)/Makefile ./config.status
196
197#$(top_srcdir)/configure: $(top_srcdir)/configure.in
198#	cd $(top_srcdir) && autoconf
199
200#
201# Make depend magic...
202#
203
204.depend: Makefile $(SRCS) $(top_srcdir)/depfix.sed $(top_srcdir)/wordwrap.pl
205	if test -n "$(SRCS)" ; then \
206		$(CC) -M $(ALL_CFLAGS) $(SRCS) | \
207			$(SED) -f $(top_srcdir)/depfix.sed \
208			    -e 's; $(srcdir)/; $$(srcdir)/;g' \
209			    -e 's; $(top_srcdir)/; $$(top_srcdir)/;g' \
210			    -e 's; $(top_builddir)/; $$(top_builddir)/;g' \
211			    -e 's; \./; ;g' \
212			    -e '/^#/d' \
213			    -e '/^ *\\$$/d' | \
214			$(PERL) $(top_srcdir)/wordwrap.pl > .depend; \
215	else :; fi
216
217depend:: .depend
218	if test -n "$(SRCS)" ; then \
219		sed -e '/^# +++ Dependency line eater +++/,$$d' \
220			< $(srcdir)/Makefile.in | cat - .depend \
221			> $(srcdir)/Makefile.in.new; \
222	if cmp -s $(srcdir)/Makefile.in $(srcdir)/Makefile.in.new ; then \
223		$(RM) $(srcdir)/Makefile.in.new ; \
224	else \
225		$(MV) $(srcdir)/Makefile.in $(srcdir)/Makefile.in.old; \
226		$(MV) $(srcdir)/Makefile.in.new $(srcdir)/Makefile.in; \
227	fi ; else :; fi
228
229# End of file MCONFIG
230
231LIBRARY= libss
232LIBDIR= ss
233
234ELF_VERSION = 2.0
235ELF_SO_VERSION = 2
236ELF_IMAGE = libss
237ELF_MYDIR = ss
238ELF_INSTALL_DIR = $(root_libdir)
239ELF_OTHER_LIBS = -L../.. -lcom_err $(DLOPEN_LIB)
240
241BSDLIB_VERSION = 1.0
242BSDLIB_IMAGE = libss
243BSDLIB_MYDIR = ss
244BSDLIB_INSTALL_DIR = $(root_libdir)
245
246TAGS=etags
247COMPILE_ET=../et/compile_et --build-tree
248MK_CMDS=_SS_DIR_OVERRIDE=. ./mk_cmds
249
250# -I.. is so that ss/ss_err.h works
251# -I$(srcdir)/.. is so that ss/ss.h works
252# -I$(srcdir)/../et is so com_err.h works
253XTRA_CFLAGS= -I$(srcdir)/../et
254
255.c.o:
256	@echo "	CC $<"
257	@$(CC) $(ALL_CFLAGS) -c $<
258#	@$(CC) $(ALL_CFLAGS) -g -pg -o profiled/$*.o -c $<
259#	@$(CC) $(ALL_CFLAGS) -checker -g -o checker/$*.o -c $<
260#	@$(CC) $(ALL_CFLAGS) -DSHARED_ELF_LIB -fPIC -o elfshared/$*.o -c $<
261#	@$(CC) $(ALL_CFLAGS) $(BSDLIB_PIC_FLAG) -o pic/$*.o -c $<
262
263# for the library
264
265# with ss_err.o first, ss_err.h should get rebuilt first too.  should not
266# be relying on this, though.
267OBJS=	ss_err.o \
268	std_rqs.o \
269	invocation.o help.o \
270	execute_cmd.o listen.o parse.o error.o prompt.o \
271	request_tbl.o list_rqs.o pager.o requests.o \
272	data.o get_readline.o
273
274SRCS=	$(srcdir)/invocation.c $(srcdir)/help.c \
275	$(srcdir)/execute_cmd.c $(srcdir)/listen.c $(srcdir)/parse.c \
276	$(srcdir)/error.c $(srcdir)/prompt.c $(srcdir)/request_tbl.c \
277	$(srcdir)/list_rqs.c $(srcdir)/pager.c $(srcdir)/requests.c \
278	$(srcdir)/data.c $(srcdir)/get_readline.c
279
280all:: mk_cmds
281
282all:: subdirs $(LIBRARY).a
283
284install-shlibs::
285
286uninstall-shlibs::
287
288real-subdirs::
289
290subdirs:: Makefile
291	@$(MAKE) -s real-subdirs
292	@touch subdirs
293
294clean::
295	@$(RM) -f subdirs
296
297$(LIBRARY).a: $(OBJS)
298	@echo "	GEN_LIB $@"
299	@(if test -r $@; then $(RM) -f $@.bak && $(MV) $@ $@.bak; fi)
300	@$(ARGEN) $@ $(OBJS)
301	-@$(RANLIB) $@
302	@$(RM) -f ../$@
303	@$(LN) $@ ../$@
304
305
306CODE= $(SRCS) $(MKCMDSFILES)
307
308MKCMDSOBJS=	mk_cmds.o utils.o options.o ct.tab.o cmd_tbl.lex.o
309
310MKCMDSFILES=	mk_cmds.c utils.c options.c ct.y cmd_tbl.lex.l
311
312MKCMDSCSRCS=	mk_cmds.c utils.c options.c ct.tab.c cmd_tbl.lex.c
313
314
315HFILES=	ss.h ss_internal.h
316SHARE_FILES= ct_c.awk ct_c.sed
317
318INSTALL_HFILES=	ss.h 
319
320# for 'tags' and dependencies
321
322CFILES=	$(SRCS) $(MKCMDSCSRCS) test_ss.c
323
324# for building archives
325
326FILES=	$(SRCS) $(MKCMDSFILES) $(HFILES) \
327	ss_err.et std_rqs.ct Makefile \
328	test_ss.c ss 
329
330all::	libss.a ss.pc # libss_p.a lint
331
332std_rqs.c: std_rqs.ct mk_cmds
333	@echo "	MK_CMDS $@"
334	@DIR=$(srcdir) $(MK_CMDS) $(srcdir)/std_rqs.ct
335
336std_rqs.o: ss_err.h
337
338test_cmd.c: test_cmd.ct mk_cmds
339	@echo "	MK_CMDS $@"
340	@DIR=$(srcdir) $(MK_CMDS) $(srcdir)/test_cmd.ct
341
342ss_err.c ss_err.h: ss_err.et
343	@echo "	COMPILE_ET ss_err.et"
344	@$(COMPILE_ET) $(srcdir)/ss_err.et
345
346ct.tab.c ct.tab.h: ct.y
347	$(RM) -f ct.tab.* y.*
348	$(YACC) -d $(srcdir)/ct.y
349	$(MV) -f y.tab.c ct.tab.c
350	$(MV) -f y.tab.h ct.tab.h
351
352#libss.o:	$(OBJS)
353#	$(LD) -r -s -o $@ $(OBJS)
354#	$(CHMOD) -x $@
355
356mk_cmds: $(DEP_SUBSTITUTE) $(srcdir)/mk_cmds.sh.in
357	@echo "	SUBST $@"
358	@$(SUBSTITUTE) $(srcdir)/mk_cmds.sh.in mk_cmds
359	@$(CHMOD) +x mk_cmds
360
361ss.pc: $(srcdir)/ss.pc.in $(top_builddir)/config.status
362	@echo "	CONFIG.STATUS $@"
363	@cd $(top_builddir); CONFIG_FILES=lib/ss/ss.pc ./config.status
364
365installdirs::
366	@echo "	MKINSTALLDIRS $(libdir) $(includedir)/ss $(datadir)/ss $(bindir)"
367	@$(MKINSTALLDIRS) $(DESTDIR)$(libdir) \
368		$(DESTDIR)$(includedir)/ss $(DESTDIR)$(datadir)/ss \
369		$(DESTDIR)$(bindir) $(DESTDIR)$(libdir)/pkgconfig
370
371install:: libss.a $(INSTALL_HFILES) installdirs ss_err.h mk_cmds ss.pc
372	@echo "	INSTALL_DATA $(DESTDIR)$(libdir)/libss.a"
373	@$(INSTALL_DATA) libss.a $(DESTDIR)$(libdir)/libss.a
374	@-$(RANLIB) $(DESTDIR)$(libdir)/libss.a
375	@$(CHMOD) $(LIBMODE) $(DESTDIR)$(libdir)/libss.a
376	@$(RM) -f $(DESTDIR)$(includedir)/ss/*
377	@for i in $(INSTALL_HFILES); do \
378		echo "	INSTALL_DATA $(DESTDIR)$(includedir)/ss/$$i"; \
379		$(INSTALL_DATA) $(srcdir)/$$i $(DESTDIR)$(includedir)/ss/$$i; \
380	done
381	@echo "	INSTALL_DATA $(includedir)/ss/ss_err.h"
382	@$(INSTALL_DATA) ss_err.h $(DESTDIR)$(includedir)/ss/ss_err.h
383	@for i in $(SHARE_FILES); do \
384		echo "	INSTALL_DATA $(DESTDIR)$(datadir)/ss/$$i"; \
385		$(INSTALL_DATA) $(srcdir)/$$i $(DESTDIR)$(datadir)/ss/$$i; \
386	done
387	@echo "	INSTALL $(bindir)/mk_cmds"
388	@$(INSTALL) mk_cmds $(DESTDIR)$(bindir)/mk_cmds
389	@echo "	INSTALL_DATA $(man1dir)/mk_cmds.1"
390	@$(INSTALL_DATA) $(srcdir)/mk_cmds.1 $(DESTDIR)$(man1dir)/mk_cmds.1
391	@echo "	INSTALL_DATA $(libdir)/pkgconfig/ss.pc"
392	@$(INSTALL_DATA) ss.pc $(DESTDIR)$(libdir)/pkgconfig/ss.pc
393
394uninstall::
395	$(RM) -f $(DESTDIR)$(libdir)/libss.a $(DESTDIR)$(bindir)/mk_cmds \
396		$(DESTDIR)$(libdir)/pkgconfig/ss.pc \
397		$(DESTDIR)$(man1dir)/mk_cmds.1 
398	$(RM) -rf $(DESTDIR)$(includedir)/ss $(DESTDIR)$(datadir)/ss
399
400test_ss: test_ss.o test_cmd.o $(LIBSS) $(LIBCOM_ERR)
401	@echo "	LD $@"
402	@$(CC) -o $@ test_ss.o test_cmd.o $(ALL_CFLAGS) \
403		$(LIBSS) $(LIBCOM_ERR)
404
405check:: all test_ss
406	@echo "	RUN TEST test_ss"
407	@(LD_LIBRARY_PATH=$(LIB) DYLD_LIBRARY_PATH=$(LIB) ./test_ss -f $(srcdir)/test_script >& test_out; exit 0)
408	@if ! diff test_out $(srcdir)/test_script_expected > test.diff; then \
409		echo "Regression test for ss library failed!"; exit 1 ; fi
410
411clean::
412	$(RM) -f ../libss.a libss.a mk_cmds ss_err.h ss_err.c std_rqs.c \
413		tst_cmds.c test_ss test_out test.diff *.o *~ \#* *.bak core \
414		test_cmd.c
415
416mostlyclean:: clean
417distclean:: clean
418	$(RM) -f .depend Makefile ss.pc \
419		$(srcdir)/TAGS $(srcdir)/Makefile.in.old
420
421#
422# Hack to parallel makes recognize dependencies correctly.
423#
424$(top_builddir)/lib/ss/ss_err.h: ss_err.h
425
426$(OBJS): subdirs
427
428# +++ Dependency line eater +++
429# 
430# Makefile dependencies follow.  This must be the last section in
431# the Makefile.in file
432#
433invocation.o: $(srcdir)/invocation.c $(srcdir)/ss_internal.h $(srcdir)/ss.h \
434 $(top_builddir)/lib/ss/ss_err.h $(top_srcdir)/lib/et/com_err.h
435help.o: $(srcdir)/help.c $(srcdir)/ss_internal.h $(srcdir)/ss.h \
436 $(top_builddir)/lib/ss/ss_err.h $(top_srcdir)/lib/et/com_err.h
437execute_cmd.o: $(srcdir)/execute_cmd.c $(srcdir)/ss_internal.h $(srcdir)/ss.h \
438 $(top_builddir)/lib/ss/ss_err.h $(top_srcdir)/lib/et/com_err.h
439listen.o: $(srcdir)/listen.c $(srcdir)/ss_internal.h $(srcdir)/ss.h \
440 $(top_builddir)/lib/ss/ss_err.h $(top_srcdir)/lib/et/com_err.h
441parse.o: $(srcdir)/parse.c $(srcdir)/ss_internal.h $(srcdir)/ss.h \
442 $(top_builddir)/lib/ss/ss_err.h $(top_srcdir)/lib/et/com_err.h
443error.o: $(srcdir)/error.c $(top_srcdir)/lib/et/com_err.h \
444 $(srcdir)/ss_internal.h $(srcdir)/ss.h $(top_builddir)/lib/ss/ss_err.h \
445 $(top_srcdir)/lib/et/com_err.h
446prompt.o: $(srcdir)/prompt.c $(srcdir)/ss_internal.h $(srcdir)/ss.h \
447 $(top_builddir)/lib/ss/ss_err.h $(top_srcdir)/lib/et/com_err.h
448request_tbl.o: $(srcdir)/request_tbl.c $(srcdir)/ss_internal.h $(srcdir)/ss.h \
449 $(top_builddir)/lib/ss/ss_err.h $(top_srcdir)/lib/et/com_err.h
450list_rqs.o: $(srcdir)/list_rqs.c $(srcdir)/ss_internal.h $(srcdir)/ss.h \
451 $(top_builddir)/lib/ss/ss_err.h $(top_srcdir)/lib/et/com_err.h
452pager.o: $(srcdir)/pager.c $(srcdir)/ss_internal.h $(srcdir)/ss.h \
453 $(top_builddir)/lib/ss/ss_err.h $(top_srcdir)/lib/et/com_err.h
454requests.o: $(srcdir)/requests.c $(srcdir)/ss_internal.h $(srcdir)/ss.h \
455 $(top_builddir)/lib/ss/ss_err.h $(top_srcdir)/lib/et/com_err.h
456data.o: $(srcdir)/data.c $(srcdir)/ss_internal.h $(srcdir)/ss.h \
457 $(top_builddir)/lib/ss/ss_err.h $(top_srcdir)/lib/et/com_err.h
458get_readline.o: $(srcdir)/get_readline.c $(srcdir)/ss_internal.h \
459 $(srcdir)/ss.h $(top_builddir)/lib/ss/ss_err.h \
460 $(top_srcdir)/lib/et/com_err.h
461