<commit_before>HFILES = glob.h choose.h gen.h

CFILES =  gen.c main.c command.c util.c

OBJECTS = gen.o main.o command.o util.o

LIBS = -lm

CC = g++

#PROFILE=-pg
#GDB=-ggdb3
#DEBUG=-DDEBUG
ifndef DEBUG
	OPT=-Ofast -pipe -march=native -mtune=native #-m64
endif

# For some reasons, -static does not work on Mac OS X (MacPorts g++ 4.9) (FIXME)
UNAME := $(shell uname)
STATIC=-static
ifeq ($(UNAME), Darwin)
	STATIC=-static-libgcc -static-libstdc++
endif

WARNS=-Wextra -Wall -Wshadow -Wstrict-aliasing=1 -Werror -pedantic-errors

CFLAGS=-ansi -std=c++11 -fabi-version=6 $(WARNS) $(OPT) $(STATIC) $(GDB) $(DEBUG) $(PROFILE)

EXEC = gen

.PHONY: all default clean mrproper

all: default

default: $(EXEC)

gen:	$(OBJECTS)
	$(CC) $(CFLAGS) $(OBJECTS) $(LIBS) -fwhole-program -o gen

mrproper:<commit_msg>Add linker flags for GCC on FreeBSD.<commit_after>HFILES = glob.h choose.h gen.h

CFILES =  gen.c main.c command.c util.c

OBJECTS = gen.o main.o command.o util.o

LIBS = -lm

UNAME := $(shell uname)
ifeq ($(UNAME), FreeBSD)
	# Fix to use your own version of GCC
	LINKER=-Wl,-rpath=/usr/local/lib/gcc11
endif

CC = g++

#PROFILE=-pg
#GDB=-ggdb3
#DEBUG=-DDEBUG
ifndef DEBUG
	OPT=-Ofast -pipe -march=native -mtune=native #-m64
endif

# For some reasons, -static does not work on Mac OS X (MacPorts g++ 4.9) (FIXME)
STATIC=-static
ifeq ($(UNAME), Darwin)
	STATIC=-static-libgcc -static-libstdc++
endif

WARNS=-Wextra -Wall -Wshadow -Wstrict-aliasing=1 -Werror -pedantic-errors

CFLAGS=-ansi -std=c++11 -fabi-version=6 $(WARNS) $(OPT) $(STATIC) $(GDB) $(DEBUG) $(PROFILE)

EXEC = gen

.PHONY: all default clean mrproper

all: default

default: $(EXEC)

gen:	$(OBJECTS)
	$(CC) $(CFLAGS) $(OBJECTS) $(LINKER) $(LIBS) -fwhole-program -o gen

mrproper:
{'fraction_non_alphanumeric': 0.166189111747851, 'fraction_numerical': 0.011461318051575931, 'mean_word_length': 4.017241379310345, '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': '2024390', 'n_tokens_mistral': 736, 'n_tokens_neox': 710, 'n_words': 199}