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