chiark / gitweb /
rename recentact to lowvol
[inn-innduct.git] / history / Makefile
1 ##  $Id: Makefile 7727 2008-04-06 07:59:46Z iulius $
2
3 include ../Makefile.global
4
5 top           = ..
6 CFLAGS        = $(GCFLAGS) -I.
7
8 SOURCES       = his.c hismethods.c $(METHOD_SOURCES)
9 OBJECTS       = $(SOURCES:.c=.o)
10 LOBJECTS      = $(OBJECTS:.o=.lo)
11
12 .SUFFIXES: .lo
13
14 all: library programs
15
16 # Included here after the all target, since additional rules are defined in
17 # Make.methods to be sure that we recurse properly to build the methods.
18 include Make.methods
19
20 warnings:
21         $(MAKE) COPT='$(WARNINGS)' all
22
23 install: all
24         $(LI_XPUB) libinnhist.$(EXTLIB) $(D)$(PATHLIB)/libinnhist.$(EXTLIB)
25
26 library: libinnhist.$(EXTLIB)
27
28 programs: $(PROGRAMS)
29
30 clobber clean distclean:
31         rm -f *.o *.lo */*.o */*.lo libinnhist.la libinnhist.a
32         rm -f libinnhist_pure_*.a .pure $(PROGRAMS)
33         rm -f buildconfig hismethods.c hismethods.h
34         rm -f profiled libinnhist$(PROFSUFFIX).a
35         rm -rf .libs */.libs
36
37 tags ctags: $(SOURCES)
38         $(CTAGS) $(SOURCES) ../include/*.h
39
40 $(FIXSCRIPT):
41         @echo Run configure before running make.  See INSTALL for details.
42         @exit 1
43
44 libinnhist.la: $(OBJECTS) $(LIBSTORAGE) $(LIBINN)
45         $(LIBLD) $(LDFLAGS) -o $@ $(LOBJECTS) \
46             $(LIBSTORAGE) $(LIBINN) $(EXTSTORAGELIBS) $(LIBS) \
47             -rpath $(PATHLIB) -version-info 2:0:0
48
49 libinnhist.a: $(OBJECTS)
50         ar r $@ $(OBJECTS)
51         $(RANLIB) libinnhist.a
52
53 # Try to set up these rules so that buildconfig is only run once.
54 # Make.methods is included in the distribution tarball since some non-GNU
55 # makes can't deal with including a non-existent file, so don't depend on
56 # it.  The dependencies aren't entirely accurate; you really want to re-run
57 # buildconfig each time a new subdirectory is added to the directory.  But
58 # adding a dependency on . is a bit too non-portable for my taste and causes
59 # too many rebuilds.
60 Make.methods hismethods.h: hismethods.c buildconfig
61 hismethods.c: buildconfig
62         ./buildconfig
63
64 buildconfig: buildconfig.in $(FIXSCRIPT)
65         $(FIXSCRIPT) -i buildconfig.in
66
67 .c.o .c.lo:
68         $(LIBCC) $(CFLAGS) $(CCOUTPUT)
69
70 $(LIBINN):      ; (cd ../lib ; $(MAKE))
71 $(LIBSTORAGE):  ; (cd ../storage ; $(MAKE) library)
72
73
74 ##  Profiling.  The rules are a bit brute-force, but good enough.
75
76 profiled: libinnhist$(PROFSUFFIX).a
77         date >$@
78
79 libinnhist$(PROFSUFFIX).a: $(SOURCES)
80         rm -f $(OBJECTS)
81         $(MAKEPROFILING) libinnhist.a
82         mv libinnhist.a libinnhist$(PROFSUFFIX).a
83         $(RANLIB) libinnhist$(PROFSUFFIX).a
84         rm -f $(OBJECTS)
85
86
87 ##  Dependencies.  Default list, below, is probably good enough.
88
89 depend: $(SOURCES) $(EXTRA_SOURCES)
90         $(MAKEDEPEND) '$(CFLAGS)' $(SOURCES) $(EXTRA_SOURCES)
91
92 # DO NOT DELETE THIS LINE -- make depend depends on it.
93 his.o: his.c ../include/config.h ../include/inn/defines.h \
94   ../include/inn/system.h ../include/clibrary.h ../include/config.h \
95   ../include/portable/time.h ../include/config.h ../include/inn/history.h \
96   ../include/inn/defines.h ../include/inn/messages.h \
97   ../include/inn/timer.h ../include/libinn.h ../include/storage.h \
98   hisinterface.h hismethods.h
99 hismethods.o: hismethods.c hisinterface.h ../include/config.h \
100   ../include/inn/defines.h ../include/inn/system.h hismethods.h \
101   hisv6/hisv6.h
102 hisv6/hisv6.o: hisv6/hisv6.c ../include/config.h ../include/inn/defines.h \
103   ../include/inn/system.h ../include/clibrary.h ../include/config.h \
104   hisinterface.h ../include/config.h hisv6/hisv6.h hisv6/hisv6-private.h \
105   ../include/inn/history.h ../include/inn/defines.h ../include/storage.h \
106   ../include/libinn.h ../include/dbz.h ../include/libinn.h \
107   ../include/inn/innconf.h ../include/inn/timer.h ../include/inn/qio.h \
108   ../include/inn/sequence.h ../include/inndcomm.h