Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Putting in Makefile #2

Open
wants to merge 17 commits into
base: cmake-build-system
Choose a base branch
from
13 changes: 13 additions & 0 deletions common/kernel-filter/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
CXX=g++
CXXFLAGS=-O3 -std=c++11 -g
SHARED_CXXFLAGS=-shared -fPIC

all: kp_kernel_filter.so

MAKEFILE_PATH := $(subst Makefile,,$(abspath $(lastword $(MAKEFILE_LIST))))

kp_kernel_filter.so: ${MAKEFILE_PATH}kp_kernel_filter.cpp
$(CXX) $(SHARED_CXXFLAGS) $(CXXFLAGS) -o $@ ${MAKEFILE_PATH}kp_kernel_filter.cpp

clean:
rm *.so
13 changes: 13 additions & 0 deletions debugging/kernel-logger/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
CXX=g++
CXXFLAGS=-O3 -std=c++11 -g
SHARED_CXXFLAGS=-shared -fPIC

all: kp_kernel_logger.so

MAKEFILE_PATH := $(subst Makefile,,$(abspath $(lastword $(MAKEFILE_LIST))))

kp_kernel_logger.so: ${MAKEFILE_PATH}kp_kernel_logger.cpp
$(CXX) $(SHARED_CXXFLAGS) $(CXXFLAGS) -o $@ ${MAKEFILE_PATH}kp_kernel_logger.cpp

clean:
rm *.so
15 changes: 15 additions & 0 deletions profiling/chrome-tracing/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
CXX=mpicxx
CFLAGS=-shared -O3 -g -fPIC -std=c++11 -Wall -Wextra

#Turn MPI support off:
#CFLAGS += -DUSE_MPI=0

MAKEFILE_PATH := $(subst Makefile,,$(abspath $(lastword $(MAKEFILE_LIST))))

CXXFLAGS+=-I${MAKEFILE_PATH}

kp_chrome_tracing.so: ${MAKEFILE_PATH}kp_chrome_tracing.cpp
$(CXX) $(CFLAGS) -o $@ $<

clean:
rm *.so
15 changes: 15 additions & 0 deletions profiling/memory-events/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
CXX=g++
CXXFLAGS=-O3 -std=c++11 -g
SHARED_CXXFLAGS=-shared -fPIC

all: kp_memory_events.so

MAKEFILE_PATH := $(subst Makefile,,$(abspath $(lastword $(MAKEFILE_LIST))))

CXXFLAGS+=-I${MAKEFILE_PATH}

kp_memory_events.so: ${MAKEFILE_PATH}kp_memory_events.cpp ${MAKEFILE_PATH}kp_memory_events.hpp ${MAKEFILE_PATH}kp_timer.hpp
$(CXX) $(SHARED_CXXFLAGS) $(CXXFLAGS) -o $@ ${MAKEFILE_PATH}kp_memory_events.cpp

clean:
rm *.so
12 changes: 12 additions & 0 deletions profiling/memory-hwm-mpi/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
CXX = mpicxx
CXXFLAGS = -shared -O3 -fPIC -std=c++11

MAKEFILE_PATH := $(subst Makefile,,$(abspath $(lastword $(MAKEFILE_LIST))))

CXXFLAGS+=-I${MAKEFILE_PATH}

kp_hwm_mpi.so: ${MAKEFILE_PATH}kp_hwm_mpi.cpp
$(CXX) $(CXXFLAGS) -o $@ $<

clean:
rm *.so
14 changes: 14 additions & 0 deletions profiling/memory-hwm/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@


CXX=g++
CFLAGS=-shared -O3 -fPIC -std=c++11

MAKEFILE_PATH := $(subst Makefile,,$(abspath $(lastword $(MAKEFILE_LIST))))

CXXFLAGS+=-I${MAKEFILE_PATH}

kp_hwm.so: ${MAKEFILE_PATH}kp_hwm.cpp
$(CXX) $(CFLAGS) -o $@ $<

clean:
rm *.so
1 change: 1 addition & 0 deletions profiling/memory-usage/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@

