-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathMakefile
More file actions
39 lines (26 loc) · 795 Bytes
/
Makefile
File metadata and controls
39 lines (26 loc) · 795 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
CC := zig cc
TEST_CC ?= gcc
CFLAGS = -O3 -Wall
LDFLAGS = -lm
.PHONY: all test wasm clean
all: ksynth
main.o : bestline.o miniaudio.o kgnuplot.o
bestline.o : bestline.c
$(CC) -c bestline.c -o bestline.o
miniaudio.o : miniaudio.c
$(CC) -c miniaudio.c -o miniaudio.o
kgnuplot.o : kgnuplot.c
$(CC) -c kgnuplot.c -o kgnuplot.o
STATIC_OBJS = bestline.o miniaudio.o kgnuplot.o
DEPS = ksynth.h
OBJS = ksynth.o main.o
ksynth: $(OBJS)
$(CC) $(CFLAGS) -o $@ $(OBJS) $(STATIC_OBJS) $(LDFLAGS)
test: test_ksynth.c ksynth.c ksynth.h
$(TEST_CC) -O3 -Wall -o test_ksynth test_ksynth.c ksynth.c -lm && ./test_ksynth
wasm: build.sh ksynth.c ks_api.c ksynth.h docs-build.py guide.md readme.md reference.md api.md
./build.sh
%.o: %.c $(DEPS)
$(CC) $(CFLAGS) -c $< -o $@
clean:
rm -f ksynth *.o