<commit_before>
.SUFFIXES:

ifeq ($(strip $(DEVKITPPC)),)
$(error "Please set DEVKITPPC in your environment. export DEVKITPPC=<path to>devkitPPC")
endif
ifeq ($(strip $(DEVKITPRO)),)
$(error "Please set DEVKITPRO in your environment. export DEVKITPRO=<path to>devkitPRO")
endif

export BUILD	= build

export PATH		:=$(DEVKITPPC)/bin:$(PORTLIBS)/bin:$(PATH)

export PREFIX	= powerpc-eabi-
export CC		= $(PREFIX)gcc
export LD		= $(PREFIX)ld

export SOURCES	= src
export TARGET	= substrate.cosm

export CFLAGS	= -c -fPIC
export LDFLAGS	= -fPIC -shared

export CFILES	= $(foreach dir,$(SOURCES),$(wildcard $(dir)/*.c))
export OFILES	= $(foreach cfl,$(CFILES),$(BUILD)/$(dir $(cfl))$(basename $(notdir $(cfl))).o)

all: setup $(TARGET)

setup:
	@echo Compiling...
	@mkdir -p $(BUILD)/$(SOURCES)

$(TARGET): $(OFILES)
	@echo Linking $(TARGET)...
	@$(LD) $(LDFLAGS) -o $@ $(OFILES)

$(OFILES): $(CFILES)
	@echo Compiling $<...
	@$(CC) $(CFLAGS) -o $@ $<

clean:
	rm -rdf $(BUILD)
	rm -f $(TARGET)
<commit_msg>Change Substrate to a PIE, not a PIC<commit_after>
.SUFFIXES:

ifeq ($(strip $(DEVKITPPC)),)
$(error "Please set DEVKITPPC in your environment. export DEVKITPPC=<path to>devkitPPC")
endif
ifeq ($(strip $(DEVKITPRO)),)
$(error "Please set DEVKITPRO in your environment. export DEVKITPRO=<path to>devkitPRO")
endif

export BUILD	= build

export PATH		:=$(DEVKITPPC)/bin:$(PORTLIBS)/bin:$(PATH)

export PREFIX	= powerpc-eabi-
export CC		= $(PREFIX)gcc
export LD		= $(PREFIX)ld

export SOURCES	= src
export TARGET	= substrate.cosm

export CFLAGS	= -c -fPIE
export LDFLAGS	= -fPIE -shared

export CFILES	= $(foreach dir,$(SOURCES),$(wildcard $(dir)/*.c))
export OFILES	= $(foreach cfl,$(CFILES),$(BUILD)/$(dir $(cfl))$(basename $(notdir $(cfl))).o)

all: setup $(TARGET)

setup:
	@echo Compiling...
	@mkdir -p $(BUILD)/$(SOURCES)

$(TARGET): $(OFILES)
	@echo Linking $(TARGET)...
	@$(LD) $(LDFLAGS) -o $@ $(OFILES)

$(OFILES): $(CFILES)
	@echo Compiling $<...
	@$(CC) $(CFLAGS) -o $@ $<

clean:
	rm -rdf $(BUILD)
	rm -f $(TARGET)

{'fraction_non_alphanumeric': 0.2007893438579181, 'fraction_numerical': 0.0, 'mean_word_length': 4.7942857142857145, 'pattern_counts': {'":': 0, '<': 11, '<?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': '4379026', 'n_tokens_mistral': 871, 'n_tokens_neox': 816, 'n_words': 213}