-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
32 lines (26 loc) · 768 Bytes
/
Makefile
File metadata and controls
32 lines (26 loc) · 768 Bytes
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
CC = mpic++
LIB = -L /usr/local/lib/
#========Edit these for optimisation, debug options etc===============
CFLAGS = -O0 -c -I ./ -I /usr/local/include -std=c++11 -pedantic
CFLAGS += -g
CFLAGS += -DRUN_TESTS_AND_EXIT
DEBUG = -g -W -Wall -pedantic -D_GLIBCXX_DEBUG -Wextra
#DEBUG+= -Wno-sign-compare
#DEBUG+= -Wno-unused-parameter
#Comment/uncomment these to hide specific errors...
PROFILE = -g
LFLAGS = -g
DUMMYDIR = dummydeps
main : main.o
$(CC) $(LFLAGS) main.o $(LIB) -o main
main.o: tests.h
%.o:%.cpp
$(CC) $(CFLAGS) $< -o $@
.PHONY: preprocess clean
preprocess :
#$(CC) -M main.cpp -o deps.out
./touch_deps $(DUMMYDIR) main.cpp tests.h
$(CC) $(CFLAGS) -I $(DUMMYDIR) -E -nostdinc main.cpp -o pp.out
./clean_deps $(DUMMYDIR)
clean :
rm main.o main