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 \
34 # all files in this directory included in the distribution
40 # ========= DEPENDENCIES FOR BUILDING AND INSTALLING ==========
42 all: all-recursive libzot.a
46 if test x$(LIBTOOL) != x -a x$(GNU_LIBTOOL) = x ; then \
47 $(LIBTOOL) -static -c $(OBJS) -o $@ ; \
49 ar cr $@ `$(LORDER) $(OBJS) | $(TSORT)` ; \
54 for subdir in $(SUBDIRS); do \
55 (cd $$subdir && $(MAKE) $(MAKEDEFS) all) || exit 1; \
59 for subdir in $(SUBDIRS); do \
60 (cd $$subdir && $(MAKE) $(MAKEDEFS) $@) || exit 1; \
63 # ========== DEPENDENCIES FOR CLEANUP ==========
65 mostlyclean: mostlyclean-recursive mostlyclean-local
66 clean: clean-recursive clean-local
67 distclean: distclean-recursive distclean-local
68 realclean: realclean-recursive realclean-local
69 superclean: superclean-recursive superclean-local
74 clean-local: mostlyclean-local
77 distclean-local: clean-local
80 realclean-local: distclean-local
82 superclean-local: realclean-local
84 mostlyclean-recursive clean-recursive distclean-recursive realclean-recursive superclean-recursive:
85 for subdir in $(SUBDIRS); do \
86 target=`echo $@ | sed 's/-recursive//'`; \
87 (cd $$subdir && $(MAKE) $(MAKEDEFS) $$target) || exit 1; \
90 # ========== DEPENDENCIES FOR MAINTENANCE ==========
94 Makefile: Makefile.in ../config.status
95 cd .. && CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= ./config.status
97 distdir = ../`cat ../distname`/$(subdir)
99 @echo "Copying distribution files in $(subdir)"
100 @for file in $(DIST); do \
101 cp -p $(srcdir)/$$file $(distdir); \
103 @for subdir in $(SUBDIRS); do \
104 mkdir $(distdir)/$$subdir; \
105 chmod 755 $(distdir)/$$subdir; \
106 (cd $$subdir && $(MAKE) $@) || exit 1; \