forked from codeplea/tinyexpr
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathMakefile
More file actions
33 lines (22 loc) · 675 Bytes
/
Makefile
File metadata and controls
33 lines (22 loc) · 675 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
CCFLAGS = -ansi -Wall -Wshadow -O2
LFLAGS = -lm
.PHONY = all clean
all: test test_pr bench example example2 example3
test: test.c tinyexpr.c
$(CC) $(CCFLAGS) -o $@ $^ $(LFLAGS)
./$@
test_pr: test.c tinyexpr.c
$(CC) $(CCFLAGS) -DTE_POW_FROM_RIGHT -DTE_NAT_LOG -o $@ $^ $(LFLAGS)
./$@
bench: benchmark.o tinyexpr.o
$(CC) $(CCFLAGS) -o $@ $^ $(LFLAGS)
example: example.o tinyexpr.o
$(CC) $(CCFLAGS) -o $@ $^ $(LFLAGS)
example2: example2.o tinyexpr.o
$(CC) $(CCFLAGS) -o $@ $^ $(LFLAGS)
example3: example3.o tinyexpr.o
$(CC) $(CCFLAGS) -o $@ $^ $(LFLAGS)
.c.o:
$(CC) -c $(CCFLAGS) $< -o $@
clean:
rm -f *.o *.exe example example2 example3 bench test_pr test