2 # Makefile for zotnet subdirectory
16 GNU_LIBTOOL = @GNU_LIBTOOL@
18 # flags passed to recursive makes in subdirectories
19 MAKEDEFS = CC='$(CC)' CPPFLAGS='$(CPPFLAGS)' DEFS='$(DEFS)' \
20 CFLAGS='$(CFLAGS)' LDFLAGS='$(LDFLAGS)' LIBS='$(LIBS)' \
21 prefix='$(prefix)' exec_prefix='$(exec_prefix)' bindir='$(bindir)' \
22 etcdir='$(etcdir)' libdir='$(libdir)' mandir='$(mandir)' \
23 mailspool='$(mailspool)' sendmailpath='$(sendmailpath)' \
24 default_editor='$(default_editor)' default_pager='$(default_pager)'
26 # object files in libzot.a
27 OBJS = mts/mts.o mts/client.o \
28 tws/dtime.o tws/dtimep.o tws/lexstring.o
33 # all files in this directory included in the distribution
39 # ========= DEPENDENCIES FOR BUILDING AND INSTALLING ==========
41 all: all-recursive libzot.a
45 if test x$(LIBTOOL) != x -a x$(GNU_LIBTOOL) = x ; then \
46 $(LIBTOOL) -static -c $(OBJS) -o $@ ; \
48 ar cr $@ `$(LORDER) $(OBJS) | $(TSORT)` ; \
53 for subdir in $(SUBDIRS); do \
54 (cd $$subdir && $(MAKE) $(MAKEDEFS) all) || exit 1; \
58 for subdir in $(SUBDIRS); do \
59 (cd $$subdir && $(MAKE) $(MAKEDEFS) $@) || exit 1; \
62 # ========== DEPENDENCIES FOR CLEANUP ==========
64 mostlyclean: mostlyclean-recursive mostlyclean-local
65 clean: clean-recursive clean-local
66 distclean: distclean-recursive distclean-local
67 realclean: realclean-recursive realclean-local
68 superclean: superclean-recursive superclean-local
73 clean-local: mostlyclean-local
76 distclean-local: clean-local
79 realclean-local: distclean-local
81 superclean-local: realclean-local
83 mostlyclean-recursive clean-recursive distclean-recursive realclean-recursive superclean-recursive:
84 for subdir in $(SUBDIRS); do \
85 target=`echo $@ | sed 's/-recursive//'`; \
86 (cd $$subdir && $(MAKE) $(MAKEDEFS) $$target) || exit 1; \
89 # ========== DEPENDENCIES FOR MAINTENANCE ==========
93 Makefile: Makefile.in ../config.status
94 cd .. && CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= ./config.status
96 distdir = ../`cat ../distname`/$(subdir)
98 @echo "Copying distribution files in $(subdir)"
99 @for file in $(DIST); do \
100 cp -p $(srcdir)/$$file $(distdir); \
102 @for subdir in $(SUBDIRS); do \
103 mkdir $(distdir)/$$subdir; \
104 chmod 755 $(distdir)/$$subdir; \
105 (cd $$subdir && $(MAKE) $@) || exit 1; \