<commit_before>BASE_IVERILOG_DIR=/Users/ti27457/Repos/nemo/iverilog
EXEC_DIR=/Users/ti27457/Repos/nemo/iverilog/lib/ivl

INSTALL = /usr/bin/install -c
INSTALL_PROGRAM = ${INSTALL}
INSTALL_DATA = ${INSTALL} -m 644

IDIR=../iverilog
CC=g++
CFLAGS=-I$(IDIR) -fpic -std=gnu++0x
# -Wall -Wextra -Wshadow -g -O2
LIBS=-lprotobuf
TGT=nemo
SRCS=$(wildcard *.cc)
OBJS=$(SRCS:.cc=.o)
# DEPS=ttb.h ttb_signal.h ttb_dot_file.h ivl_target.h

# TOP_MODULE=up_counter
# TOP_MODULE=test
TOP_MODULE=orpsoc_top

# DOT=up_counter
# DOT=test
DOT=orpsoc_top.express_100MHz.debug

# NETLIST=../up_counter.nl.v ../std_cell_defs.vm
# NETLIST=../test.v
NETLIST=../orpsoc_top.express_100MHz.nl.v ../std_cell_defs.vm


all: $(TGT) confs install

$(TGT): $(OBJS)
	$(CC) -undefined suppress -flat_namespace $(CFLAGS) $(LIBS) -o $@.tgt $^ 
 
%.o: %.cc
	$(CC) $(CFLAGS) -c -o $@ $<

confs: ./generate_tgt_confs
	./generate_tgt_confs $(TGT)

.PHONY: install uninstall run clean 

install:
	$(INSTALL_PROGRAM) ./$(TGT).tgt "$(EXEC_DIR)/$(TGT).tgt"
	$(INSTALL_DATA) $(TGT).conf "$(EXEC_DIR)/$(TGT).conf"
	$(INSTALL_DATA) $(TGT)-s.conf "$(EXEC_DIR)/$(TGT)-s.conf"

uninstall:
	rm -f $(EXEC_DIR)/$(TGT).tgt
	rm -f $(EXEC_DIR)/$(TGT).conf
	rm -f $(EXEC_DIR)/$(TGT)-s.conf

run:
	../iverilog/bin/iverilog -v -gspecify -t nemo -s $(TOP_MODULE) -o $(DOT).dot $(NETLIST)
	dot $(DOT).dot -Tpdf -o $(DOT).pdf

runsave:
	../iverilog/bin/iverilog -v -gspecify -t nemo -s $(TOP_MODULE) -o $(DOT).dot $(NETLIST) > output.txt
	dot $(DOT).dot -Tpdf -o $(DOT).pdf

clean:
	rm -f *.o
	rm -f *.tgt
	rm -f *.conf<commit_msg>fixed bug so target can compile on linux<commit_after>BASE_IVERILOG_DIR=/Users/ti27457/Repos/nemo/iverilog
EXEC_DIR=/Users/ti27457/Repos/nemo/iverilog/lib/ivl

INSTALL = /usr/bin/install -c
INSTALL_PROGRAM = ${INSTALL}
INSTALL_DATA = ${INSTALL} -m 644

IDIR=../iverilog
CC=g++
CFLAGS=-I$(IDIR) -fpic -std=gnu++0x
# -Wall -Wextra -Wshadow -g -O2
LIBS=-lprotobuf
TGT=nemo
SRCS=$(wildcard *.cc)
OBJS=$(SRCS:.cc=.o)
# DEPS=ttb.h ttb_signal.h ttb_dot_file.h ivl_target.h

# TOP_MODULE=up_counter
# TOP_MODULE=test
TOP_MODULE=orpsoc_top

# DOT=up_counter
# DOT=test
DOT=orpsoc_top.express_100MHz.debug

# NETLIST=../up_counter.nl.v ../std_cell_defs.vm
# NETLIST=../test.v
NETLIST=../orpsoc_top.express_100MHz.nl.v ../std_cell_defs.vm


all: $(TGT) confs install

$(TGT): $(OBJS)
	$(CC) -flat_namespace $(CFLAGS) $(LIBS) -o $@.tgt $^ 
 
%.o: %.cc
	$(CC) $(CFLAGS) -c -o $@ $<

confs: ./generate_tgt_confs
	./generate_tgt_confs $(TGT)

.PHONY: install uninstall run clean 

install:
	$(INSTALL_PROGRAM) ./$(TGT).tgt "$(EXEC_DIR)/$(TGT).tgt"
	$(INSTALL_DATA) $(TGT).conf "$(EXEC_DIR)/$(TGT).conf"
	$(INSTALL_DATA) $(TGT)-s.conf "$(EXEC_DIR)/$(TGT)-s.conf"

uninstall:
	rm -f $(EXEC_DIR)/$(TGT).tgt
	rm -f $(EXEC_DIR)/$(TGT).conf
	rm -f $(EXEC_DIR)/$(TGT)-s.conf

run:
	../iverilog/bin/iverilog -v -gspecify -t nemo -s $(TOP_MODULE) -o $(DOT).dot $(NETLIST)
	dot $(DOT).dot -Tpdf -o $(DOT).pdf

runsave:
	../iverilog/bin/iverilog -v -gspecify -t nemo -s $(TOP_MODULE) -o $(DOT).dot $(NETLIST) > output.txt
	dot $(DOT).dot -Tpdf -o $(DOT).pdf

clean:
	rm -f *.o
	rm -f *.tgt
	rm -f *.conf
{'fraction_non_alphanumeric': 0.21004130918334923, 'fraction_numerical': 0.01334604385128694, 'mean_word_length': 3.9419152276295133, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, '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': '3578130', 'n_tokens_mistral': 1516, 'n_tokens_neox': 1432, 'n_words': 270}