pm

barely a pack manager
git clone git://z3bra.org/pm
Log | Files | Refs | README | LICENSE

commit 7abfe9d3b7af0c91be34242fec36cf3c46f16295
parent 3fd5784d2ea900d1e8ef69be56677d835909695b
Author: z3bra <contactatz3bradotorg>
Date:   Fri May  5 08:28:15 +0200

Make dependencies more explicit in makefile

Diffstat:
config.mk | 3++-
makefile | 17+++++++++++++----
2 files changed, 15 insertions(+), 5 deletions(-)
diff --git a/config.mk b/config.mk @@ -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 diff --git a/makefile b/makefile @@ -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