-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
51 lines (43 loc) · 1.36 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
# GNU Makefile
#
.SUFFIXES: .o .f90
FC=gfortran
CC=gcc
#FCFLAGS= -Ofast -march=native -funsafe-math-optimizations
#FCFLAGS= -O3
#FCFLAGS= -O -g -fbounds-check -Wuninitialized -Wsurprising -Wall -Wextra
FCFLAGS= -fcheck=all -ffpe-trap=invalid,zero,overflow -g -Wall -Wextra -Werror #-pedantic
#FCFLAGS += -I/usr/include
FOMP= #-fopenmp
PROGRAM = view
## "make" builds all
#all: $(PROGRAM)
# list all source files
OBJ = kbhit.o quaternion.o fcurses.o fbMod2.o lineParse.o heapSort.o shareMods.o renderMod.o scriptMod.o ArgsMod.o view.o
# General rule for building prog from prog.o; $^ (GNU extension) is
# used in order to list additional object files on which the
# executable depends
${PROGRAM}:${OBJ}
$(FC) -o ${PROGRAM} ${FOMP} ${OBJ} ${FCFLAGS}
# to clean up stuff
clean:
rm -f *.o *.mod *.MOD
veryclean: clean
rm -f *~ $(PROGRAMS)
# General rules for building prog.o from prog.f90 or prog.F90; $< is
# used in order to list only the first prerequisite (the source file)
# and not the additional prerequisites such as module or include files
kbhit.o: ../fcurses/kbhit.c
$(CC) -c $<
#view.o:view.f90
# $(FC) $(FCFLAGS) $(FOMP) -c view.f90
%.o: quaternion/%.f90
$(FC) $(FCFLAGS) -c $<
%.o: ../fcurses/%.f90
$(FC) $(FCFLAGS) -c $<
%.o: ../fbMod/%.f90
$(FC) $(FCFLAGS) -c $<
lineParse.o: ../stringParseMods/lineParse.f90
$(FC) $(FCFLAGS) -c $<
%.o: %.f90
$(FC) $(FCFLAGS) -c $<