-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathMakefile
46 lines (29 loc) · 1.79 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
# automatically generated makefile by ./scripts/create-make
CFLAGS=-Wall -g -O2 -std=gnu99 -I./include -L./lib
LIBS=-larithmetic
all: test/test-arithmetic-cunit test/test-sqrt-cunit test/test-arithmetic-ruby test/investigate test/test-sqrt-ffff
clean:
rm -f lib/libarithmetic.a lib/sqrt.o lib/arithmetic.o lib/cbrt.o test/test-arithmetic-cunit test/test-sqrt-cunit test/test-arithmetic-ruby test/investigate test/test-sqrt-ffff
lib/sqrt.o: lib/sqrt.c
gcc -c $(CFLAGS) lib/sqrt.c -o lib/sqrt.o
lib/arithmetic.o: lib/arithmetic.c
gcc -c $(CFLAGS) lib/arithmetic.c -o lib/arithmetic.o
lib/cbrt.o: lib/cbrt.c
gcc -c $(CFLAGS) lib/cbrt.c -o lib/cbrt.o
test/test-arithmetic-cunit: test/test-arithmetic-cunit.c lib/libarithmetic.a include/arithmetic.h
gcc $(CFLAGS) test/test-arithmetic-cunit.c $(LIBS) -L/usr/local/lib -lcunit -o test/test-arithmetic-cunit
test/test-sqrt-cunit: test/test-sqrt-cunit.c lib/libarithmetic.a include/arithmetic.h
gcc $(CFLAGS) test/test-sqrt-cunit.c $(LIBS) -L/usr/local/lib -lcunit -o test/test-sqrt-cunit
test/test-arithmetic-ruby: test/test-arithmetic-ruby.c lib/libarithmetic.a include/arithmetic.h
gcc $(CFLAGS) test/test-arithmetic-ruby.c $(LIBS) -L/usr/local/lib -lcunit -o test/test-arithmetic-ruby
test/investigate: test/investigate.c lib/libarithmetic.a include/arithmetic.h
gcc $(CFLAGS) test/investigate.c $(LIBS) -L/usr/local/lib -lcunit -o test/investigate
test/test-sqrt-ffff: test/test-sqrt-ffff.c lib/libarithmetic.a include/arithmetic.h
gcc $(CFLAGS) test/test-sqrt-ffff.c $(LIBS) -L/usr/local/lib -lcunit -o test/test-sqrt-ffff
lib/libarithmetic.a: lib/sqrt.o lib/arithmetic.o lib/cbrt.o
ar crs lib/libarithmetic.a lib/sqrt.o lib/arithmetic.o lib/cbrt.o
test: all
test/test-arithmetic-cunit
test/test-sqrt-cunit
test/test-arithmetic-ruby
test/test-sqrt-ffff