Fix typo
[freeradius.git] / src / modules / rlm_eap / types / Makefile
index 99fae99..0e89dad 100644 (file)
@@ -1,27 +1,34 @@
-TARGET_LIBS = static dynamic
+#
+# Makefile
+#
+# Version:     $Id$
+#
 
 all:
-       $(MAKE) $(MFLAGS) WHAT_TO_MAKE=$@ common
-
-static:
-       $(MAKE) $(MFLAGS) WHAT_TO_MAKE=$@ common
-
-dynamic:
-       $(MAKE) $(MFLAGS) WHAT_TO_MAKE=$@ common
+       @$(MAKE) $(MFLAGS) WHAT_TO_MAKE=$@ common
 
 clean:
-       $(MAKE) $(MFLAGS) WHAT_TO_MAKE=$@ common
+       @$(MAKE) $(MFLAGS) WHAT_TO_MAKE=$@ common
 
 install:
-       $(MAKE) $(MFLAGS) WHAT_TO_MAKE=$@ common
-
-common: 
-       @for mod in rlm_eap*; do \
-               what=$(WHAT_TO_MAKE); \
-               [ "$$what" = "all" ] && what="$(TARGET_LIBS)"; \
-               if [ -d $$mod ] && [ -f $$mod/Makefile ]; then \
-                       echo "Making $$what in $$mod..."; \
-                       (cd $$mod && $(MAKE) $(MFLAGS) $$what) || exit 1; \
-               fi; \
-       done
+       @$(MAKE) $(MFLAGS) WHAT_TO_MAKE=$@ common
+
+reconfig:
+       @$(MAKE) $(MFLAGS) WHAT_TO_MAKE=$@ common
+
+SUBDIRS := $(patsubst %/,%,$(dir $(wildcard rlm_eap*/Makefile)))
+
+.PHONY: common $(SUBDIRS)
+
+common: $(SUBDIRS)
+
+# The PEAP and TTLS sub-modules require eap_tls.
+#
+# If they're not being built, this rule is ignored because they're
+# phony targets.
+# 
+rlm_eap_peap rlm_eap_ttls: rlm_eap_tls
 
+$(SUBDIRS): 
+       @echo "Making $(WHAT_TO_MAKE) in $(X)types/$@..."
+       @$(MAKE) $(MFLAGS) X=$(X)types/ -C $@ $(WHAT_TO_MAKE)