18 changes: 18 additions & 0 deletions profiling/nvprof-connector/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
CXX=g++
CXXFLAGS=-O3 -std=c++11 -g -I$(CUDA_ROOT)/include
LDFLAGS=-L$(CUDA_ROOT)/lib64
LIBS=-lnvToolsExt
SHARED_CXXFLAGS=-shared -fPIC

all: kp_nvprof_connector.so

MAKEFILE_PATH := $(subst Makefile,,$(abspath $(lastword $(MAKEFILE_LIST))))

CXXFLAGS+=-I${MAKEFILE_PATH}

kp_nvprof_connector.so: ${MAKEFILE_PATH}kp_nvprof_connector.cpp
$(CXX) $(SHARED_CXXFLAGS) $(CXXFLAGS) $(LDFLAGS) \
-o $@ ${MAKEFILE_PATH}kp_nvprof_connector.cpp $(LIBS)

clean:
rm *.so
18 changes: 18 additions & 0 deletions profiling/papi-connector/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
CXX=g++
CXXFLAGS=-O3 -std=c++11 -g -I$(PAPI_ROOT)/include
LDFLAGS=-L$(PAPI_ROOT)/lib
LIBS=-lpapi
SHARED_CXXFLAGS=-shared -fPIC

all: kp_papi_connector.so

MAKEFILE_PATH := $(subst Makefile,,$(abspath $(lastword $(MAKEFILE_LIST))))

CXXFLAGS+=-I${MAKEFILE_PATH}

kp_papi_connector.so: ${MAKEFILE_PATH}kp_papi_connector.cpp
$(CXX) $(SHARED_CXXFLAGS) $(CXXFLAGS) $(LDFLAGS) \
-o $@ ${MAKEFILE_PATH}kp_papi_connector.cpp $(LIBS)

clean:
rm *.so
21 changes: 21 additions & 0 deletions profiling/simple-kernel-timer/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
CXX=g++
CXXFLAGS=-O3 -std=c++11 -g
SHARED_CXXFLAGS=-shared -fPIC

all: kp_kernel_timer.so kp_reader kp_json_writer

MAKEFILE_PATH := $(subst Makefile,,$(abspath $(lastword $(MAKEFILE_LIST))))

CXXFLAGS+=-I${MAKEFILE_PATH}

kp_reader: ${MAKEFILE_PATH}kp_reader.cpp kp_kernel_timer.so
$(CXX) $(CXXFLAGS) -o kp_reader ${MAKEFILE_PATH}kp_reader.cpp

kp_json_writer: ${MAKEFILE_PATH}kp_json_writer.cpp kp_kernel_timer.so
$(CXX) $(CXXFLAGS) -o kp_json_writer ${MAKEFILE_PATH}kp_json_writer.cpp

kp_kernel_timer.so: ${MAKEFILE_PATH}kp_kernel_timer.cpp ${MAKEFILE_PATH}kp_kernel_info.h
$(CXX) $(SHARED_CXXFLAGS) $(CXXFLAGS) -o $@ ${MAKEFILE_PATH}kp_kernel_timer.cpp

clean:
rm *.so kp_reader
15 changes: 15 additions & 0 deletions profiling/space-time-stack/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
CXX=mpicxx
CFLAGS=-shared -O3 -g -fPIC -std=c++11 -Wall -Wextra

#Turn MPI support off:
#CFLAGS += -DUSE_MPI=0

MAKEFILE_PATH := $(subst Makefile,,$(abspath $(lastword $(MAKEFILE_LIST))))

CXXFLAGS+=-I${MAKEFILE_PATH}

kp_space_time_stack.so: ${MAKEFILE_PATH}kp_space_time_stack.cpp
$(CXX) $(CFLAGS) -o $@ $<

clean:
rm *.so
22 changes: 22 additions & 0 deletions profiling/systemtap-connector/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
CXX=g++
CXXFLAGS=-O3 -std=c++11 -g
SHARED_CXXFLAGS=-shared -fPIC

