LRUCache/Makefile

44 lines
784 B
Makefile
Raw Normal View History

2021-08-23 17:40:34 +00:00
###############################################################################
# Tyler Perkins
# 7-21-21
# Makefile
#
CC = g++
FLAGS = -pipe
CFLAGS = -Wall
CFLAGS += -Ofast
#CFLAGS += -g
CFLAGS += -pg
LIBRARIES =
SRC = $(shell find . -name '*.cpp')
HPP = $(shell find . -name '*.hpp')
OBJ = $(subst .cpp,.o,$(SRC))
BIN = ./bin
TARGET = lrucache-test.out
all : $(BIN)/$(TARGET)
$(BIN)/$(TARGET) : $(OBJ)
@echo LD $(TARGET)
@$(CC) $(FLAGS) $(CFLAGS) -o $(BIN)/$(TARGET) $(OBJ) $(LIBRARIES)
.cpp.o :
@echo CC $<
@$(CC) $(FLAGS) $(CFLAGS) $(LIBRARIES) -c $< -o $@ -D_LRU_DEBUG_
clean :
find . -type f -name '*.o' -delete
rm -rf $(TARGET) performance.prof gmon.out
sanity : $(BIN)/$(TARGET)
$(BIN)/$(TARGET)
profile: sanity
gprof $(BIN)/$(TARGET) > performance.prof