forked from blanham/liballoc
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
54 lines (37 loc) · 1.18 KB
/
Makefile
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
49
50
51
# Please see LICENSE for licensing information.
# --------- FLAGS AND VARIABLES --------------------
CFLAGS=-O2 -nostdlib -nodefaultlibs -fno-builtin -fPIC -Wall
HEADERPATH=-I./
# --------- GENERIC MAKE RULES --------------------
all:
@echo "Makefile for the liballoc library."
@echo "Please see LICENSE for licensing information."
@echo
@echo "Output should be: liballoc.a "
@echo " liballoc.so"
@echo
@echo "Usage: make [ compile | clean | <platform> ] "
@echo
@echo "Currently supported platforms:"
@echo
@echo " linux"
@echo " linux_debug"
@echo
@echo
@echo "Please see the README for example usage"
clean:
rm -f ./*.o
rm -f ./*.a
rm -f ./*.so
compile:
gcc $(HEADERPATH) $(CFLAGS) -static -c liballoc.c
ar -rcv liballoc.a *.o
gcc $(HEADERPATH) $(CFLAGS) -shared liballoc.c -o liballoc.so
linux:
gcc $(HEADERPATH) $(CFLAGS) -static -c liballoc.c linux.c
ar -rcv liballoc.a *.o
gcc $(HEADERPATH) $(CFLAGS) -shared liballoc.c linux.c -o liballoc.so
linux_debug:
gcc -DDEBUG $(HEADERPATH) $(CFLAGS) -static -c liballoc.c linux.c
ar -rcv liballoc.a *.o
gcc -DDEBUG $(HEADERPATH) $(CFLAGS) -shared liballoc.c linux.c -o liballoc.so