<commit_before>MARCH=$(shell uname -m)

# These are all really the same thing here
ifeq ($(MARCH), i686)
MARCH=i386
endif
ifeq ($(MARCH), i586)
MARCH=i386
endif

LOCKFREEDIR=lockfree
LIBLOCKFREE=$(LOCKFREEDIR)/liblockfree-$(MARCH).a

OBJDIR=objs.$(MARCH)

SRC= \
	sync_wastar.cc \
	get_search.cc \
	state.cc \
	search_domain.cc \
	open_list.cc \
	lf_openlist.cc \
	queue_open_list.cc \
	closed_list.cc \
	incons_list.cc \
	lf_closedlist.cc \
	synch_closed_list.cc \
	search.cc \
	astar.cc \
	optimistic.cc \
	awastar.cc \
	arastar.cc \
	multi_a_star.cc \
	breadth_first_search.cc \
	cost_bound_dfs.cc \
	ida_star.cc \
	heuristic.cc \
	h_zero.cc \
	weighted_heuristic.cc \
	projection.cc \
	div_merge_project.cc \
	util/eps.cc \
	util/thread.cc \
	util/completion_counter.cc \
	util/mutex.cc \
	util/timer.cc \
	util/timeout.cc \
	util/atomic_float.cc \
	util/cumulative_ave.cc \
	util/solution_stream.cc \
	util/sync_solution_stream.cc \
	util/serial_solution_stream.cc \
	grid/grid_state.cc \
	grid/grid_world.cc \
	tiles/tiles_state.cc \
	tiles/tiles.cc \
	psdd/nblock.cc \
	psdd/nblock_graph.cc \
	psdd_search.cc \
	wbfpsdd/nblock.cc \
	wbfpsdd/nblock_graph.cc \
	wbfpsdd_search.cc \
	bfpsdd_search.cc \
	idpsdd_search.cc \
	dynamic_bounded_psdd.cc \
	wpbnf/nblock.cc \
	wpbnf/nblock_graph.cc \
	wpbnf_search.cc \
	arpbnf_search.cc \
	arpbnf/nblock.cc \
	arpbnf/nblock_graph.cc \
	opbnf_search.cc \
	opbnf/nblock.cc \
	opbnf/nblock_graph.cc \
	pbnf/nblock.cc \
	pbnf/nblock_graph.cc \
	pbnf_search.cc \
	kbfs.cc \
	pastar.cc \
	lpastar.cc \
	prastar.cc \
	wprastar.cc

OBJ=$(addprefix $(OBJDIR)/, $(SRC:.cc=.o))
OBJ+=$(LIBLOCKFREE)

ifeq ($(MARCH), sparc64)
FLAGS+=-mcpu=v9
OBJ+=$(OBJDIR)/util/sparc64_atomic_asm.o
OBJ+=$(OBJDIR)/util/sparc64_atomic_int.o
else ifeq ($(MARCH), sun4v)
OBJ+=$(OBJDIR)/util/sparc64_atomic_int.o
else ifeq ($(MARCH), i386)
OBJ+=$(OBJDIR)/util/i386_atomic_int.o
OBJ+=$(OBJDIR)/util/cmpxchg_i386.o
else ifeq ($(MARCH), x86_64)
OBJ+=$(OBJDIR)/util/x86_64_atomic_int.o
CXXFLAGS+=-D_64_BIT_LONG
else
$(error Unknown machine type)
endif

############################################################
# Compiler specific flags
ifeq ($(MARCH), sun4v) # Sun compilers
CC=cc
CXX=CC
#DEBUG=-g -xO0   # use the dbx debugger
DEBUG+=-DNDEBUG
FLAGS+=-mt -errwarn=%all $(Debug)
ASFLAGS+=-xc99=%none
CFLAGS+=-xc99=%none
LDFLAGS+=-lpthread -lmtmalloc
else                   # GNU compilers
PROFILE+=
#PROFILE+=-pg
DEBUG+=-O3 -DNDEBUG
#DEBUG+=-g -O0 -fno-default-inline -fno-implicit-inline-templates -fno-implement-inlines
FLAGS+=-Wall -Werror -pipe $(DEBUG) $(PROFILE)
CXXFLAGS+=-Wnon-virtual-dtor
LDFLAGS+=-lpthread $(PROFILE)
#LDFLAGS+=-lpthread $(PROFILE) -ltcmalloc
#LDFLAGS+=-L /home/rai/eaburns/tmp/lib -ljemalloc_mt -lpthread $(PROFILE)
endif
############################################################

#FLAGS+=-DENABLE_IMAGES

CFLAGS+=$(FLAGS)
ASFLAGS+=$(FLAGS)
CXXFLAGS+=$(FLAGS)

