-
Notifications
You must be signed in to change notification settings - Fork 170
Expand file tree
/
Copy pathMakefile
More file actions
29 lines (20 loc) · 754 Bytes
/
Makefile
File metadata and controls
29 lines (20 loc) · 754 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
include ../this_dir.mk
include ../options.mk
#Define Flags ----------
TENSOR_HEADERS=$(PREFIX)/itensor/core.h
CCFLAGS= -I. $(ITENSOR_INCLUDEFLAGS) $(CPPFLAGS) $(OPTIMIZATIONS)
CCGFLAGS= -I. $(ITENSOR_INCLUDEFLAGS) $(DEBUGFLAGS)
LIBFLAGS=-L$(ITENSOR_LIBDIR) $(ITENSOR_LIBFLAGS)
LIBGFLAGS=-L$(ITENSOR_LIBDIR) $(ITENSOR_LIBGFLAGS)
#Rules ------------------
%.o: %.cc $(ITENSOR_LIBS) $(TENSOR_HEADERS)
$(CCCOM) -c $(CCFLAGS) -o $@ $<
.debug_objs/%.o: %.cc $(ITENSOR_GLIBS) $(TENSOR_HEADERS)
$(CCCOM) -c $(CCGFLAGS) -o $@ $<
#Targets -----------------
upgrademps: upgrademps.o $(ITENSOR_LIBS) $(TENSOR_HEADERS)
$(CCCOM) $(CCFLAGS) upgrademps.o -o upgrademps $(LIBFLAGS)
mkdebugdir:
mkdir -p .debug_objs
clean:
@rm -fr *.o .debug_objs upgrademps