summaryrefslogtreecommitdiffstats
path: root/Makefile
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-09 13:40:29 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-09 13:40:29 +0000
commitd8323fbdaecdfbd18b4c2d052273e6ac3a81e5e2 (patch)
treed92c2612ea8b4104e0628c58d76565938d8bd014 /Makefile
parentInitial commit. (diff)
downloadtraceroute-d8323fbdaecdfbd18b4c2d052273e6ac3a81e5e2.tar.xz
traceroute-d8323fbdaecdfbd18b4c2d052273e6ac3a81e5e2.zip
Adding upstream version 1:2.1.5.upstream/1%2.1.5
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile117
1 files changed, 117 insertions, 0 deletions
diff --git a/Makefile b/Makefile
new file mode 100644
index 0000000..e302c2b
--- /dev/null
+++ b/Makefile
@@ -0,0 +1,117 @@
+#
+# Copyright (c) 2000, 2001 Dmitry Butskoy
+# <dmitry@butskoy.name>
+# License: GPL v2 or any later
+#
+# See COPYING for the status of this software.
+#
+
+#
+# Global Makefile.
+# Global rules, targets etc.
+#
+# See Make.defines for specific configs.
+#
+
+
+srcdir = $(CURDIR)
+
+override TARGET := .MAIN
+
+dummy: all
+
+include ./Make.rules
+
+
+targets = $(EXEDIRS) $(LIBDIRS) $(MODDIRS)
+
+
+# be happy, easy, perfomancy...
+.PHONY: $(subdirs) dummy all force
+.PHONY: depend indent clean distclean libclean release store libs mods
+
+
+allprereq := $(EXEDIRS)
+
+ifneq ($(LIBDIRS),)
+libs: $(LIBDIRS)
+ifneq ($(EXEDIRS),)
+$(EXEDIRS): libs
+else
+allprereq += libs
+endif
+endif
+
+ifneq ($(MODDIRS),)
+mods: $(MODDIRS)
+ifneq ($(MODUSERS),)
+$(MODUSERS): mods
+else
+allprereq += mods
+endif
+ifneq ($(LIBDIRS),)
+$(MODDIRS): libs
+endif
+endif
+
+all: $(allprereq)
+
+depend install: $(allprereq)
+
+$(foreach goal,$(filter install-%,$(MAKECMDGOALS)),\
+ $(eval $(goal): $(patsubst install-%,%,$(goal))))
+
+
+what = all
+depend: what = depend
+install install-%: what = install
+
+ifneq ($(share),)
+$(share): shared = yes
+endif
+ifneq ($(noshare),)
+$(noshare): shared =
+endif
+
+
+$(targets): mkfile = $(if $(wildcard $@/Makefile),,-f $(srcdir)/default.rules)
+
+$(targets): force
+ @$(MAKE) $(mkfile) -C $@ $(what) TARGET=$@
+
+force:
+
+
+indent:
+ find . -type f -name "*.[ch]" -print -exec $(INDENT) {} \;
+
+clean:
+ rm -f $(foreach exe, $(EXEDIRS), ./$(exe)/$(exe)) nohup.out
+ rm -f `find . \( -name "*.[oa]" -o -name "*.[ls]o" \
+ -o -name core -o -name "core.[0-9]*" -o -name a.out \) -print`
+
+distclean: clean
+ rm -f `find $(foreach dir, $(subdirs), $(dir)/.) \
+ \( -name "*.[oa]" -o -name "*.[ls]o" \
+ -o -name core -o -name "core.[0-9]*" -o -name a.out \
+ -o -name .depend -o -name "_*" -o -name ".cross:*" \) \
+ -print`
+
+
+libclean:
+ rm -f $(foreach lib, $(LIBDIRS), ./$(lib)/$(lib).a ./$(lib)/$(lib).so)
+
+
+# Rules to make whole-distributive operations.
+#
+
+STORE_DIR = $(HOME)/pub
+
+release release1 release2 release3:
+ @./chvers.sh $@
+ @$(MAKE) store
+
+store: distclean
+ @./store.sh $(NAME) $(STORE_DIR)
+
+