summaryrefslogtreecommitdiffabout
authorLars Hjemli <hjemli@gmail.com>2009-01-10 14:18:18 (UTC)
committer Lars Hjemli <hjemli@gmail.com>2009-01-10 14:18:18 (UTC)
commitc63aaff2adb83e5015841921fab233c2fe2e3b0a (patch) (unidiff)
treeeeb62508fa174015533a3798f496eaa2ee8e580a
parentf3c99cf1cee25ae95ffea6188b40734e877bce20 (diff)
downloadcgit-c63aaff2adb83e5015841921fab233c2fe2e3b0a.zip
cgit-c63aaff2adb83e5015841921fab233c2fe2e3b0a.tar.gz
cgit-c63aaff2adb83e5015841921fab233c2fe2e3b0a.tar.bz2
Makefile: avoid libcurl when building git
We don't need support for fetching/pushing in libgit.a, hence we don't need to link with libcurl. Noticed-by: Robin Redeker <elmex@ta-sa.org> Signed-off-by: Lars Hjemli <hjemli@gmail.com>
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--Makefile4
1 files changed, 2 insertions, 2 deletions
diff --git a/Makefile b/Makefile
index 2e51c31..a95a622 100644
--- a/Makefile
+++ b/Makefile
@@ -83,70 +83,70 @@ OBJECTS += ui-commit.o
83OBJECTS += ui-diff.o 83OBJECTS += ui-diff.o
84OBJECTS += ui-log.o 84OBJECTS += ui-log.o
85OBJECTS += ui-patch.o 85OBJECTS += ui-patch.o
86OBJECTS += ui-plain.o 86OBJECTS += ui-plain.o
87OBJECTS += ui-refs.o 87OBJECTS += ui-refs.o
88OBJECTS += ui-repolist.o 88OBJECTS += ui-repolist.o
89OBJECTS += ui-shared.o 89OBJECTS += ui-shared.o
90OBJECTS += ui-snapshot.o 90OBJECTS += ui-snapshot.o
91OBJECTS += ui-summary.o 91OBJECTS += ui-summary.o
92OBJECTS += ui-tag.o 92OBJECTS += ui-tag.o
93OBJECTS += ui-tree.o 93OBJECTS += ui-tree.o
94 94
95ifdef NEEDS_LIBICONV 95ifdef NEEDS_LIBICONV
96 EXTLIBS += -liconv 96 EXTLIBS += -liconv
97endif 97endif
98 98
99 99
100.PHONY: all libgit test install uninstall clean force-version get-git 100.PHONY: all libgit test install uninstall clean force-version get-git
101 101
102all: cgit 102all: cgit
103 103
104VERSION: force-version 104VERSION: force-version
105 @./gen-version.sh "$(CGIT_VERSION)" 105 @./gen-version.sh "$(CGIT_VERSION)"
106-include VERSION 106-include VERSION
107 107
108 108
109CFLAGS += -g -Wall -Igit 109CFLAGS += -g -Wall -Igit
110CFLAGS += -DSHA1_HEADER='$(SHA1_HEADER)' 110CFLAGS += -DSHA1_HEADER='$(SHA1_HEADER)'
111CFLAGS += -DCGIT_VERSION='"$(CGIT_VERSION)"' 111CFLAGS += -DCGIT_VERSION='"$(CGIT_VERSION)"'
112CFLAGS += -DCGIT_CONFIG='"$(CGIT_CONFIG)"' 112CFLAGS += -DCGIT_CONFIG='"$(CGIT_CONFIG)"'
113CFLAGS += -DCGIT_SCRIPT_NAME='"$(CGIT_SCRIPT_NAME)"' 113CFLAGS += -DCGIT_SCRIPT_NAME='"$(CGIT_SCRIPT_NAME)"'
114CFLAGS += -DCGIT_CACHE_ROOT='"$(CACHE_ROOT)"' 114CFLAGS += -DCGIT_CACHE_ROOT='"$(CACHE_ROOT)"'
115 115
116ifdef NO_ICONV 116ifdef NO_ICONV
117 CFLAGS += -DNO_ICONV 117 CFLAGS += -DNO_ICONV
118endif 118endif
119ifdef NO_STRCASESTR 119ifdef NO_STRCASESTR
120 CFLAGS += -DNO_STRCASESTR 120 CFLAGS += -DNO_STRCASESTR
121endif 121endif
122 122
123cgit: $(OBJECTS) libgit 123cgit: $(OBJECTS) libgit
124 $(QUIET_CC)$(CC) $(CFLAGS) $(LDFLAGS) -o cgit $(OBJECTS) $(EXTLIBS) 124 $(QUIET_CC)$(CC) $(CFLAGS) $(LDFLAGS) -o cgit $(OBJECTS) $(EXTLIBS)
125 125
126cgit.o: VERSION 126cgit.o: VERSION
127 127
128-include $(OBJECTS:.o=.d) 128-include $(OBJECTS:.o=.d)
129 129
130libgit: 130libgit:
131 $(QUIET_SUBDIR0)git $(QUIET_SUBDIR1) libgit.a 131 $(QUIET_SUBDIR0)git $(QUIET_SUBDIR1) NO_CURL=1 libgit.a
132 $(QUIET_SUBDIR0)git $(QUIET_SUBDIR1) xdiff/lib.a 132 $(QUIET_SUBDIR0)git $(QUIET_SUBDIR1) NO_CURL=1 xdiff/lib.a
133 133
134test: all 134test: all
135 $(QUIET_SUBDIR0)tests $(QUIET_SUBDIR1) all 135 $(QUIET_SUBDIR0)tests $(QUIET_SUBDIR1) all
136 136
137install: all 137install: all
138 mkdir -p $(DESTDIR)$(CGIT_SCRIPT_PATH) 138 mkdir -p $(DESTDIR)$(CGIT_SCRIPT_PATH)
139 install cgit $(DESTDIR)$(CGIT_SCRIPT_PATH)/$(CGIT_SCRIPT_NAME) 139 install cgit $(DESTDIR)$(CGIT_SCRIPT_PATH)/$(CGIT_SCRIPT_NAME)
140 install -m 0644 cgit.css $(DESTDIR)$(CGIT_SCRIPT_PATH)/cgit.css 140 install -m 0644 cgit.css $(DESTDIR)$(CGIT_SCRIPT_PATH)/cgit.css
141 install -m 0644 cgit.png $(DESTDIR)$(CGIT_SCRIPT_PATH)/cgit.png 141 install -m 0644 cgit.png $(DESTDIR)$(CGIT_SCRIPT_PATH)/cgit.png
142 142
143uninstall: 143uninstall:
144 rm -f $(CGIT_SCRIPT_PATH)/$(CGIT_SCRIPT_NAME) 144 rm -f $(CGIT_SCRIPT_PATH)/$(CGIT_SCRIPT_NAME)
145 rm -f $(CGIT_SCRIPT_PATH)/cgit.css 145 rm -f $(CGIT_SCRIPT_PATH)/cgit.css
146 rm -f $(CGIT_SCRIPT_PATH)/cgit.png 146 rm -f $(CGIT_SCRIPT_PATH)/cgit.png
147 147
148clean: 148clean:
149 rm -f cgit VERSION *.o *.d 149 rm -f cgit VERSION *.o *.d
150 150
151get-git: 151get-git:
152 curl $(GIT_URL) | tar -xj && rm -rf git && mv git-$(GIT_VER) git 152 curl $(GIT_URL) | tar -xj && rm -rf git && mv git-$(GIT_VER) git