-
Notifications
You must be signed in to change notification settings - Fork 13
Expand file tree
/
Copy pathMakefile
More file actions
41 lines (31 loc) · 761 Bytes
/
Makefile
File metadata and controls
41 lines (31 loc) · 761 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
37
38
39
40
41
SRCS = hashing.c timefuncs.c ptrhash.c socket.c \
utf8.c ios.c dirpath.c htable.c bitvector.c bitvector-ops.c \
int2str.c dump.c libsupportinit.c arraylist.c
OBJS = $(SRCS:%.c=%.o)
DOBJS = $(SRCS:%.c=%.do)
ifneq ($(MAKECMDGOALS),debug)
XOBJS = $(OBJS)
else
XOBJS = $(DOBJS)
endif
FLAGS = -std=gnu99 -fPIC -Wall -Wno-strict-aliasing $(CFLAGS)
DEBUGFLAGS = -ggdb3 -DDEBUG
SHIPFLAGS = -O3 -DNDEBUG -falign-functions -momit-leaf-frame-pointer
DEBUGFLAGS += $(FLAGS)
SHIPFLAGS += $(FLAGS)
default: release
%.o: %.c
$(CC) $(SHIPFLAGS) -c $< -o $@
%.do: %.c
$(CC) $(DEBUGFLAGS) -c $< -o $@
release debug: libsupport.a
libsupport.a: $(XOBJS)
rm -rf $@
ar -rcs $@ $^
clean:
rm -f *.o
rm -f *.do
rm -f *.a
rm -f *~ *#
rm -f core*
rm -f libsupport.a