File: Makefile

package info (click to toggle)
cloudcompare 2.10.3-4
  • links: PTS
  • area: main
  • in suites: bullseye
  • size: 57,516 kB
  • sloc: cpp: 219,980; ansic: 29,944; makefile: 78; sh: 21
file content (80 lines) | stat: -rw-r--r-- 2,666 bytes parent folder | download | duplicates (7)
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
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
# Randomkit 1.6
# Copyright J.S. Roy (js@jeannot.org), 2003-2006
# See the LICENSE file for copyright information.
# @(#) $Jeannot: Makefile,v 1.19 2006/02/20 18:57:48 js Exp $

# Default target
default: test

# Build the randomkit library
librandomkit.a: rk_mt.o rk_sobol.o rk_primitive.o rk_isaac.o
	$(AR) r librandomkit.a rk_mt.o rk_sobol.o rk_primitive.o  rk_isaac.o

# Test the correctness of the library
randomkit_test: randomkit_test.o librandomkit.a
	$(CC) $(CFLAGS) -o randomkit_test randomkit_test.o -lm -L. -lrandomkit

test: randomkit_test
	$(RUN) ./randomkit_test

# Various examples
# List primitive polynomials
# On Windows, you must add getopt.o
list_primitive: list_primitive.o librandomkit.a
	$(CC) $(CFLAGS) -o list_primitive list_primitive.o -lm -L. -lrandomkit

do_list_primitive: list_primitive
	$(RUN) ./list_primitive 10

# MC estimation of the volume of a ball
randomkit_example: randomkit_example.o librandomkit.a
	$(CC) $(CFLAGS) -o randomkit_example randomkit_example.o -lm \
		-L. -lrandomkit

do_randomkit_example: randomkit_example
	$(RUN) ./randomkit_example

# MC estimation of the volume of a ball using ISAAC
isaac_example: isaac_example.o librandomkit.a
	$(CC) $(CFLAGS) -o isaac_example isaac_example.o -lm \
		-L. -lrandomkit

do_isaac_example: isaac_example
	$(RUN) ./isaac_example

# RQMC estimation of the volume of a ball
sobol_example: sobol_example.o librandomkit.a
	$(CC) $(CFLAGS) -o sobol_example sobol_example.o -lm -L. -lrandomkit

do_sobol_example: sobol_example
	$(RUN) ./sobol_example

# Compile all examples
examples: list_primitive randomkit_example sobol_example isaac_example

# Execute all examples
do_examples: do_list_primitive do_randomkit_example do_sobol_example \
	do_isaac_example

# Utilities
clean:
	rm -f *.o librandomkit.a randomkit_test sobol_example \
	randomkit_example list_primitive isaac_example

depend:
	makedepend -Y rk_mt.c rk_sobol.c rk_primitive.c rk_isaac.c \
		randomkit_test.c list_primitive.c \
		randomkit_example.c sobol_example.c isaac_example.c 2> /dev/null

# Header files dependencies generated by makedepend
# DO NOT DELETE

rk_mt.o: randomkit.h rk_mt.h rk_sobol.h rk_primitive.h rk_isaac.h
rk_sobol.o: rk_sobol.h rk_mt.h rk_primitive.h
rk_primitive.o: rk_primitive.h
rk_isaac.o: rk_isaac.h rk_mt.h
randomkit_test.o: randomkit.h rk_mt.h rk_sobol.h rk_primitive.h rk_isaac.h
list_primitive.o: randomkit.h rk_mt.h rk_sobol.h rk_primitive.h rk_isaac.h
randomkit_example.o: randomkit.h rk_mt.h rk_sobol.h rk_primitive.h rk_isaac.h
sobol_example.o: randomkit.h rk_mt.h rk_sobol.h rk_primitive.h rk_isaac.h
isaac_example.o: randomkit.h rk_mt.h rk_sobol.h rk_primitive.h rk_isaac.h