-
Notifications
You must be signed in to change notification settings - Fork 12
Expand file tree
/
Copy pathMakefile
More file actions
36 lines (25 loc) · 736 Bytes
/
Makefile
File metadata and controls
36 lines (25 loc) · 736 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
LD=$(CC)
all: crap-clone
%: %.o
$(LD) $(LDFLAGS) -o $@ $+ $($*_LIBS)
%: %.c
crap-clone: libcrap.a
crap-clone_LIBS=-lpipeline -lz -lm
libcrap.a: branch.o changeset.o cvs_connection.o database.o emission.o file.o \
filter.o fixup.o heap.o log.o log_parse.o string_cache.o utils.o
ar crv $@ $+
# For old versions of gcc, you might need to add -std=c99 -fms-extensions.
# or " -Wno-pointer-arith -fms-extensions -pedantic -Wno-format "
CFLAGS=-O2 -std=c99 -Wall -Wextra -Werror -D_GNU_SOURCE -g3 \
-MMD -MP -MF.deps/$(subst /,:,$@).d
CC=gcc
%.o: %.c
@mkdir -p .deps
$(COMPILE.c) -o $@ -c $<
%.s: %.c
@mkdir -p .deps
$(COMPILE.c:-g3=) -o $@ -S $<
.PHONY: all clean
clean:
rm -f *.a *.o core.* vgcore.*
-include .deps/*.d