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