Whamcloud - gitweb
Many files:
[tools/e2fsprogs.git] / lib / ss / Makefile.in
1 #
2 # Makefile for lib/ss
3 #
4
5 srcdir = @srcdir@
6 top_srcdir = @top_srcdir@
7 VPATH = @srcdir@
8 top_builddir = ../..
9 my_dir = lib/ss
10 INSTALL = @INSTALL@
11
12 @MCONFIG@
13
14 LIBRARY= libss
15 LIBDIR= ss
16
17 DLL_ADDRESS = 0x66880000
18 DLL_JUMPSIZE = 0x1000
19 DLL_GOTSIZE  = 0x1000
20 DLL_VERSION = 1.0
21 DLL_IMAGE = libss
22 DLL_STUB = libss
23 DLL_LIBS = -L../.. -lcom_err
24 DLL_MYDIR = ss
25 DLL_INSTALL_DIR = $(libdir)
26
27 ELF_VERSION = 2.0
28 ELF_SO_VERSION = 2
29 ELF_IMAGE = libss
30 ELF_MYDIR = ss
31 ELF_INSTALL_DIR = $(libdir)
32
33 BSDLIB_VERSION = 1.0
34 BSDLIB_IMAGE = libss
35 BSDLIB_MYDIR = ss
36 BSDLIB_INSTALL_DIR = $(libdir)
37
38 TAGS=etags
39 COMPILE_ET=../et/compile_et
40 MK_CMDS=./mk_cmds
41
42 # -I.. is so that ss/ss_err.h works
43 # -I$(srcdir)/.. is so that ss/ss.h works
44 # -I$(srcdir)/../et is so com_err.h works
45 XTRA_CFLAGS=-DPOSIX_SIGNALS -I$(srcdir)/../et
46
47 .c.o:
48         $(CC) $(ALL_CFLAGS) -c $<
49 @PROFILE_CMT@   $(CC) $(ALL_CFLAGS) -pg -o profiled/$*.o -c $<
50 @CHECKER_CMT@   $(CC) $(ALL_CFLAGS) -checker -g -o checker/$*.o -c $<
51 @DLL_CMT@       (export JUMP_DIR=`pwd`/jump; $(CC) -B$(JUMP_PREFIX) \
52 @DLL_CMT@               $(ALL_CFLAGS) -o jump/$*.o -c $<)
53 @ELF_CMT@       $(CC) $(ALL_CFLAGS) -fPIC -o elfshared/$*.o -c $<
54 @BSDLIB_CMT@    $(CC) $(ALL_CFLAGS) -fpic -o pic/$*.o -c $<
55
56 # for the library
57
58 LIB=    libss.a
59
60 # with ss_err.o first, ss_err.h should get rebuilt first too.  should not
61 # be relying on this, though.
62 OBJS=   ss_err.o \
63         std_rqs.o \
64         invocation.o help.o \
65         execute_cmd.o listen.o parse.o error.o prompt.o \
66         request_tbl.o list_rqs.o pager.o requests.o \
67         data.o
68
69 SRCS=   $(srcdir)/invocation.c $(srcdir)/help.c \
70         $(srcdir)/execute_cmd.c $(srcdir)/listen.c $(srcdir)/parse.c \
71         $(srcdir)/error.c $(srcdir)/prompt.c $(srcdir)/request_tbl.c \
72         $(srcdir)/list_rqs.c $(srcdir)/pager.c $(srcdir)/requests.c \
73         $(srcdir)/data.c 
74
75 all:: mk_cmds
76
77 @MAKEFILE_LIBRARY@
78 @MAKEFILE_DLL@
79 @MAKEFILE_ELF@
80 @MAKEFILE_BSDLIB@
81 @MAKEFILE_PROFILE@
82 @MAKEFILE_CHECKER@
83
84 CODE= $(SRCS) $(MKCMDSFILES)
85
86 MKCMDSOBJS=     mk_cmds.o utils.o options.o ct.tab.o cmd_tbl.lex.o
87
88 MKCMDSFILES=    mk_cmds.c utils.c options.c ct.y cmd_tbl.lex.l
89
90 MKCMDSCSRCS=    mk_cmds.c utils.c options.c ct.tab.c cmd_tbl.lex.c
91
92
93 HFILES= ss.h ss_internal.h copyright.h 
94
95 INSTALL_HFILES= ss.h ss_err.h copyright.h 
96
97 # for 'tags' and dependencies
98
99 CFILES= $(SRCS) $(MKCMDSCSRCS) test_ss.c
100
101 # for building archives
102
103 FILES=  $(SRCS) $(MKCMDSFILES) $(HFILES) \
104         ss_err.et std_rqs.ct Makefile \
105         test_ss.c ss copyright.h
106
107 all::   libss.a # libss_p.a lint
108
109 std_rqs.c: std_rqs.ct $(MK_CMDS)
110         $(MK_CMDS) $(srcdir)/std_rqs.ct
111
112 ss_err.c ss_err.h: ss_err.et
113         $(COMPILE_ET) $(srcdir)/ss_err.et
114
115 ct.tab.c ct.tab.h: ct.y
116         $(RM) -f ct.tab.* y.*
117         $(YACC) -d $(srcdir)/ct.y
118         $(MV) -f y.tab.c ct.tab.c
119         $(MV) -f y.tab.h ct.tab.h
120
121 #libss.o:       $(OBJS)
122 #       $(LD) -r -s -o $@ $(OBJS)
123 #       $(CHMOD) -x $@
124
125 mk_cmds: $(SUBSTITUTE) $(srcdir)/mk_cmds.sh.in
126         -$(CHMOD) +x $(SUBSTITUTE) 
127         $(SUBSTITUTE) $(srcdir)/mk_cmds.sh.in mk_cmds
128         $(CHMOD) +x mk_cmds
129
130 installdirs::
131         $(top_srcdir)/mkinstalldirs $(DESTDIR)$(ulibdir) \
132                 $(DESTDIR)$(includedir)/ss
133
134 install:: libss.a $(INSTALL_HFILES) copyright.h installdirs
135         $(INSTALL_DATA) libss.a $(DESTDIR)$(ulibdir)/libss.a
136         $(CHMOD) 644 $(DESTDIR)$(ulibdir)/libss.a
137         -$(RANLIB) $(DESTDIR)$(ulibdir)/libss.a
138         $(CHMOD) $(LIBMODE) $(DESTDIR)$(ulibdir)/libss.a
139         $(RM) -f $(includedir)/ss/*
140         for i in $(INSTALL_HFILES) copyright.h; do \
141                 $(INSTALL_DATA) $(srcdir)/$$i $(DESTDIR)$(includedir)/ss/$$i; \
142         done
143
144 uninstall::
145         $(RM) -f $(ulibdir)/libss.a
146         $(RM) -rf $(includedir)/ss
147
148 clean::
149         $(RM) -f ../libss.a libss.a mk_cmds ss_err.h ss_err.c std_rqs.c \
150                 *.o *~ \#* *.bak core 
151
152 mostlyclean:: clean
153 distclean:: clean
154         $(RM) -f .depend Makefile
155
156 # +++ Dependency line eater +++
157
158 # Makefile dependencies follow.  This must be the last section in
159 # the Makefile.in file
160 #
161 invocation.o: $(srcdir)/invocation.c $(srcdir)/ss_internal.h $(srcdir)/ss.h \
162  $(srcdir)/copyright.h $(top_builddir)/lib/ss/ss_err.h
163 help.o: $(srcdir)/help.c $(srcdir)/ss_internal.h $(srcdir)/ss.h \
164  $(srcdir)/copyright.h $(top_builddir)/lib/ss/ss_err.h
165 execute_cmd.o: $(srcdir)/execute_cmd.c $(srcdir)/ss_internal.h \
166  $(srcdir)/ss.h $(srcdir)/copyright.h $(top_builddir)/lib/ss/ss_err.h
167 listen.o: $(srcdir)/listen.c $(srcdir)/copyright.h $(srcdir)/ss_internal.h \
168  $(srcdir)/ss.h $(top_builddir)/lib/ss/ss_err.h
169 parse.o: $(srcdir)/parse.c $(srcdir)/ss_internal.h $(srcdir)/ss.h \
170  $(srcdir)/copyright.h $(top_builddir)/lib/ss/ss_err.h
171 error.o: $(srcdir)/error.c $(srcdir)/copyright.h $(srcdir)/../et/com_err.h \
172  $(srcdir)/ss_internal.h $(srcdir)/ss.h $(top_builddir)/lib/ss/ss_err.h
173 prompt.o: $(srcdir)/prompt.c $(srcdir)/copyright.h $(srcdir)/ss_internal.h \
174  $(srcdir)/ss.h $(top_builddir)/lib/ss/ss_err.h
175 request_tbl.o: $(srcdir)/request_tbl.c $(srcdir)/copyright.h \
176  $(srcdir)/ss_internal.h $(srcdir)/ss.h $(top_builddir)/lib/ss/ss_err.h
177 list_rqs.o: $(srcdir)/list_rqs.c $(srcdir)/copyright.h \
178  $(srcdir)/ss_internal.h $(srcdir)/ss.h $(top_builddir)/lib/ss/ss_err.h
179 pager.o: $(srcdir)/pager.c $(srcdir)/ss_internal.h $(srcdir)/ss.h \
180  $(srcdir)/copyright.h $(top_builddir)/lib/ss/ss_err.h
181 requests.o: $(srcdir)/requests.c $(srcdir)/copyright.h \
182  $(srcdir)/ss_internal.h $(srcdir)/ss.h $(top_builddir)/lib/ss/ss_err.h
183 data.o: $(srcdir)/data.c $(srcdir)/ss_internal.h $(srcdir)/ss.h \
184  $(srcdir)/copyright.h $(top_builddir)/lib/ss/ss_err.h
185