diff options
Diffstat (limited to 'contrib/credential/libsecret')
| -rw-r--r-- | contrib/credential/libsecret/Makefile | 34 |
1 files changed, 19 insertions, 15 deletions
diff --git a/contrib/credential/libsecret/Makefile b/contrib/credential/libsecret/Makefile index 97ce9c92fb..9309cfb78c 100644 --- a/contrib/credential/libsecret/Makefile +++ b/contrib/credential/libsecret/Makefile @@ -1,28 +1,32 @@ # The default target of this Makefile is... -all:: - -MAIN:=git-credential-libsecret -all:: $(MAIN) - -CC = gcc -RM = rm -f -CFLAGS = -g -O2 -Wall -PKG_CONFIG = pkg-config +all:: git-credential-libsecret -include ../../../config.mak.autogen -include ../../../config.mak +prefix ?= /usr/local +gitexecdir ?= $(prefix)/libexec/git-core + +CC ?= gcc +CFLAGS ?= -g -O2 -Wall +PKG_CONFIG ?= pkg-config +INSTALL ?= install +RM ?= rm -f + INCS:=$(shell $(PKG_CONFIG) --cflags libsecret-1 glib-2.0) LIBS:=$(shell $(PKG_CONFIG) --libs libsecret-1 glib-2.0) -SRCS:=$(MAIN).c -OBJS:=$(SRCS:.c=.o) - %.o: %.c $(CC) $(CFLAGS) $(CPPFLAGS) $(INCS) -o $@ -c $< -$(MAIN): $(OBJS) - $(CC) -o $@ $(LDFLAGS) $^ $(LIBS) +git-credential-libsecret: git-credential-libsecret.o + $(CC) $(CFLAGS) -o $@ $^ $(LDFLAGS) $(LIBS) + +install: git-credential-libsecret + $(INSTALL) -d -m 755 $(DESTDIR)$(gitexecdir) + $(INSTALL) -m 755 $< $(DESTDIR)$(gitexecdir) clean: - @$(RM) $(MAIN) $(OBJS) + $(RM) git-credential-libsecret git-credential-libsecret.o + +.PHONY: all install clean |
