tMake dependencies more explicit in makefile - pm - barely a pack manager
 (HTM) git clone git://z3bra.org/pm
 (DIR) Log
 (DIR) Files
 (DIR) Refs
 (DIR) README
 (DIR) LICENSE
       ---
 (DIR) commit 7abfe9d3b7af0c91be34242fec36cf3c46f16295
 (DIR) parent 3fd5784d2ea900d1e8ef69be56677d835909695b
 (HTM) Author: z3bra <contactatz3bradotorg>
       Date:   Fri,  5 May 2017 08:28:15 +0200
       
       Make dependencies more explicit in makefile
       
       Diffstat:
         M config.mk                           |       3 ++-
         M makefile                            |      17 +++++++++++++----
       
       2 files changed, 15 insertions(+), 5 deletions(-)
       ---
 (DIR) diff --git a/config.mk b/config.mk
       t@@ -4,6 +4,7 @@ LD = ${CC}
        PREFIX = /usr/local
        MANDIR = ${PREFIX}/man
        
       -CFLAGS = -Wall -Wextra -pedantic -DREPOAWARE
       +CPPFLAGS = -DREPOAWARE
       +CFLAGS = -Wall -Wextra -pedantic
        LDFLAGS = -static
        LIBS = -larchive -lacl -lbz2 -llzma -lz
 (DIR) diff --git a/makefile b/makefile
       t@@ -1,12 +1,21 @@
        include config.mk
        
       -all: pm
       +pm: pm.o
       +pm.o: pm.c config.h
        
       -.c:
       -        $(CC) $(CFLAGS) $< $(LDFLAGS) $(LIBS) -o $@
       +.c.o:
       +        $(CC) $(CPPFLAGS) $< $(CFLAGS) -c -o $@
       +.o:
       +        $(LD) $< $(LDFLAGS) $(LIBS) -o $@
       +
       +config.h: config.def.h
       +        cp $< $@
        
        clean:
       -        rm -f pm
       +        rm -f pm *.o
       +
       +distclean: clean
       +        rm config.h
        
        install: pm pm.1 pack.5
                mkdir -p $(DESTDIR)$(PREFIX)/bin