added lint targets for Makefiles and a configure test to find whether lclint or lint...
[mmh] / mts / smtp / Makefile.in
1 #
2 # Makefile for mts/smtp subdirectory
3 #
4 # $Id$
5 #
6
7 SHELL = /bin/sh
8
9 top_srcdir = @top_srcdir@
10 srcdir     = @srcdir@
11 VPATH      = @srcdir@
12
13 prefix      = @prefix@
14 exec_prefix = @exec_prefix@
15 bindir      = @bindir@
16 libdir      = @libdir@
17 etcdir      = @sysconfdir@
18
19 CC       = @CC@
20 CFLAGS   = @CFLAGS@
21 DEFS     = @DEFS@
22 INCLUDES = -I../.. -I$(srcdir) -I$(top_srcdir)
23
24 LORDER  = @LORDER@
25 TSORT   = @TSORT@
26 RANLIB  = @RANLIB@
27 LIBTOOL = @LIBTOOL@
28 GNU_LIBTOOL = @GNU_LIBTOOL@
29 LINT    = @LINT@
30 LINTFLAGS = @LINTFLAGS@
31
32 COMPILE = $(CC) -c $(DEFS) $(INCLUDES) $(CFLAGS)
33
34 .SUFFIXES:
35 .SUFFIXES: .c .o
36
37 .c.o:
38         $(COMPILE) $<
39
40 # header files
41 HDRS = smtp.h
42
43 # source
44 SRCS = hosts.c smtp.c
45
46 # object files in libsmtp.a
47 OBJS = hosts.o smtp.o
48
49 # auxiliary files
50 AUX = Makefile.in
51
52 # all files in this directory included in the distribution
53 DIST = $(HDRS) $(SRCS) $(AUX)
54
55 # ========= DEPENDENCIES FOR BUILDING AND INSTALLING ==========
56
57 all: libsmtp.a
58
59 libsmtp.a: $(OBJS)
60         rm -f $@
61         if test x$(LIBTOOL) != x -a x$(GNU_LIBTOOL) = x ; then \
62           $(LIBTOOL) -static -c $(OBJS) -o $@  ; \
63         else \
64           ar cr $@ `$(LORDER) $(OBJS) | $(TSORT)`  ; \
65           $(RANLIB) $@  ; \
66         fi 
67
68 install:
69
70 uninstall:
71
72 # ========== DEPENDENCIES FOR CLEANUP ==========
73
74 mostlyclean:
75         rm -f *.o *~
76
77 clean: mostlyclean
78         rm -f libsmtp.a
79
80 distclean: clean
81         rm -f Makefile
82
83 realclean: distclean
84
85 superclean: realclean
86
87 # ========== DEPENDENCIES FOR LINT =================
88
89 lint: 
90         $(LINT) $(LINTFLAGS) $(INCLUDES) $(DEFS) $(SRCS)
91
92 # ========== DEPENDENCIES FOR MAINTENANCE ==========
93
94 subdir = mts/smtp
95
96 Makefile: Makefile.in ../../config.status
97         cd ../.. && CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= ./config.status
98  
99 distdir = ../../`cat ../../distname`/$(subdir)
100 nmhdist: $(DIST)
101         @echo "Copying distribution files in $(subdir)"
102         @for file in $(DIST); do \
103           cp -p $(srcdir)/$$file $(distdir); \
104         done
105