forked from UVA-LavaLab/PIMeval-PIMbench
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile.common
33 lines (28 loc) · 869 Bytes
/
Makefile.common
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
# Makefile common settings for sub-modules
# Copyright (c) 2024 University of Virginia
# This file is licensed under the MIT License.
# See the LICENSE file in the root of this repository for more details.
CXX := g++
CXXFLAGS := -std=c++17 -Wall
# Setup libpimeval library
PROJ_ROOT ?= .
LIBPIMEVAL_PATH ?= $(PROJ_ROOT)/libpimeval
INC_DIR := $(LIBPIMEVAL_PATH)/include
LIB_DIR := $(LIBPIMEVAL_PATH)/lib
CXXFLAGS += -I$(INC_DIR) -L$(LIB_DIR) -lpimeval
DEPS := $(INC_DIR)/libpimeval.h $(LIB_DIR)/libpimeval.a
.PHONY: debug perf dramsim3_integ clean
.DEFAULT_GOAL := perf
# Setup build targets
ifeq ($(MAKECMDGOALS),)
MAKECMDGOALS := $(.DEFAULT_GOAL)
endif
ifeq ($(MAKECMDGOALS),debug)
CXXFLAGS += -g -DDEBUG
endif
ifeq ($(MAKECMDGOALS),perf)
CXXFLAGS += -O3 -Wno-unknown-pragmas
endif
ifeq ($(MAKECMDGOALS),dramsim3_integ)
CXXFLAGS += -O3 -DDRAMSIM3_INTEG
endif