diff options
-rw-r--r-- | Makefile | 3 | ||||
-rw-r--r-- | cgit.mk | 9 |
2 files changed, 11 insertions, 1 deletions
diff --git a/Makefile b/Makefile index ed329e8..42ed230 100644 --- a/Makefile +++ b/Makefile | |||
@@ -68,6 +68,9 @@ all:: cgit | |||
68 | cgit: | 68 | cgit: |
69 | $(QUIET_SUBDIR0)git $(QUIET_SUBDIR1) -f ../cgit.mk ../cgit $(EXTRA_GIT_TARGETS) NO_CURL=1 | 69 | $(QUIET_SUBDIR0)git $(QUIET_SUBDIR1) -f ../cgit.mk ../cgit $(EXTRA_GIT_TARGETS) NO_CURL=1 |
70 | 70 | ||
71 | sparse: | ||
72 | $(QUIET_SUBDIR0)git $(QUIET_SUBDIR1) -f ../cgit.mk NO_CURL=1 cgit-sparse | ||
73 | |||
71 | test: | 74 | test: |
72 | @$(MAKE) --no-print-directory cgit EXTRA_GIT_TARGETS=all | 75 | @$(MAKE) --no-print-directory cgit EXTRA_GIT_TARGETS=all |
73 | $(QUIET_SUBDIR0)tests $(QUIET_SUBDIR1) all | 76 | $(QUIET_SUBDIR0)tests $(QUIET_SUBDIR1) all |
diff --git a/cgit.mk b/cgit.mk index 5048b09..1b50307 100644 --- a/cgit.mk +++ b/cgit.mk | |||
@@ -96,7 +96,7 @@ CGIT_OBJS := $(addprefix $(CGIT_PREFIX),$(CGIT_OBJ_NAMES)) | |||
96 | 96 | ||
97 | # Only cgit.c reference CGIT_VERSION so we only rebuild its objects when the | 97 | # Only cgit.c reference CGIT_VERSION so we only rebuild its objects when the |
98 | # version changes. | 98 | # version changes. |
99 | CGIT_VERSION_OBJS := $(addprefix $(CGIT_PREFIX),cgit.o) | 99 | CGIT_VERSION_OBJS := $(addprefix $(CGIT_PREFIX),cgit.o cgit.sp) |
100 | $(CGIT_VERSION_OBJS): $(CGIT_PREFIX)VERSION | 100 | $(CGIT_VERSION_OBJS): $(CGIT_PREFIX)VERSION |
101 | $(CGIT_VERSION_OBJS): EXTRA_CPPFLAGS = \ | 101 | $(CGIT_VERSION_OBJS): EXTRA_CPPFLAGS = \ |
102 | -DCGIT_VERSION='"$(CGIT_VERSION)"' | 102 | -DCGIT_VERSION='"$(CGIT_VERSION)"' |
@@ -129,3 +129,10 @@ $(CGIT_OBJS): %.o: %.c GIT-CFLAGS $(CGIT_PREFIX)CGIT-CFLAGS $(missing_dep_dirs) | |||
129 | $(CGIT_PREFIX)cgit: $(CGIT_OBJS) GIT-LDFLAGS $(GITLIBS) | 129 | $(CGIT_PREFIX)cgit: $(CGIT_OBJS) GIT-LDFLAGS $(GITLIBS) |
130 | @echo 1>&1 " * $(LUA_MESSAGE)" | 130 | @echo 1>&1 " * $(LUA_MESSAGE)" |
131 | $(QUIET_LINK)$(CC) $(ALL_CFLAGS) -o $@ $(ALL_LDFLAGS) $(filter %.o,$^) $(LIBS) $(CGIT_LIBS) | 131 | $(QUIET_LINK)$(CC) $(ALL_CFLAGS) -o $@ $(ALL_LDFLAGS) $(filter %.o,$^) $(LIBS) $(CGIT_LIBS) |
132 | |||
133 | CGIT_SP_OBJS := $(patsubst %.o,%.sp,$(CGIT_OBJS)) | ||
134 | |||
135 | $(CGIT_SP_OBJS): %.sp: %.c GIT-CFLAGS $(CGIT_PREFIX)CGIT-CFLAGS FORCE | ||
136 | $(QUIET_SP)cgcc -no-compile $(ALL_CFLAGS) $(EXTRA_CPPFLAGS) $(CGIT_CFLAGS) $(SPARSE_FLAGS) $< | ||
137 | |||
138 | cgit-sparse: $(CGIT_SP_OBJS) | ||