-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
32 lines (24 loc) · 820 Bytes
/
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
CC=gcc
CFLAGS=-Iinclude -fsanitize=address
# CFLAGS=-Iinclude
build/ad_core.o: src/ad_core.c include/ad.h
mkdir -p build
$(CC) -c -o $@ $< $(CFLAGS)
build/ad_operators.o: src/ad_operators.c include/ad.h
mkdir -p build
$(CC) -c -o $@ $< $(CFLAGS)
build/ad_stack.o: src/ad_stack.c include/ad.h
mkdir -p build
$(CC) -c -o $@ $< $(CFLAGS)
build/ad_gradf.o: src/ad_gradf.c include/ad.h
mkdir -p build
$(CC) -c -o $@ $< $(CFLAGS)
examples/basic_usage: examples/basic_usage.c build/ad_core.o build/ad_operators.o build/ad_stack.o build/ad_gradf.o
mkdir -p build
$(CC) -o build/basic_usage $^ $(CFLAGS)
examples/basic_gradf: examples/basic_gradf.c build/ad_core.o build/ad_operators.o build/ad_stack.o build/ad_gradf.o
mkdir -p build
$(CC) -o build/basic_gradf $^ $(CFLAGS)
.PHONY: clean
clean:
rm -rf build