1) use Makefile.inc
authorewt <devnull@localhost>
Wed, 25 Sep 1996 19:16:51 +0000 (19:16 +0000)
committerewt <devnull@localhost>
Wed, 25 Sep 1996 19:16:51 +0000 (19:16 +0000)
2) added distclean rule

CVS patchset: 1055
CVS date: 1996/09/25 19:16:51

build/Makefile.in
tools/Makefile.in

index 56dce82..3cefb7a 100644 (file)
@@ -1,17 +1,14 @@
-CC = @CC@
-CPP = @CPP@
-
 srcdir = @srcdir@
 VPATH = $(srcdir)
 
 LIBOBJECTS = spec.o vspec.o build.o files.o names.o pack.o myftw.o reqprov.o
 LIBBUILD = libbuild.a
 LOADLIBES = -lrpm $(LIBEFENCE)
-AR = ar r
-RANLIB = ranlib
 
 # -----------------------------------------------------------------------
 
+include $(srcdir)/../Makefile.inc
+
 ifeq (.depend,$(wildcard .depend))
 TARGET=everything
 else
@@ -23,7 +20,7 @@ all: $(TARGET)
 everything: $(LIBBUILD)
 
 $(LIBBUILD): $(LIBOBJECTS) 
-       $(AR) $@ $(LIBOBJECTS)
+       $(AR) $@ $(LIBOBJECTS)
        $(RANLIB) $@
 
 $(PROGS): $(LIBOBJECTS)
@@ -31,8 +28,11 @@ $(PROGS): $(LIBOBJECTS)
 clean:
        rm -f *.a *.o *~ $(PROGS)
 
+distclean:
+       rm -f .depend Makefile
+
 depend:
-       $(CPP) $(CFLAGS) -M *.c > .depend
+       $(CPP) $(CFLAGS) -M $(srcdir)/*.c > .depend
 
 ifeq (.depend,$(wildcard .depend))
 include .depend
index 2446a2f..030acaa 100644 (file)
@@ -1,9 +1,8 @@
-CC = @CC@
-CPP = @CPP@
-
 srcdir = @srcdir@
 VPATH = $(srcdir)
 
+include $(srcdir)/../Makefile.inc
+
 PROGS = rpmlead rpmheader rpmarchive rpmsignature dump dumpdb
 LOADLIBES = @LIBS@ @ZLIB@
 
@@ -20,8 +19,11 @@ everything: $(PROGS)
 clean:
        rm -f *.a *.o core *~ $(PROGS)
 
+distclean: clean
+       rm -f .depend Makefile
+
 depend:
-       $(CPP) $(CFLAGS) -M *.c > .depend
+       $(CPP) $(CFLAGS) -M $(srcdir)/*.c > .depend
 
 $(PROGS): ../lib/librpm.a