New repo setup

This commit is contained in:
2024-05-28 14:50:00 -05:00
commit f68c320396
51 changed files with 4612 additions and 0 deletions

29
test-makefile Normal file
View File

@@ -0,0 +1,29 @@
#Compiler settings
CC = gcc
CFLAGS = -g -Wall -Werror -std=c11
LDFLAGS =
#Directories
SRCDIR = src
INCDIR = include
#Create executable file
program: main.o math.o
$(CC) $(CFLAGS) -o $@ $^ $(LDFLAGS)
#Create Main object file
main.o: main.c $(INCDIR)/math.h
$(CC) $(CFLAGS) -I$(INCDIR) -c $< -o $@
#Create Math object file
math.o: $(SRCDIR)/math.c $(INCDIR)/math.h
$(CC) $(CFLAGS) -I$(INCDIR) -c $< -o $@
#Remove all executable and object files
clean:
rm -f *.o program
#Run Main executable file
exec: program
./program