diff options
Diffstat (limited to 'Makefile')
-rw-r--r-- | Makefile | 44 |
1 files changed, 35 insertions, 9 deletions
diff --git a/Makefile b/Makefile index f426f98..a52285e 100644 --- a/Makefile +++ b/Makefile | |||
@@ -1,11 +1,33 @@ | |||
1 | CGIT_VERSION = v0.8.1 | 1 | CGIT_VERSION = v0.8.1 |
2 | CGIT_SCRIPT_NAME = cgit.cgi | 2 | CGIT_SCRIPT_NAME = cgit.cgi |
3 | CGIT_SCRIPT_PATH = /var/www/htdocs/cgit | 3 | CGIT_SCRIPT_PATH = /var/www/htdocs/cgit |
4 | CGIT_DATA_PATH = $(CGIT_SCRIPT_PATH) | ||
4 | CGIT_CONFIG = /etc/cgitrc | 5 | CGIT_CONFIG = /etc/cgitrc |
5 | CACHE_ROOT = /var/cache/cgit | 6 | CACHE_ROOT = /var/cache/cgit |
6 | SHA1_HEADER = <openssl/sha.h> | 7 | SHA1_HEADER = <openssl/sha.h> |
7 | GIT_VER = 1.6.0.2 | 8 | GIT_VER = 1.6.1 |
8 | GIT_URL = http://www.kernel.org/pub/software/scm/git/git-$(GIT_VER).tar.bz2 | 9 | GIT_URL = http://www.kernel.org/pub/software/scm/git/git-$(GIT_VER).tar.bz2 |
10 | INSTALL = install | ||
11 | |||
12 | # Define NO_STRCASESTR if you don't have strcasestr. | ||
13 | # | ||
14 | # Define NEEDS_LIBICONV if linking with libc is not enough (eg. Darwin). | ||
15 | # | ||
16 | |||
17 | #-include config.mak | ||
18 | |||
19 | # | ||
20 | # Platform specific tweaks | ||
21 | # | ||
22 | |||
23 | uname_S := $(shell sh -c 'uname -s 2>/dev/null || echo not') | ||
24 | uname_O := $(shell sh -c 'uname -o 2>/dev/null || echo not') | ||
25 | uname_R := $(shell sh -c 'uname -r 2>/dev/null || echo not') | ||
26 | |||
27 | ifeq ($(uname_O),Cygwin) | ||
28 | NO_STRCASESTR = YesPlease | ||
29 | NEEDS_LIBICONV = YesPlease | ||
30 | endif | ||
9 | 31 | ||
10 | # | 32 | # |
11 | # Let the user override the above settings. | 33 | # Let the user override the above settings. |
@@ -97,6 +119,9 @@ CFLAGS += -DCGIT_CACHE_ROOT='"$(CACHE_ROOT)"' | |||
97 | ifdef NO_ICONV | 119 | ifdef NO_ICONV |
98 | CFLAGS += -DNO_ICONV | 120 | CFLAGS += -DNO_ICONV |
99 | endif | 121 | endif |
122 | ifdef NO_STRCASESTR | ||
123 | CFLAGS += -DNO_STRCASESTR | ||
124 | endif | ||
100 | 125 | ||
101 | cgit: $(OBJECTS) libgit | 126 | cgit: $(OBJECTS) libgit |
102 | $(QUIET_CC)$(CC) $(CFLAGS) $(LDFLAGS) -o cgit $(OBJECTS) $(EXTLIBS) | 127 | $(QUIET_CC)$(CC) $(CFLAGS) $(LDFLAGS) -o cgit $(OBJECTS) $(EXTLIBS) |
@@ -106,22 +131,23 @@ cgit.o: VERSION | |||
106 | -include $(OBJECTS:.o=.d) | 131 | -include $(OBJECTS:.o=.d) |
107 | 132 | ||
108 | libgit: | 133 | libgit: |
109 | $(QUIET_SUBDIR0)git $(QUIET_SUBDIR1) libgit.a | 134 | $(QUIET_SUBDIR0)git $(QUIET_SUBDIR1) NO_CURL=1 libgit.a |
110 | $(QUIET_SUBDIR0)git $(QUIET_SUBDIR1) xdiff/lib.a | 135 | $(QUIET_SUBDIR0)git $(QUIET_SUBDIR1) NO_CURL=1 xdiff/lib.a |
111 | 136 | ||
112 | test: all | 137 | test: all |
113 | $(QUIET_SUBDIR0)tests $(QUIET_SUBDIR1) all | 138 | $(QUIET_SUBDIR0)tests $(QUIET_SUBDIR1) all |
114 | 139 | ||
115 | install: all | 140 | install: all |
116 | mkdir -p $(DESTDIR)$(CGIT_SCRIPT_PATH) | 141 | $(INSTALL) -m 0755 -d $(DESTDIR)$(CGIT_SCRIPT_PATH) |
117 | install cgit $(DESTDIR)$(CGIT_SCRIPT_PATH)/$(CGIT_SCRIPT_NAME) | 142 | $(INSTALL) -m 0755 cgit $(DESTDIR)$(CGIT_SCRIPT_PATH)/$(CGIT_SCRIPT_NAME) |
118 | install cgit.css $(DESTDIR)$(CGIT_SCRIPT_PATH)/cgit.css | 143 | $(INSTALL) -m 0755 -d $(DESTDIR)$(CGIT_DATA_PATH) |
119 | install cgit.png $(DESTDIR)$(CGIT_SCRIPT_PATH)/cgit.png | 144 | $(INSTALL) -m 0644 cgit.css $(DESTDIR)$(CGIT_DATA_PATH)/cgit.css |
145 | $(INSTALL) -m 0644 cgit.png $(DESTDIR)$(CGIT_DATA_PATH)/cgit.png | ||
120 | 146 | ||
121 | uninstall: | 147 | uninstall: |
122 | rm -f $(CGIT_SCRIPT_PATH)/$(CGIT_SCRIPT_NAME) | 148 | rm -f $(CGIT_SCRIPT_PATH)/$(CGIT_SCRIPT_NAME) |
123 | rm -f $(CGIT_SCRIPT_PATH)/cgit.css | 149 | rm -f $(CGIT_DATA_PATH)/cgit.css |
124 | rm -f $(CGIT_SCRIPT_PATH)/cgit.png | 150 | rm -f $(CGIT_DATA_PATH)/cgit.png |
125 | 151 | ||
126 | clean: | 152 | clean: |
127 | rm -f cgit VERSION *.o *.d | 153 | rm -f cgit VERSION *.o *.d |