<commit_before># Makefile for building example program from the CARLsim library

# NOTE: if you are compiling your code in a directory different from
# examples/<example_name> or projects/<project_name> then you need to either
# move the configured user.mk file to this directory or set the path to
# where CARLsim can find the user.mk.
USER_MK_PATH = ../../
include $(USER_MK_PATH)user.mk

example := random
output := *.dot *.dat *.log *.csv results/*

# -----------------------------------------------------------------------------
# You should not need to edit the file beyond this point
# -----------------------------------------------------------------------------

# carlsim components
	kernel_dir     = $(CARLSIM_LIB_DIR)/kernel
	interface_dir  = $(CARLSIM_LIB_DIR)/interface
	spike_mon_dir  = $(CARLSIM_LIB_DIR)/spike_monitor
	spike_gen_dir  = $(CARLSIM_LIB_DIR)/spike_generators
# we are compiling from lib
	CARLSIM_FLAGS += -I$(CARLSIM_LIB_DIR)/include/kernel \
									 -I$(CARLSIM_LIB_DIR)/include/interface \
									 -I$(CARLSIM_LIB_DIR)/include/spike_monitor
	CARLSIM_LIBS  += $(CARLSIM_LIB_DIR)/lib/libCARLsim.a

local_src  := main_$(example).cpp
local_prog := $(example)

.PHONY: clean distclean
# compile from CARLsim lib
$(local_prog): $(local_src)
	$(NVCC) $(CARLSIM_INCLUDES) $(CARLSIM_FLAGS) $(CARLSIM_LFLAGS) \
	$(CARLSIM_LIBS) $< -o $@

clean:
	$(RM) $(local_prog)

distclean:
	$(RM) $(local_prog) $(output)<commit_msg>Modified random example Makefile to compile from CARLsim lib correctly.<commit_after># Makefile for building example program from the CARLsim library

# NOTE: if you are compiling your code in a directory different from
# examples/<example_name> or projects/<project_name> then you need to either
# move the configured user.mk file to this directory or set the path to
# where CARLsim can find the user.mk.
USER_MK_PATH = ../../
include $(USER_MK_PATH)user.mk

example := random
output := *.dot *.dat *.log *.csv results/*

# -----------------------------------------------------------------------------
# You should not need to edit the file beyond this point
# -----------------------------------------------------------------------------

# carlsim components
kernel_dir     = $(CARLSIM_LIB_DIR)/kernel
interface_dir  = $(CARLSIM_LIB_DIR)/interface
spike_mon_dir  = $(CARLSIM_LIB_DIR)/spike_monitor
spike_gen_dir  = $(CARLSIM_LIB_DIR)/spike_generators
# we are compiling from lib
CARLSIM_FLAGS += -I$(CARLSIM_LIB_DIR)/include/kernel \
-I$(CARLSIM_LIB_DIR)/include/interface \
-I$(CARLSIM_LIB_DIR)/include/spike_monitor
#CARLSIM_LIBS  += $(CARLSIM_LIB_DIR)/lib/libCARLsim.a
CARLSIM_LIBS  += -L$(CARLSIM_LIB_DIR)/lib -lCARLsim

local_src  := main_$(example).cpp
local_prog := $(example)

.PHONY: clean distclean
# compile from CARLsim lib
$(local_prog): $(local_src)
	$(NVCC) $(CARLSIM_INCLUDES) $(CARLSIM_FLAGS) $(CARLSIM_LFLAGS) \
	$(CARLSIM_LIBS) $< -o $@

clean:
	$(RM) $(local_prog)

distclean:
	$(RM) $(local_prog) $(output)
{'fraction_non_alphanumeric': 0.21229425596237822, 'fraction_numerical': 0.0, 'mean_word_length': 2.89281045751634, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 7, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2725526', 'n_tokens_mistral': 1060, 'n_tokens_neox': 938, 'n_words': 247}