-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
48 lines (36 loc) · 1.29 KB
/
Makefile
File metadata and controls
48 lines (36 loc) · 1.29 KB
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
42
43
44
45
46
47
48
# Please see LICENSE for licensing information.
# --------- FLAGS AND VARIABLES --------------------
# CFLAGS, CC, and AR are exported by the root Makefile
HEADERPATH = -I./
# --------- LIBALLOC BINARIES --------------------
STATIC_1_0 = liballoc_1_0.a
STATIC_1_1 = liballoc_1_0.so
SHARED_1_0 = liballoc_1_1.a
SHARED_1_1 = liballoc_1_1.so
# --------- GENERIC MAKE RULES --------------------
.PHONY: all static shared xyris clean
all: $(STATIC_1_0) $(STATIC_1_1) $(SHARED_1_0) $(SHARED_1_1)
static: $(STATIC_1_0) $(STATIC_1_1)
shared: $(SHARED_1_0) $(SHARED_1_1)
xyris: $(STATIC_1_0)
$(STATIC_1_0): liballoc.c
@printf "$(COLOR_COM)(CC)$(COLOR_NONE)\t$@\n"
@$(CC) $(HEADERPATH) $(CFLAGS) -static -c $<
@printf "$(COLOR_COM)(AR)$(COLOR_NONE)\t$@\n"
@$(AR) -rc $@ *.o
$(SHARED_1_0): liballoc.c
@printf "$(COLOR_COM)(CC)$(COLOR_NONE)\t$@\n"
@$(CC) $(HEADERPATH) $(CFLAGS) -shared $< -o $@
$(STATIC_1_1): liballoc_1_1.c
@printf "$(COLOR_COM)(CC)$(COLOR_NONE)\t$@\n"
@$(CC) $(HEADERPATH) $(CFLAGS) -static -c $<
@printf "$(COLOR_COM)(AR)$(COLOR_NONE)\t$@\n"
@$(AR) -rc $@ *.o
$(SHARED_1_1): liballoc_1_1.c
@printf "$(COLOR_COM)(CC)$(COLOR_NONE)\t$@\n"
@$(CC) $(HEADERPATH) $(CFLAGS) -shared $< -o $@
clean:
@rm -f ./*.o
@rm -f ./*.a
@rm -f ./*.so
@printf "$(COLOR_OK)Cleaned liballoc.$(COLOR_NONE)\n"