-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
24 lines (18 loc) · 710 Bytes
/
Copy pathMakefile
File metadata and controls
24 lines (18 loc) · 710 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
CFLAGS = -O3 -Wall -Wextra -pedantic -D_FORTIFY_SOURCE=2 -ftree-vectorize
all:
$(CC) $(CFLAGS) -c cleanmem_heap_region.c -o cleanmem_heap_region.o
$(CC) $(CFLAGS) -c cleanmem_heap_management.c -o cleanmem_heap_management.o
ar rcs libcleanmem.a cleanmem_heap_management.o cleanmem_heap_region.o
$(CC) $(CFLAGS) -fPIC -c cleanmem_heap_region.c -o cleanmem_heap_region.o
$(CC) $(CFLAGS) -fPIC -c cleanmem_heap_management.c -o cleanmem_heap_management.o
$(CC) $(CFLAGS) -shared cleanmem_heap_region.o cleanmem_heap_management.o -o libcleanmem.so
mkdir -p build
cp libcleanmem.a build
cp libcleanmem.so build
make clean
clean:
rm -rfv *.o
rm -rfv *.so
rm -rfv *.a
distclean: clean
rm -rfv build