File tree Expand file tree Collapse file tree 2 files changed +46
-20
lines changed
Expand file tree Collapse file tree 2 files changed +46
-20
lines changed Original file line number Diff line number Diff line change 11# The default target of this Makefile is...
22all ::
33
4- MAIN: =git-credential-libsecret
5- all :: $(MAIN )
6-
7- CC = gcc
8- RM = rm -f
9- CFLAGS = -g -O2 -Wall
10- PKG_CONFIG = pkg-config
11-
124-include ../../../config.mak.autogen
135-include ../../../config.mak
146
7+ prefix ?= /usr/local
8+ gitexecdir ?= $(prefix ) /libexec/git-core
9+
10+ CC ?= gcc
11+ CFLAGS ?= -g -O2 -Wall
12+ PKG_CONFIG ?= pkg-config
13+ INSTALL ?= install
14+ RM ?= rm -f
15+
16+ MAIN: =git-credential-libsecret
17+ all :: $(MAIN )
18+
1519INCS: =$(shell $(PKG_CONFIG ) --cflags libsecret-1 glib-2.0)
1620LIBS: =$(shell $(PKG_CONFIG ) --libs libsecret-1 glib-2.0)
1721
@@ -22,7 +26,13 @@ OBJS:=$(SRCS:.c=.o)
2226 $(CC ) $(CFLAGS ) $(CPPFLAGS ) $(INCS ) -o $@ -c $<
2327
2428$(MAIN ) : $(OBJS )
25- $(CC ) -o $@ $(LDFLAGS ) $^ $(LIBS )
29+ $(CC ) $(CFLAGS ) -o $@ $^ $(LDFLAGS ) $(LIBS )
30+
31+ install : $(MAIN )
32+ $(INSTALL ) -d -m 755 $(DESTDIR )$(gitexecdir )
33+ $(INSTALL ) -m 755 $< $(DESTDIR )$(gitexecdir )
2634
2735clean :
28- @$(RM ) $(MAIN ) $(OBJS )
36+ $(RM ) $(MAIN ) $(OBJS )
37+
38+ .PHONY : all install clean
Original file line number Diff line number Diff line change 11# The default target of this Makefile is...
2- all :: git-credential-osxkeychain
3-
4- CC = gcc
5- RM = rm -f
6- CFLAGS = -g -O2 -Wall
2+ all ::
73
84-include ../../../config.mak.autogen
95-include ../../../config.mak
106
11- git-credential-osxkeychain : git-credential-osxkeychain.o
12- $(CC ) $(CFLAGS ) -o $@ $< $(LDFLAGS ) \
7+ prefix ?= /usr/local
8+ gitexecdir ?= $(prefix ) /libexec/git-core
9+
10+ CC ?= gcc
11+ CFLAGS ?= -g -O2 -Wall
12+ INSTALL ?= install
13+ RM ?= rm -f
14+
15+ MAIN: =git-credential-osxkeychain
16+ all :: $(MAIN )
17+
18+ SRCS: =$(MAIN ) .c
19+ OBJS:=$(SRCS:.c =.o)
20+
21+ % .o : % .c
22+ $(CC ) $(CFLAGS ) $(CPPFLAGS ) -o $@ -c $<
23+
24+ $(MAIN ) : $(OBJS )
25+ $(CC ) $(CFLAGS ) -o $@ $^ $(LDFLAGS ) \
1326 -framework Security -framework CoreFoundation
1427
15- git-credential-osxkeychain.o : git-credential-osxkeychain.c
16- $(CC ) -c $(CFLAGS ) $<
28+ install : $(MAIN )
29+ $(INSTALL ) -d -m 755 $(DESTDIR )$(gitexecdir )
30+ $(INSTALL ) -m 755 $< $(DESTDIR )$(gitexecdir )
1731
1832clean :
19- $(RM ) git-credential-osxkeychain git-credential-osxkeychain.o
33+ $(RM ) $(MAIN ) $(OBJS )
34+
35+ .PHONY : all install clean
You can’t perform that action at this time.
0 commit comments