rpc_server: Remove references to sidmap from the lsa pipe code.
[kai/samba.git] / source4 / rules.mk
index b6a54fae255c3f8b03b91a1568407f67d292e5b7..5f91f8132e98cab1d9b22f3d22e8b3f8125747d1 100644 (file)
@@ -1,41 +1,27 @@
 # Dependencies command
 DEPENDS = $(CC) -M -MG -MP -MT $(<:.c=.o) -MT $@ \
-    $(CFLAGS) `$(PERL) $(srcdir)/script/cflags.pl $@` \
-    $(CPPFLAGS) $(FIRST_PREREQ) -o $@
+    $(CFLAGS) $(CPPFLAGS) $< -o $@
 # Dependencies for host objects
 HDEPENDS = $(CC) -M -MG -MP -MT $(<:.c=.ho) -MT $@ \
-    $(HOSTCC_FLAGS) `$(PERL) $(srcdir)/script/cflags.pl $@` \
-    $(CPPFLAGS) $(FIRST_PREREQ) -o $@
+    $(HOSTCC_FLAGS) $(CPPFLAGS) $< -o $@
 # Dependencies for precompiled headers
 PCHDEPENDS = $(CC) -M -MG -MT include/includes.h.gch -MT $@ \
-    $(CFLAGS) $(CPPFLAGS) $(FIRST_PREREQ) -o $@
-
-# $< is broken in older BSD versions:
-# when $@ is foo/bar.o, $< could be torture/foo/bar.c
-# if it also exists. So better use $* which is foo/bar
-# and append .c manually to get foo/bar.c
-#
-# If we have GNU Make, it is safe to use $<, which also lets
-# building with $srcdir != $builddir work.
+    $(CFLAGS) $(CPPFLAGS) $< -o $@
 
 # Run a static analysis checker
-CHECK = $(CC_CHECKER) $(CFLAGS) `$(PERL) $(srcdir)/script/cflags.pl $@` \
-    $(PICFLAG) $(CPPLAGS) -c $(FIRST_PREREQ) -o $@
+CHECK = $(CC_CHECKER) $(CFLAGS) $(PICFLAG) $(CPPLAGS) -c $< -o $@
 
 # Run the configured compiler
 COMPILE = $(CC) $(CFLAGS) $(PICFLAG) \
-          `$(PERL) $(srcdir)/script/cflags.pl $@` \
                  $(CPPFLAGS) \
-                 -c $(FIRST_PREREQ) -o $@
+                 -c $< -o $@
 
 # Run the compiler for the build host
-HCOMPILE = $(HOSTCC) $(HOSTCC_FLAGS) `$(PERL) $(srcdir)/script/cflags.pl $@` \
-        $(CPPFLAGS) -c $(FIRST_PREREQ) -o $@
+HCOMPILE = $(HOSTCC) $(HOSTCC_FLAGS) $(CPPFLAGS) -c $< -o $@
 
 # Precompile headers
 PCHCOMPILE = @$(CC) -Ilib/replace \
-    $(CFLAGS) `$(PERL) $(srcdir)/script/cflags.pl $@` \
-    $(PICFLAG) $(CPPFLAGS) -c $(FIRST_PREREQ) -o $@
+    $(CFLAGS) $(PICFLAG) $(CPPFLAGS) -c $< -o $@
 
 # Partial linking
 PARTLINK = @$(PROG_LD) -r
@@ -100,6 +86,13 @@ check:: test
 unused_macros:
        $(srcdir)/script/find_unused_macros.pl `find . -name "*.[ch]"` | sort
 
+# Create a static library
+%.a:
+       @echo Linking $@
+       @rm -f $@
+       @mkdir -p $(@D)
+       @$(STLD) $(STLD_FLAGS) $@ $^
+
 ###############################################################################
 # File types
 ###############################################################################
@@ -127,9 +120,11 @@ include/includes.d: include/includes.h
        @-mkdir -p `dirname $@`
        @$(COMPILE) && exit 0 ; \
                echo "The following command failed:" 1>&2;\
-               echo "$(COMPILE)" 1>&2;\
                $(COMPILE) >/dev/null 2>&1
 
+
+#              echo "$(COMPILE)" 1>&2;\
+
 .c.ho:
        @echo "Compiling $< with host compiler"
        @-mkdir -p `dirname $@`
@@ -167,9 +162,6 @@ DOCBOOK_MANPAGE_URL = http://docbook.sourceforge.net/release/xsl/current/manpage
 .8.xml.8:
        $(XSLTPROC) -o $@ $(DOCBOOK_MANPAGE_URL) $<
 
-DEP_FILES = $(patsubst %.ho,%.hd,$(patsubst %.o,%.d,$(ALL_OBJS))) \
-                  include/includes.d
-
 dist:: idl_full manpages configure distclean 
 
 configure: