madtty only need to control colors, let the caller deal with ncurses.
[apps/madtty.git] / am / footer.mk
index 0acffb8..07511c8 100644 (file)
@@ -42,7 +42,7 @@ define CLASS_PROGRAMS_tpl
 
   $1: $$(call deps_create,$$($1_SOURCES),$(_cobjs)/$1)
        $(CC) $$(CFLAGS) $$($1_CPPFLAGS) -o $$@ $$(filter %.o,$$^) \
-               $$(LDFLAGS) $$($1_LDFLAGS) $$($1_LIBADD)
+               $$(LDFLAGS) $$($1_LDFLAGS) $$($1_LDADD)
 
   $$(eval $$(call RULE_C_tpl,$1,))
 
@@ -68,7 +68,7 @@ define CLASS_LIBRARIES_tpl
 
   $1.so$3: $$(call deps_create,$$($1_SOURCES),$(_cobjs)/$1)
        $(CC) $$(CFLAGS) $$($1_CPPFLAGS) -fPIC -shared -o $$@ $$(filter %.o,$$^) \
-               $$(LDFLAGS) $$($1_LDFLAGS) $$($1_LIBADD)
+               $$(LDFLAGS) $$($1_LDFLAGS) $$($1_LDADD)
        $$(if $$(word 2,$$(subst ., ,$3)),ln -sf $$@ $1.so.$$(word 1,$$(subst ., ,$3)))
        $$(if $$($1_VERSION), ln -sf $$@ $1.so)
 
@@ -138,7 +138,7 @@ endif
 ########################################################################}}}#
 
 all check clobber distclean install::
-       @set -e $(patsubst %,; $(MAKE) -rC % $@,$(SUBDIRS))
+       @$(if $(SUBDIRS),set -e $(patsubst %,; $(MAKE) -rC % $@,$(SUBDIRS)))
 
 CLEAN_RECURSE=1
 clean::
@@ -148,6 +148,7 @@ clean::
 clobber distclean:: CLEAN_RECURSE=
 clobber distclean:: clean
        $(RM) -r .objs* $(DISTCLEANFILES)
+       @[ -f Makefile.in ] && $(RM) Makefile
 
 ifeq (".","$(DEPTH)")
 clobber distclean::