<commit_before>CC=gcc
# CC=arm-frc-linux-gnueabi-gcc  # RoboRIO

TARGET=pathfinder

C=src
HEAD=include

CFLAGS=-shared -I$(HEAD) -g -lm
LDFLAGS=-shared

SRCS=$(C)/fit/hermite.c $(C)/mathutil.c $(C)/spline.c $(C)/trajectory.c $(C)/generator.c $(C)/modifiers/tank.c $(C)/modifiers/swerve.c
OBJS=$(SRCS:.c=.o)

ifeq ($(OS),Windows_NT)
    EXTTXT := dll
else
    EXTTXT := so
    PRETXT := lib
endif

ifeq ($(OS),Darwin)
    EXTTXT := dylib
endif

TARGET_NAME=$(PRETXT)$(TARGET).$(EXTTXT)

-include $(OBJS:.o=.d)

all: $(TARGET_NAME)

$(TARGET_NAME): $(OBJS)
	$(CC) $(CFLAGS) -o $(TARGET_NAME) $(OBJS)

clean: $(OBJS)
	rm -rf $(OBJS) $(TARGET_NAME)<commit_msg>Expand Makefile to include install and uninstall<commit_after>CC=gcc
# CC=arm-frc-linux-gnueabi-gcc  # RoboRIO

DESTDIR?=/usr
PREFIX?=/local

TARGET=pathfinder

C=src
HEAD=include

CFLAGS=-shared -I$(HEAD) -g -lm
LDFLAGS=-shared

SRCS=$(C)/fit/hermite.c $(C)/mathutil.c $(C)/spline.c $(C)/trajectory.c $(C)/generator.c $(C)/modifiers/tank.c $(C)/modifiers/swerve.c
HEADERS=$(HEAD)/pathfinder/fit.h $(HEAD)/pathfinder/mathutil.h $(HEAD)/pathfinder/spline.h \
	$(HEAD)/pathfinder/structs.h $(HEAD)/pathfinder/trajectory.h $(HEAD)/pathfinder/modifiers/swerve.h $(HEAD)/pathfinder/modifiers/tank.h \
    $(HEAD)/pathfinder.h    
OBJS=$(SRCS:.c=.o)

ifeq ($(OS),Windows_NT)
    EXTTXT := dll
else
    EXTTXT := so
    PRETXT := lib
endif

ifeq ($(shell uname -s),Darwin)
    EXTTXT := dylib
endif

TARGET_NAME=$(PRETXT)$(TARGET).$(EXTTXT)

-include $(OBJS:.o=.d)

all: $(TARGET_NAME)

$(TARGET_NAME): $(OBJS)
	$(CC) $(CFLAGS) -o $(TARGET_NAME) $(OBJS)

clean: $(OBJS)
	rm -rf $(OBJS) $(TARGET_NAME)

install: $(all)
	install -m 0755 -d $(DESTDIR)$(PREFIX)/include
	install -m 0644 $(HEADERS) $(DESTDIR)$(PREFIX)/include
	install -m 0755 -d $(DESTDIR)$(PREFIX)/lib
	install -m 0755 $(TARGET_NAME) $(DESTDIR)$(PREFIX)/lib

uninstall:
	cd $(DESTDIR)$(PREFIX)/include/ && rm -f $(HEADERS)
	cd $(DESTDIR)$(PREFIX)/lib/ && rm -f $(TARGET_NAME)
{'fraction_non_alphanumeric': 0.21227364185110664, 'fraction_numerical': 0.008048289738430584, 'mean_word_length': 4.494475138121547, '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': '6780247', 'n_tokens_mistral': 874, 'n_tokens_neox': 831, 'n_words': 154}