Skip to content

Commit

Permalink
Minor fixes for build system: Remove -u option when creating static l…
Browse files Browse the repository at this point in the history
…ibrary and default settings when selecting an access mode, like accessdaemon should always build the daemon.
  • Loading branch information
TomTheBear committed Jan 2, 2020
1 parent 3126247 commit 6668cec
Show file tree
Hide file tree
Showing 2 changed files with 95 additions and 3 deletions.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
96 changes: 94 additions & 2 deletions make/config_defines.mk
Original file line number Diff line number Diff line change
Expand Up @@ -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.)
Expand Down Expand Up @@ -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.)
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 6668cec

Please sign in to comment.