1 ## $Id: Makefile 7727 2008-04-06 07:59:46Z iulius $
3 include ../Makefile.global
6 CFLAGS = $(GCFLAGS) -I.
8 SOURCES = his.c hismethods.c $(METHOD_SOURCES)
9 OBJECTS = $(SOURCES:.c=.o)
10 LOBJECTS = $(OBJECTS:.o=.lo)
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.
21 $(MAKE) COPT='$(WARNINGS)' all
24 $(LI_XPUB) libinnhist.$(EXTLIB) $(D)$(PATHLIB)/libinnhist.$(EXTLIB)
26 library: libinnhist.$(EXTLIB)
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
37 tags ctags: $(SOURCES)
38 $(CTAGS) $(SOURCES) ../include/*.h
41 @echo Run configure before running make. See INSTALL for details.
44 libinnhist.la: $(OBJECTS) $(LIBSTORAGE) $(LIBINN)
45 $(LIBLD) $(LDFLAGS) -o $@ $(LOBJECTS) \
46 $(LIBSTORAGE) $(LIBINN) $(EXTSTORAGELIBS) $(LIBS) \
47 -rpath $(PATHLIB) -version-info 2:0:0
49 libinnhist.a: $(OBJECTS)
51 $(RANLIB) libinnhist.a
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
60 Make.methods hismethods.h: hismethods.c buildconfig
61 hismethods.c: buildconfig
64 buildconfig: buildconfig.in $(FIXSCRIPT)
65 $(FIXSCRIPT) -i buildconfig.in
68 $(LIBCC) $(CFLAGS) $(CCOUTPUT)
70 $(LIBINN): ; (cd ../lib ; $(MAKE))
71 $(LIBSTORAGE): ; (cd ../storage ; $(MAKE) library)
74 ## Profiling. The rules are a bit brute-force, but good enough.
76 profiled: libinnhist$(PROFSUFFIX).a
79 libinnhist$(PROFSUFFIX).a: $(SOURCES)
81 $(MAKEPROFILING) libinnhist.a
82 mv libinnhist.a libinnhist$(PROFSUFFIX).a
83 $(RANLIB) libinnhist$(PROFSUFFIX).a
87 ## Dependencies. Default list, below, is probably good enough.
89 depend: $(SOURCES) $(EXTRA_SOURCES)
90 $(MAKEDEPEND) '$(CFLAGS)' $(SOURCES) $(EXTRA_SOURCES)
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 \
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