added lint targets for Makefiles and a configure test to find whether lclint or lint...
[mmh] / mts / smtp / Makefile.in
index 7d197d5..9890d1c 100644 (file)
@@ -24,6 +24,10 @@ INCLUDES = -I../.. -I$(srcdir) -I$(top_srcdir)
 LORDER  = @LORDER@
 TSORT   = @TSORT@
 RANLIB  = @RANLIB@
+LIBTOOL = @LIBTOOL@
+GNU_LIBTOOL = @GNU_LIBTOOL@
+LINT   = @LINT@
+LINTFLAGS = @LINTFLAGS@
 
 COMPILE = $(CC) -c $(DEFS) $(INCLUDES) $(CFLAGS)
 
@@ -54,8 +58,12 @@ all: libsmtp.a
 
 libsmtp.a: $(OBJS)
        rm -f $@
-       ar cr $@ `$(LORDER) $(OBJS) | $(TSORT)`
-       $(RANLIB) $@
+       if test x$(LIBTOOL) != x -a x$(GNU_LIBTOOL) = x ; then \
+         $(LIBTOOL) -static -c $(OBJS) -o $@  ; \
+       else \
+         ar cr $@ `$(LORDER) $(OBJS) | $(TSORT)`  ; \
+         $(RANLIB) $@  ; \
+       fi 
 
 install:
 
@@ -76,6 +84,11 @@ realclean: distclean
 
 superclean: realclean
 
+# ========== DEPENDENCIES FOR LINT =================
+
+lint: 
+       $(LINT) $(LINTFLAGS) $(INCLUDES) $(DEFS) $(SRCS)
+
 # ========== DEPENDENCIES FOR MAINTENANCE ==========
 
 subdir = mts/smtp