diff options
author | John Keeping | 2015-03-08 16:32:15 +0000 |
---|---|---|
committer | Jason A. Donenfeld | 2015-03-09 17:38:22 +0100 |
commit | 5150b7c1e69b4b09821e438006cfd77d82edae3b (patch) | |
tree | 8ee926a5ddbe2e47a0e14ef3957b29201992c0f1 /cgit.mk | |
parent | 97a91657a5032aa984d91344b91e1c5a084c2f0d (diff) | |
download | cgit-5150b7c1e69b4b09821e438006cfd77d82edae3b.tar.gz cgit-5150b7c1e69b4b09821e438006cfd77d82edae3b.tar.bz2 cgit-5150b7c1e69b4b09821e438006cfd77d82edae3b.zip |
Makefile: add a target to run CGit through sparse
Signed-off-by: John Keeping <john@keeping.me.uk>
Diffstat (limited to 'cgit.mk')
-rw-r--r-- | cgit.mk | 9 |
1 files changed, 8 insertions, 1 deletions
@@ -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) | ||