-
Notifications
You must be signed in to change notification settings - Fork 1
/
makefile
81 lines (65 loc) · 1.9 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
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
81
# ###################### raytr ######################
#
# raytr: raytr.o set_main_mirror.o draw_mirror.o get_next_ray.o intersect_main_mirror.o \
# follow_ray_out.o hit_PMT.o reposition_fpoint.o
# g++ -lm -o raytr raytr.o set_main_mirror.o draw_mirror.o get_next_ray.o intersect_main_mirror.o follow_ray_out.o hit_pmt.o reposition_fpoint.o
#
# raytr.o: raytr.c
# cc -c raytr.c
#
# set_main_mirror.o: set_main_mirror.c
# cc -c set_main_mirror.c
#
# draw_mirror.o: draw_mirror.c
# cc -c draw_mirror.c
#
# get_next_ray.o: get_next_ray.c
# cc -c get_next_ray.c
#
# intersect_main_mirror.o: intersect_main_mirror.c
# cc -c intersect_main_mirror.c
#
# follow_ray_out.o: follow_ray_out.c
# cc -c follow_ray_out.c
#
# hit_PMT.o: hit_pmt.c
# cc -c hit_pmt.c
#
# reposition_fpoint.o: reposition_fpoint.c
# cc -c reposition_fpoint.c
CC=g++
CFLAGS=-lm `root-config --cflags --glibs`
EXECUTABLE=raytr
#SOURCES= raytr.c set_main_mirror.c draw_mirror.c get_next_ray.c intersect_main_mirror.c follow_ray_out.c hit_pmt.c reposition_fpoint.c
SOURCES= raytr.c draw_mirror.c set_main_mirror.c get_next_ray.c intersect_main_mirror.c follow_ray_out.c flat_ref_mirror.c hit_pmt.c
OBJECTS = $(SOURCES:.c=.o)
all: $(EXECUTABLE)
raytr: $(OBJECTS)
$(CC) -o raytr $(OBJECTS) $(CFLAGS)
#
#draw_mirror.o: draw_mirror.c
# $(CC) -c $(CFLAGS) draw_mirror.c
#
# raytr.o: raytr.c
# $(CC) -o $@ raytr.c $(CFLAGS)
#
# set_main_mirror.o: set_main_mirror.c
# $(CC) -c $(CFLAGS) set_main_mirror.c
#
#
# get_next_ray.o: get_next_ray.c
# $(CC) -c $(CFLAGS) get_next_ray.c
#
# intersect_main_mirror.o: intersect_main_mirror.c
# $(CC) -c $(CFLAGS) intersect_main_mirror.c
#
# follow_ray_out.o: follow_ray_out.c
# $(CC) -c $(CFLAGS) follow_ray_out.c
#
# hit_PMT.o: hit_pmt.c
# $(CC) -c $(CFLAGS) hit_pmt.c
#
# reposition_fpoint.o: reposition_fpoint.c
# $(CC) -c $(CFLAGS) reposition_fpoint.c
clean:
rm $(EXECUTABLE) *.o