MAKEFILE_PATH := $(subst Makefile,,$(abspath $(lastword $(MAKEFILE_LIST))))

all: kp_systemtap_connector.so

${MAKEFILE_PATH}probes.h: ${MAKEFILE_PATH}probes.d
dtrace -C -h -s $< -o $@

probes.o: ${MAKEFILE_PATH}probes.d
dtrace -C -G -s $< -o $@

CXXFLAGS+=-I${MAKEFILE_PATH}

kp_systemtap_connector.so: ${MAKEFILE_PATH}kp_systemtap_connector.cpp ${MAKEFILE_PATH}probes.h probes.o
$(CXX) $(SHARED_CXXFLAGS) $(CXXFLAGS) $(LDFLAGS) probes.o \
-o $@ ${MAKEFILE_PATH}kp_systemtap_connector.cpp $(LIBS)

clean:
rm -rf *.so probes.h probes.o
27 changes: 27 additions & 0 deletions profiling/variorum-connector/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
# Author: Zachary S. Frye
#Organization: CASC at LLNL
#Date: July 2020
#Description: This is a simple makefile for testing and developing the Kokkos-variorum connector


#Variorum stuff
VAR_LIB=-L$(VARIORUM_ROOT)/lib
VAR_INC=-I$(VARIORUM_ROOT)/include
LINK_FLAG=-lvariorum

CXX=mpicxx
CXXFLAGS=-O3 -std=c++11 -g
SHARED_CXXFLAGS=-shared -fPIC
CFLAGS=-std=c++11 -Wall -g
all: variorum_connector.so



MAKEFILE_PATH := $(subst Makefile,,$(abspath $(lastword $(MAKEFILE_LIST))))

variorum_connector.so: ${MAKEFILE_PATH}variorum-connector.cpp
$(CXX) $(SHARED_CXXFLAGS) $(CXXFLAGS) $(VAR_LIB) $(VAR_INC) -o $@ ${MAKEFILE_PATH}variorum-connector.cpp $(LINK_FLAG)


clean:
rm *.so
18 changes: 18 additions & 0 deletions profiling/vtune-connector/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
CXX=icpc
CXXFLAGS=-O3 -std=c++11 -g -I$(VTUNE_HOME)/include
LDFLAGS=-L$(VTUNE_HOME)/lib64
LIBS=-littnotify
SHARED_CXXFLAGS=-shared -fPIC

all: kp_vtune_connector.so

MAKEFILE_PATH := $(subst Makefile,,$(abspath $(lastword $(MAKEFILE_LIST))))

CXXFLAGS+=-I${MAKEFILE_PATH}

kp_vtune_connector.so: ${MAKEFILE_PATH}kp_vtune_connector.cpp ${MAKEFILE_PATH}kp_vtune_connector_domain.h
$(CXX) $(SHARED_CXXFLAGS) $(CXXFLAGS) $(LDFLAGS) \
-o $@ ${MAKEFILE_PATH}kp_vtune_connector.cpp $(LIBS)

clean:
rm *.so
18 changes: 18 additions & 0 deletions profiling/vtune-focused-connector/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
CXX=icpc
CXXFLAGS=-O3 -std=c++11 -g -I$(VTUNE_HOME)/include
LDFLAGS=-L$(VTUNE_HOME)/lib64
LIBS=-littnotify
SHARED_CXXFLAGS=-shared -fPIC

all: kp_vtune_focused_connector.so

MAKEFILE_PATH := $(subst Makefile,,$(abspath $(lastword $(MAKEFILE_LIST))))

CXXFLAGS+=-I${MAKEFILE_PATH}

kp_vtune_focused_connector.so: ${MAKEFILE_PATH}kp_vtune_focused_connector.cpp ${MAKEFILE_PATH}kp_vtune_focused_connector_domain.h
$(CXX) $(SHARED_CXXFLAGS) $(CXXFLAGS) $(LDFLAGS) \
-o $@ ${MAKEFILE_PATH}kp_vtune_focused_connector.cpp $(LIBS)

clean:
rm *.so