summaryrefslogtreecommitdiff
path: root/source4/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'source4/Makefile')
-rw-r--r--source4/Makefile48
1 files changed, 45 insertions, 3 deletions
diff --git a/source4/Makefile b/source4/Makefile
index 1fddfefce3..6083ee35b5 100644
--- a/source4/Makefile
+++ b/source4/Makefile
@@ -19,15 +19,57 @@ BNLD_FLAGS = $(LDFLAGS) $(SYS_LDFLAGS)
HOSTCC_FLAGS = -D_SAMBA_HOSTCC_ $(CFLAGS)
HOSTLD_FLAGS = $(LDFLAGS) $(SYS_LDFLAGS)
-default: all
+$(srcdir)/version.h: $(srcdir)/VERSION
+ @$(SHELL) script/mkversion.sh VERSION $(srcdir)/version.h $(srcdir)/
-include rules.mk
+regen_version::
+ @$(SHELL) script/mkversion.sh VERSION $(srcdir)/version.h $(srcdir)/
+
+clean_pch::
+ @echo "Removing precompiled headers"
+ @-rm -f include/includes.h.gch
+
+pch:: clean_pch include/includes.h.gch
+
+.DEFAULT_GOAL := all
+
+ifneq ($(automatic_deps),yes)
+ALL_PREDEP = proto
+.NOTPARALLEL:
+endif
+
+include build/make/rules.mk
+include build/make/python.mk
include data.mk
+include extra_cflags.txt
+
+DEP_FILES = $(patsubst %.ho,%.hd,$(patsubst %.o,%.d,$(ALL_OBJS))) \
+ include/includes.d
+
+ifeq ($(automatic_deps),yes)
+ifneq ($(MAKECMDGOALS),clean)
+ifneq ($(MAKECMDGOALS),distclean)
+ifneq ($(MAKECMDGOALS),realdistclean)
+ifneq ($(SKIP_DEP_FILES),yes)
+-include $(DEP_FILES)
+endif
+endif
+endif
+endif
+
+ifneq ($(SKIP_DEP_FILES),yes)
+clean::
+ @echo Removing dependency files
+ @find . -name '*.d' -o -name '*.hd' | xargs rm -f
+endif
+else
+include $(srcdir)/static_deps.mk
+endif
DEFAULT_HEADERS = $(srcdir)/lib/util/dlinklist.h \
$(srcdir)/version.h
-binaries::
+binaries:: $(BIN_PROGS) $(SBIN_PROGS)
libraries:: $(STATIC_LIBS) $(SHARED_LIBS)
modules:: $(PLUGINS)
headers:: $(PUBLIC_HEADERS) $(DEFAULT_HEADERS)