-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmakefile
37 lines (27 loc) · 786 Bytes
/
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
CC = gcc
LD = gcc
#CFLAGS = -Wall -Ofast -fopt-info-vec
#CFLAGS = -Wall -O3 -march=native -fopt-info-vec
CFLAGS = -Wall -Ofast -march=haswell -ffast-math -fopt-info-vec -g
LIBS = -L/opt/X11/lib -lX11 -lm
RM = /bin/rm -f
OBJ1 = graphics.o V1.o
OBJ2 = graphics.o V2.o
OBJ3 = graphics.o V3.o
EXEC = galsim
V1: $(OBJ1)
$(LD) $(LDFLAGS) $(OBJ1) $(LIBS) -o $(EXEC)
V2: $(OBJ2)
$(LD) $(LDFLAGS) $(OBJ2) $(LIBS) -o $(EXEC)
V3: $(OBJ3)
$(LD) $(LDFLAGS) $(OBJ3) $(LIBS) -o $(EXEC)
graphics.o: graphics.c graphics.h
$(CC) $(CFLAGS) $(INCLUDES) -c graphics.c
V1.o: V1.c graphics.h
$(CC) $(CFLAGS) $(INCLUDES) -c V1.c
V2.o: V2.c graphics.h
$(CC) $(CFLAGS) $(INCLUDES) -c V2.c
V3.o: V3.c graphics.h
$(CC) $(CFLAGS) $(INCLUDES) -c V3.c
clean:
$(RM) $(EXEC) $(OBJ1) $(OBJ2) $(OBJ3)