# Other progs
# 	thread_tes
# 	atomic_int_test
# 	psdd_nblock_graph_test
# 	pbnf_nblock_graph_test
# 	tiles_hash_test
# 	tiles_read_test
# 	atomic_float_test
# 	pq_test
# 	one_tile_project_test
# 	two_tile_project_test
PROGS=$(addsuffix .$(MARCH), \
	grid_search \
	tiles_search \
	grid_search_sync \
	tiles_search_sync \<commit_msg>Use jemalloc.<commit_after>MARCH=$(shell uname -m)

# These are all really the same thing here
ifeq ($(MARCH), i686)
MARCH=i386
endif
ifeq ($(MARCH), i586)
MARCH=i386
endif

LOCKFREEDIR=lockfree
LIBLOCKFREE=$(LOCKFREEDIR)/liblockfree-$(MARCH).a

OBJDIR=objs.$(MARCH)

SRC= \
	sync_wastar.cc \
	get_search.cc \
	state.cc \
	search_domain.cc \
	open_list.cc \
	lf_openlist.cc \
	queue_open_list.cc \
	closed_list.cc \
	incons_list.cc \
	lf_closedlist.cc \
	synch_closed_list.cc \
	search.cc \
	astar.cc \
	optimistic.cc \
	awastar.cc \
	arastar.cc \
	multi_a_star.cc \
	breadth_first_search.cc \
	cost_bound_dfs.cc \
	ida_star.cc \
	heuristic.cc \
	h_zero.cc \
	weighted_heuristic.cc \
	projection.cc \
	div_merge_project.cc \
	util/eps.cc \
	util/thread.cc \
	util/completion_counter.cc \
	util/mutex.cc \
	util/timer.cc \
	util/timeout.cc \
	util/atomic_float.cc \
	util/cumulative_ave.cc \
	util/solution_stream.cc \
	util/sync_solution_stream.cc \
	util/serial_solution_stream.cc \
	grid/grid_state.cc \
	grid/grid_world.cc \
	tiles/tiles_state.cc \
	tiles/tiles.cc \
	psdd/nblock.cc \
	psdd/nblock_graph.cc \
	psdd_search.cc \
	wbfpsdd/nblock.cc \
	wbfpsdd/nblock_graph.cc \
	wbfpsdd_search.cc \
	bfpsdd_search.cc \
	idpsdd_search.cc \
	dynamic_bounded_psdd.cc \
	wpbnf/nblock.cc \
	wpbnf/nblock_graph.cc \
	wpbnf_search.cc \
	arpbnf_search.cc \
	arpbnf/nblock.cc \
	arpbnf/nblock_graph.cc \
	opbnf_search.cc \
	opbnf/nblock.cc \
	opbnf/nblock_graph.cc \
	pbnf/nblock.cc \
	pbnf/nblock_graph.cc \
	pbnf_search.cc \
	kbfs.cc \
	pastar.cc \
	lpastar.cc \
	prastar.cc \
	wprastar.cc

OBJ=$(addprefix $(OBJDIR)/, $(SRC:.cc=.o))
OBJ+=$(LIBLOCKFREE)

ifeq ($(MARCH), sparc64)
FLAGS+=-mcpu=v9
OBJ+=$(OBJDIR)/util/sparc64_atomic_asm.o
OBJ+=$(OBJDIR)/util/sparc64_atomic_int.o
else ifeq ($(MARCH), sun4v)
OBJ+=$(OBJDIR)/util/sparc64_atomic_int.o
else ifeq ($(MARCH), i386)
OBJ+=$(OBJDIR)/util/i386_atomic_int.o
OBJ+=$(OBJDIR)/util/cmpxchg_i386.o
else ifeq ($(MARCH), x86_64)
OBJ+=$(OBJDIR)/util/x86_64_atomic_int.o
CXXFLAGS+=-D_64_BIT_LONG
else
$(error Unknown machine type)
endif

############################################################
# Compiler specific flags
ifeq ($(MARCH), sun4v) # Sun compilers
CC=cc
CXX=CC
#DEBUG=-g -xO0   # use the dbx debugger
DEBUG+=-DNDEBUG
FLAGS+=-mt -errwarn=%all $(Debug)
ASFLAGS+=-xc99=%none
CFLAGS+=-xc99=%none
LDFLAGS+=-lpthread -lmtmalloc
else                   # GNU compilers
PROFILE+=
#PROFILE+=-pg
DEBUG+=-O3 -DNDEBUG
#DEBUG+=-g -O0 -fno-default-inline -fno-implicit-inline-templates -fno-implement-inlines
FLAGS+=-Wall -Werror -pipe $(DEBUG) $(PROFILE)
CXXFLAGS+=-Wnon-virtual-dtor
#LDFLAGS+=-lpthread $(PROFILE)
#LDFLAGS+=-lpthread $(PROFILE) -ltcmalloc
LDFLAGS+=-L /home/rai/eaburns/tmp/lib -ljemalloc_mt -lpthread $(PROFILE)
endif
############################################################

#FLAGS+=-DENABLE_IMAGES

CFLAGS+=$(FLAGS)
ASFLAGS+=$(FLAGS)
CXXFLAGS+=$(FLAGS)

# Other progs
# 	thread_tes
# 	atomic_int_test
# 	psdd_nblock_graph_test
# 	pbnf_nblock_graph_test
# 	tiles_hash_test
# 	tiles_read_test
# 	atomic_float_test
# 	pq_test
# 	one_tile_project_test
# 	two_tile_project_test
PROGS=$(addsuffix .$(MARCH), \
	grid_search \
	tiles_search \
	grid_search_sync \
	tiles_search_sync \
{'fraction_non_alphanumeric': 0.1779870330348873, 'fraction_numerical': 0.015128125964803951, 'mean_word_length': 4.113654301499605, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, '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': '2072454', 'n_tokens_mistral': 2934, 'n_tokens_neox': 2804, 'n_words': 399}