diff --git a/Makefile b/Makefile index 9ede057be..a1f30b9cb 100644 --- a/Makefile +++ b/Makefile @@ -196,7 +196,7 @@ $(L_HELPER): $(STATIC_TARGET_LIB): $(BUILD_DIR) $(PERFMONHEADERS) $(OBJ) $(TARGET_HWLOC_LIB) $(TARGET_LUA_LIB) @echo "===> CREATE STATIC LIB $(TARGET_LIB)" - $(Q)${AR} -crus $(STATIC_TARGET_LIB) $(OBJ) $(TARGET_HWLOC_LIB) $(TARGET_LUA_LIB) + $(Q)${AR} -crs $(STATIC_TARGET_LIB) $(OBJ) $(TARGET_HWLOC_LIB) $(TARGET_LUA_LIB) @sed -e s+'@PREFIX@'+$(INSTALLED_PREFIX)+g make/likwid-config.cmake > likwid-config.cmake $(DYNAMIC_TARGET_LIB): $(BUILD_DIR) $(PERFMONHEADERS) $(OBJ) $(TARGET_HWLOC_LIB) $(TARGET_LUA_LIB) diff --git a/make/config_defines.mk b/make/config_defines.mk index fc3d4c787..ef5cbbbfb 100644 --- a/make/config_defines.mk +++ b/make/config_defines.mk @@ -49,6 +49,71 @@ ifneq ($(strip $(COLOR)),NONE) DEFINES += -DCOLOR=$(COLOR) endif +ifeq ($(strip $(COMPILER)),GCC) + ifeq ($(strip $(ACCESSMODE)),sysdaemon) + $(info Info: Compiling for x86. Changing accessmode to accessdaemon. 'sysdaemon' currently not supported) + ACCESSMODE := accessdaemon + BUILDDAEMON = true + BUILDFREQ = true + endif + ifeq ($(strip $(ACCESSMODE)),accessdaemon) + BUILDDAEMON := true + BUILDFREQ := true + endif + ifeq ($(strip $(ACCESSMODE)),direct) + BUILDDAEMON = false + BUILDFREQ = false + endif + ifeq ($(strip $(ACCESSMODE)),perf_event) + DEFINES += -DLIKWID_USE_PERFEVENT + BUILDDAEMON := false + BUILDFREQ := false + endif +endif +ifeq ($(strip $(COMPILER)),CLANG) + ifeq ($(strip $(ACCESSMODE)),sysdaemon) + $(info Info: Compiling for x86. Changing accessmode to accessdaemon. 'sysdaemon' currently not supported) + ACCESSMODE := accessdaemon + BUILDDAEMON = true + BUILDFREQ = true + endif + ifeq ($(strip $(ACCESSMODE)),accessdaemon) + BUILDDAEMON := true + BUILDFREQ := true + endif + ifeq ($(strip $(ACCESSMODE)),direct) + BUILDDAEMON = false + BUILDFREQ = false + endif + ifeq ($(strip $(ACCESSMODE)),perf_event) + DEFINES += -DLIKWID_USE_PERFEVENT + BUILDDAEMON := false + BUILDFREQ := false + endif +endif +ifeq ($(strip $(COMPILER)),PGI) + ifeq ($(strip $(ACCESSMODE)),sysdaemon) + $(info Info: Compiling for x86. Changing accessmode to accessdaemon. 'sysdaemon' currently not supported) + ACCESSMODE := accessdaemon + BUILDDAEMON = true + BUILDFREQ = true + endif + ifeq ($(strip $(ACCESSMODE)),accessdaemon) + $(info Info: Compiling for x86.) + BUILDDAEMON := true + BUILDFREQ := true + endif + ifeq ($(strip $(ACCESSMODE)),direct) + $(info Info: Compiling for x86.) + BUILDDAEMON = false + BUILDFREQ = false + endif + ifeq ($(strip $(ACCESSMODE)),perf_event) + DEFINES += -DLIKWID_USE_PERFEVENT + BUILDDAEMON := false + BUILDFREQ := false + endif +endif ifeq ($(strip $(COMPILER)),MIC) ifeq ($(strip $(ACCESSMODE)),sysdaemon) $(info Info: Compiling for Xeon Phi. Changing accessmode to direct.) @@ -102,7 +167,34 @@ ifeq ($(strip $(COMPILER)),GCCARMv8) BUILDFREQ := false endif endif - +ifeq ($(strip $(COMPILER)),ARMCLANG) + ifeq ($(strip $(ACCESSMODE)),sysdaemon) + $(info Info: Compiling for ARMv8 architecture. Changing accessmode to perf_event.) + ACCESSMODE := perf_event + DEFINES += -DLIKWID_USE_PERFEVENT + BUILDDAEMON := false + BUILDFREQ := false + endif + ifeq ($(strip $(ACCESSMODE)),accessdaemon) + $(info Info: Compiling for ARMv8 architecture. Changing accessmode to perf_event.) + ACCESSMODE := perf_event + DEFINES += -DLIKWID_USE_PERFEVENT + BUILDDAEMON := false + BUILDFREQ := false + endif + ifeq ($(strip $(ACCESSMODE)),direct) + $(info Info: Compiling for ARMv8 architecture. Changing accessmode to perf_event.) + ACCESSMODE := perf_event + DEFINES += -DLIKWID_USE_PERFEVENT + BUILDDAEMON := false + BUILDFREQ := false + endif + ifeq ($(strip $(ACCESSMODE)),perf_event) + DEFINES += -DLIKWID_USE_PERFEVENT + BUILDDAEMON := false + BUILDFREQ := false + endif +endif ifeq ($(strip $(COMPILER)),GCCARMv7) ifeq ($(strip $(ACCESSMODE)),sysdaemon) $(info Info: Compiling for ARMv7 architecture. Changing accessmode to perf_event.) @@ -160,7 +252,7 @@ ifeq ($(strip $(COMPILER)),GCCPOWER) BUILDFREQ := false endif endif -ifeq ($(strip $(COMPILER)),GCCPOWER) +ifeq ($(strip $(COMPILER)),XLC) ifeq ($(strip $(ACCESSMODE)),sysdaemon) $(info Info: Compiling for IBM POWER. Changing accessmode to perf_event.) ACCESSMODE := perf_event