chiark / gitweb /
debugging for thing that crashed
[innduct.git] / storage / Makefile
1 ##  $Id: Makefile 7727 2008-04-06 07:59:46Z iulius $
2
3 include ../Makefile.global
4
5 top           = ..
6 CFLAGS        = $(GCFLAGS) -I. $(BERKELEY_DB_CFLAGS)
7
8 SOURCES       = expire.c interface.c methods.c ov.c overdata.c ovmethods.c \
9                 $(METHOD_SOURCES)
10 OBJECTS       = $(SOURCES:.c=.o)
11 LOBJECTS      = $(OBJECTS:.o=.lo)
12
13 .SUFFIXES: .lo
14
15 all: library programs
16
17 # Included here after the all target, since additional rules are defined in
18 # Make.methods to be sure that we recurse properly to build the methods.
19 include Make.methods
20
21 warnings:
22         $(MAKE) COPT='$(WARNINGS)' all
23
24 install: all
25         $(LI_XPUB) libstorage.$(EXTLIB) $D$(PATHLIB)/libstorage.$(EXTLIB)
26         for F in $(PROGRAMS) ; do \
27             $(LI_XPRI) $$F $D$(PATHBIN)/`basename $$F` ; \
28         done
29
30 library: libstorage.$(EXTLIB)
31
32 programs: $(PROGRAMS)
33
34 clobber clean distclean:
35         rm -f *.o *.lo */*.o */*.lo libstorage.la libstorage.a
36         rm -f $(PROGRAMS) libstorage_pure_*.a .pure
37         rm -f buildconfig methods.c methods.h ovmethods.c ovmethods.h
38         rm -f profiled libstorage$(PROFSUFFIX).a
39         rm -rf .libs */.libs
40
41 tags ctags: $(SOURCES)
42         $(CTAGS) $(SOURCES) ../include/*.h ../include/inn/*.h
43
44 $(FIXSCRIPT):
45         @echo Run configure before running make.  See INSTALL for details.
46         @exit 1
47
48 libstorage.la: $(OBJECTS) $(LIBINN)
49         $(LIBLD) $(LDFLAGS) -o $@ $(LOBJECTS) \
50             $(LIBINN) $(EXTSTORAGELIBS) $(LIBS) \
51             -rpath $(PATHLIB) -version-info 2:0:0
52
53 libstorage.a: $(OBJECTS)
54         ar r $@ $(OBJECTS)
55         $(RANLIB) libstorage.a
56
57 # Make.methods is included in the distribution tarball since some non-GNU
58 # makes can't deal with including a non-existent file, so don't depend on
59 # it.  The dependencies aren't entirely accurate; you really want to re-run
60 # buildconfig each time a new subdirectory is added to the directory.  But
61 # adding a dependency on . is a bit too non-portable for my taste and causes
62 # too many rebuilds.
63 Make.methods methods.h ovmethods.c ovmethods.h methods.c: buildconfig
64         ./buildconfig
65
66 buildconfig: buildconfig.in $(FIXSCRIPT)
67         $(FIXSCRIPT) -i buildconfig.in
68
69 .c.o .c.lo:
70         $(LIBCC) $(CFLAGS) $(CCOUTPUT)
71
72 ovtest: ov.c libstorage.$(EXTLIB) $(LIBINN)
73         $(CC) $(CFLAGS) -D_TEST_ -o ovtest ov.c \
74             libstorage.$(EXTLIB) $(LIBINN) $(EXTSTORAGELIBS) $(LIBS)
75
76 $(LIBINN):      ; (cd ../lib ; $(MAKE))
77 $(LIBHIST):     ; (cd ../history ; $(MAKE))
78
79
80 ##  Profiling.  The rules are a bit brute-force, but good enough.
81
82 profiled: libstorage$(PROFSUFFIX).a
83         date >$@
84
85 libstorage$(PROFSUFFIX).a: $(SOURCES)
86         rm -f $(OBJECTS)
87         $(MAKEPROFILING) libstorage.a
88         mv libstorage.a libstorage$(PROFSUFFIX).a
89         $(RANLIB) libstorage$(PROFSUFFIX).a
90         rm -f $(OBJECTS)
91
92
93 ##  Dependencies.  Default list, below, is probably good enough.
94
95 depend: Makefile $(SOURCES) $(EXTRA_SOURCES)
96         $(MAKEDEPEND) '$(CFLAGS)' $(SOURCES) $(EXTRA_SOURCES)
97
98 # DO NOT DELETE THIS LINE -- make depend depends on it.
99 expire.o: expire.c ../include/config.h ../include/inn/defines.h \
100   ../include/inn/system.h ../include/clibrary.h ../include/config.h \
101   ../include/inn/innconf.h ../include/inn/defines.h ../include/libinn.h \
102   ../include/ov.h ../include/storage.h ../include/inn/history.h \
103   ovinterface.h ../include/storage.h ../include/inn/history.h \
104   ../include/paths.h
105 interface.o: interface.c ../include/config.h ../include/inn/defines.h \
106   ../include/inn/system.h ../include/clibrary.h ../include/config.h \
107   ../include/conffile.h ../include/inn/innconf.h ../include/inn/defines.h \
108   ../include/inn/wire.h interface.h ../include/storage.h \
109   ../include/libinn.h methods.h ../include/paths.h
110 methods.o: methods.c interface.h ../include/config.h \
111   ../include/inn/defines.h ../include/inn/system.h ../include/storage.h \
112   ../include/config.h methods.h cnfs/cnfs.h timecaf/timecaf.h \
113   ../include/config.h interface.h timehash/timehash.h ../include/config.h \
114   interface.h tradspool/tradspool.h ../include/config.h interface.h \
115   trash/trash.h ../include/config.h interface.h
116 ov.o: ov.c ../include/config.h ../include/inn/defines.h \
117   ../include/inn/system.h ../include/clibrary.h ../include/config.h \
118   ../include/inn/innconf.h ../include/inn/defines.h ../include/libinn.h \
119   ../include/ov.h ../include/storage.h ../include/inn/history.h \
120   ovinterface.h ../include/storage.h ../include/inn/history.h ovmethods.h
121 overdata.o: overdata.c ../include/config.h ../include/inn/defines.h \
122   ../include/inn/system.h ../include/clibrary.h ../include/config.h \
123   ../include/inn/buffer.h ../include/inn/defines.h \
124   ../include/inn/innconf.h ../include/inn/messages.h ../include/inn/qio.h \
125   ../include/inn/wire.h ../include/inn/vector.h ../include/libinn.h \
126   ovinterface.h ../include/ov.h ../include/storage.h \
127   ../include/inn/history.h ../include/storage.h ../include/inn/history.h \
128   ../include/paths.h
129 ovmethods.o: ovmethods.c ovinterface.h ../include/config.h \
130   ../include/inn/defines.h ../include/inn/system.h ../include/ov.h \
131   ../include/storage.h ../include/config.h ../include/inn/history.h \
132   ../include/inn/defines.h ../include/storage.h ../include/inn/history.h \
133   buffindexed/buffindexed.h ovdb/ovdb.h tradindexed/tradindexed.h \
134   ../include/config.h ../include/ov.h ../include/storage.h
135 buffindexed/buffindexed.o: buffindexed/buffindexed.c ../include/config.h \
136   ../include/inn/defines.h ../include/inn/system.h ../include/clibrary.h \
137   ../include/config.h ../include/portable/mmap.h ../include/config.h \
138   ../include/inn/innconf.h ../include/inn/defines.h ../include/libinn.h \
139   ../include/ov.h ../include/storage.h ../include/inn/history.h \
140   ../include/paths.h ovinterface.h ../include/config.h ../include/ov.h \
141   ../include/storage.h ../include/inn/history.h ../include/storage.h \
142   buffindexed/buffindexed.h
143 cnfs/cnfs.o: cnfs/cnfs.c ../include/config.h ../include/inn/defines.h \
144   ../include/inn/system.h ../include/clibrary.h ../include/config.h \
145   ../include/portable/mmap.h ../include/config.h \
146   ../include/portable/time.h ../include/inn/innconf.h \
147   ../include/inn/defines.h interface.h ../include/config.h \
148   ../include/storage.h ../include/libinn.h methods.h interface.h \
149   ../include/paths.h ../include/inn/wire.h ../include/inn/mmap.h \
150   cnfs/cnfs.h cnfs/cnfs-private.h
151 ovdb/ovdb.o: ovdb/ovdb.c ../include/config.h ../include/inn/defines.h \
152   ../include/inn/system.h ../include/clibrary.h ../include/config.h \
153   ../include/portable/socket.h ../include/config.h \
154   ../include/portable/time.h ../include/conffile.h \
155   ../include/inn/innconf.h ../include/inn/defines.h \
156   ../include/inn/messages.h ../include/libinn.h ../include/paths.h \
157   ../include/storage.h ../include/ov.h ../include/storage.h \
158   ../include/inn/history.h ovinterface.h ../include/config.h \
159   ../include/ov.h ../include/storage.h ../include/inn/history.h \
160   ovdb/ovdb.h ovdb/ovdb-private.h
161 timecaf/caf.o: timecaf/caf.c ../include/config.h ../include/inn/defines.h \
162   ../include/inn/system.h ../include/clibrary.h ../include/config.h \
163   ../include/libinn.h timecaf/caf.h
164 timecaf/timecaf.o: timecaf/timecaf.c ../include/config.h ../include/inn/defines.h \
165   ../include/inn/system.h ../include/clibrary.h ../include/config.h \
166   ../include/portable/mmap.h ../include/config.h timecaf/caf.h \
167   ../include/inn/innconf.h ../include/inn/defines.h ../include/inn/wire.h \
168   ../include/libinn.h methods.h interface.h ../include/config.h \
169   ../include/storage.h timecaf/timecaf.h interface.h ../include/paths.h
170 timehash/timehash.o: timehash/timehash.c ../include/config.h \
171   ../include/inn/defines.h ../include/inn/system.h ../include/clibrary.h \
172   ../include/config.h ../include/portable/mmap.h ../include/config.h \
173   ../include/inn/innconf.h ../include/inn/defines.h ../include/inn/wire.h \
174   ../include/libinn.h methods.h interface.h ../include/config.h \
175   ../include/storage.h ../include/paths.h timehash/timehash.h interface.h
176 tradindexed/tdx-cache.o: tradindexed/tdx-cache.c ../include/config.h \
177   ../include/inn/defines.h ../include/inn/system.h ../include/clibrary.h \
178   ../include/config.h ../include/inn/hashtab.h ../include/inn/defines.h \
179   ../include/inn/messages.h ../include/libinn.h ../include/storage.h \
180   tradindexed/tdx-private.h
181 tradindexed/tdx-data.o: tradindexed/tdx-data.c ../include/config.h \
182   ../include/inn/defines.h ../include/inn/system.h ../include/clibrary.h \
183   ../include/config.h ../include/portable/mmap.h ../include/config.h \
184   ../include/inn/history.h ../include/inn/defines.h \
185   ../include/inn/innconf.h ../include/inn/messages.h \
186   ../include/inn/mmap.h ../include/libinn.h ../include/ov.h \
187   ../include/storage.h ../include/inn/history.h ovinterface.h \
188   ../include/config.h ../include/ov.h ../include/storage.h \
189   ../include/inn/history.h ../include/storage.h tradindexed/tdx-private.h \
190   tradindexed/tdx-structure.h
191 tradindexed/tdx-group.o: tradindexed/tdx-group.c ../include/config.h \
192   ../include/inn/defines.h ../include/inn/system.h ../include/clibrary.h \
193   ../include/config.h ../include/portable/mmap.h ../include/config.h \
194   ../include/inn/hashtab.h ../include/inn/defines.h \
195   ../include/inn/innconf.h ../include/inn/messages.h \
196   ../include/inn/mmap.h ../include/inn/qio.h ../include/inn/vector.h \
197   ../include/libinn.h ../include/paths.h tradindexed/tdx-private.h \
198   ../include/storage.h tradindexed/tdx-structure.h
199 tradindexed/tradindexed.o: tradindexed/tradindexed.c ../include/config.h \
200   ../include/inn/defines.h ../include/inn/system.h ../include/clibrary.h \
201   ../include/config.h ../include/inn/innconf.h ../include/inn/defines.h \
202   ../include/inn/messages.h ../include/libinn.h ../include/ov.h \
203   ../include/storage.h ../include/inn/history.h ../include/storage.h \
204   tradindexed/tdx-private.h tradindexed/tdx-structure.h \
205   tradindexed/tradindexed.h
206 tradspool/tradspool.o: tradspool/tradspool.c ../include/config.h \
207   ../include/inn/defines.h ../include/inn/system.h ../include/clibrary.h \
208   ../include/config.h ../include/portable/mmap.h ../include/config.h \
209   ../include/inn/innconf.h ../include/inn/defines.h ../include/inn/qio.h \
210   ../include/inn/wire.h ../include/libinn.h ../include/paths.h methods.h \
211   interface.h ../include/config.h ../include/storage.h \
212   tradspool/tradspool.h interface.h
213 trash/trash.o: trash/trash.c ../include/config.h ../include/inn/defines.h \
214   ../include/inn/system.h ../include/clibrary.h ../include/config.h \
215   ../include/libinn.h methods.h interface.h ../include/config.h \
216   ../include/storage.h trash/trash.h interface.h
217 tradindexed/tdx-util.o: tradindexed/tdx-util.c ../include/config.h \
218   ../include/inn/defines.h ../include/inn/system.h ../include/clibrary.h \
219   ../include/config.h ../include/inn/buffer.h ../include/inn/defines.h \
220   ../include/inn/history.h ../include/inn/innconf.h \
221   ../include/inn/messages.h ../include/inn/vector.h ../include/libinn.h \
222   ../include/ov.h ../include/storage.h ../include/inn/history.h \
223   ovinterface.h ../include/config.h ../include/ov.h ../include/storage.h \
224   ../include/inn/history.h ../include/paths.h tradindexed/tdx-private.h \
225   ../include/storage.h tradindexed/tdx-structure.h